public abstract class JobAction extends java.lang.Object implements ExplorerAction
DESIGN_GROUP, ENABLED_PROPERTY, JOB_GROUP, PROPERTY_GROUP, VISIBLE_PROPERTY| Constructor and Description |
|---|
JobAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
action()
Called to perform the action.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a Listener.
|
protected boolean |
checkPrepare() |
protected abstract void |
doAction() |
protected void |
doFree(ExplorerContext explorerContext) |
protected void |
doPrepare(ExplorerContext explorerContext) |
protected ExplorerContext |
getExplorerContext() |
boolean |
isEnabled()
Is this action currently enabled?
|
protected boolean |
isPrepared() |
boolean |
isVisible()
Is this action currently visible?
|
void |
prepare()
Called when the Job Menu is selected.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a Listener.
|
protected void |
setEnabled(boolean enabled) |
void |
setSelectedContext(ExplorerContext explorerContext)
This method will be called when a component
is selected or unselected.
|
protected void |
setVisible(boolean visible) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAcceleratorKey, getGroup, getMnemonicKey, getNamepublic final boolean isEnabled()
isEnabled in interface ExplorerActionprotected void setEnabled(boolean enabled)
public final boolean isVisible()
ExplorerActionisVisible in interface ExplorerActionprotected void setVisible(boolean visible)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeNotifieraddPropertyChangeListener in interface PropertyChangeNotifierlistener - The listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeNotifierremovePropertyChangeListener in interface PropertyChangeNotifierlistener - The listener.public final void setSelectedContext(ExplorerContext explorerContext)
ExplorerActionsetSelectedContext in interface ExplorerActionsetSelectedContext in interface SelectedContextAwareexplorerContext - the ExplorerContext for the current
node. Null when the node is unselected.public final void prepare()
ExplorerAction
This method was added in addition to
ExplorerAction.setSelectedContext(ExplorerContext) because prepare can be
relatively slow if, for instance, it involves ascertaining the state
of a remote job, so this method allows this to be done only when
the menu is to be shown.
prepare in interface ExplorerActionprepare in interface SelectedContextAwareprotected ExplorerContext getExplorerContext()
protected boolean isPrepared()
protected abstract void doAction()
throws java.lang.Exception
java.lang.Exceptionprotected final boolean checkPrepare()
public final void action()
throws java.lang.Exception
ExplorerAction
If this is a FormAction this method will be called once
the form has been completed. Otherwise this method is called
immediately the menu item or other trigger for the action has
been selected.
action in interface ExplorerActionjava.lang.Exception - The exception will be caught and
presented to the user.protected void doPrepare(ExplorerContext explorerContext)
protected void doFree(ExplorerContext explorerContext)