|
JHotDraw 7.0.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
org.jhotdraw.app.action.AbstractProjectAction
public abstract class AbstractProjectAction
An Action that acts on on the current Project of an
Application.
If the current Project object is disabled or is null, the
AbstractProjectAction is disabled as well.
Project,
Application,
Serialized Form| Field Summary |
|---|
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
AbstractProjectAction(Application app)
Creates a new instance. |
|
| Method Summary | |
|---|---|
Application |
getApplication()
|
Project |
getCurrentProject()
|
protected void |
installProjectListeners(Project p)
Installs listeners on the project object. |
boolean |
isEnabled()
Returns true if the action is enabled. |
void |
setEnabled(boolean newValue)
Enables or disables the action. |
protected void |
uninstallProjectListeners(Project p)
Installs listeners on the project object. |
protected void |
updateEnabled(boolean oldValue,
boolean newValue)
Updates the enabled state of this action depending on the new enabled state of the project. |
protected void |
updateProject(Project oldValue,
Project newValue)
Updates the project of this action depending on the current project of the application. |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.ActionListener |
|---|
actionPerformed |
| Constructor Detail |
|---|
public AbstractProjectAction(Application app)
| Method Detail |
|---|
protected void updateProject(Project oldValue,
Project newValue)
protected void installProjectListeners(Project p)
protected void uninstallProjectListeners(Project p)
protected void updateEnabled(boolean oldValue,
boolean newValue)
public Application getApplication()
public Project getCurrentProject()
public boolean isEnabled()
isEnabled in interface javax.swing.ActionisEnabled in class javax.swing.AbstractActionAction.isEnabled()public void setEnabled(boolean newValue)
setEnabled in interface javax.swing.ActionsetEnabled in class javax.swing.AbstractActionnewValue - true to enable the action, false to
disable itAction.setEnabled(boolean)
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||