com.im.ijc.core.api.actions
Class AbstractIJCAction
java.lang.Object
org.openide.util.SharedClassObject
org.openide.util.actions.SystemAction
org.openide.util.actions.CallableSystemAction
org.openide.util.actions.NodeAction
org.openide.util.actions.CookieAction
com.im.ijc.core.api.actions.AbstractToolbarCookieAction
com.im.ijc.core.api.actions.AbstractIJCAction
- All Implemented Interfaces:
- ActionListener, Externalizable, Serializable, EventListener, Action, Presenter, Presenter.Menu, Presenter.Popup, Presenter.Toolbar, ContextAwareAction, HelpCtx.Provider
- Direct Known Subclasses:
- AbstractIJCWidgetCookieAction, AbstractVertexStateCookieAction, DeleteRowsAction
public abstract class AbstractIJCAction
- extends AbstractToolbarCookieAction
The main class in the IJC actions hierarchy. Usually an action in IJC wants to be either DFResultSet.VertexState or
widget sensitive or both. That is it might listen on changes in which it is interested and
implementations might conveniently set their enablement state and adjust their behaviour accordingly.
AbstractIJCAction can handle all cases. Implementations might tell their preference via AbstractIJCAction(boolean, boolean) constructor.
- See Also:
- Serialized Form
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Methods inherited from class org.openide.util.actions.SystemAction |
clearSharedData, createPopupMenu, createToolbarPresenter, get, getIcon, getIcon, getName, getValue, iconResource, linkActions, putValue, setIcon |
| Methods inherited from class org.openide.util.SharedClassObject |
addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removePropertyChangeListener, reset, writeExternal, writeReplace |
ALL_ICONS_PREFIX
protected static final String ALL_ICONS_PREFIX
- See Also:
- Constant Field Values
AbstractIJCAction
public AbstractIJCAction()
- Delegates to
AbstractIJCAction(boolean, boolean) with both arguments set to true.
AbstractIJCAction
public AbstractIJCAction(boolean listenOnWidget,
boolean listenOnVertexState)
- Constructor by which subclass might convey in what changes it is interested.
- Parameters:
listenOnWidget - whether action should listen on widget changedlistenOnVertexState - whether action should listen on DFResultSet.VertexState changes
updateEnabledState
protected final void updateEnabledState()
isEventInteresting
protected boolean isEventInteresting(PropertyChangeEvent evt)
addListenerTo
protected void addListenerTo(IJCWidget widget,
PropertyChangeListener selectionListener)
removeListenerFrom
protected void removeListenerFrom(IJCWidget widget,
PropertyChangeListener selectionListener)
mode
protected int mode()
- Specified by:
mode in class CookieAction
cookieClasses
protected Class<?>[] cookieClasses()
- Specified by:
cookieClasses in class CookieAction
getHelpCtx
public HelpCtx getHelpCtx()
- Specified by:
getHelpCtx in interface HelpCtx.Provider- Specified by:
getHelpCtx in class SystemAction
enable
public boolean enable(Node[] activatedNodes)
- Overrides:
enable in class AbstractToolbarCookieAction
enableAccordingTo
protected boolean enableAccordingTo(DFResultSet.VertexState vs,
IJCWidget widget)
asynchronous
protected boolean asynchronous()
- Overrides:
asynchronous in class CallableSystemAction
enableWhenNoRows
protected boolean enableWhenNoRows()
enableWhenNotBound
protected boolean enableWhenNotBound()
enableWhenNoResultSet
protected boolean enableWhenNoResultSet()
enableOnlyInBrowseMode
protected boolean enableOnlyInBrowseMode()
- Says whether an action should be enabled only in
browse mode.
- Returns:
- see description
getSelectedIdsSafely
protected static List<? extends Comparable<?>> getSelectedIdsSafely(String lockingMsg,
DFResultSet.VertexState vs)
findVS
protected static DFResultSet.VertexState findVS(Node[] activatedNodes)
findWidget
protected static IJCWidget findWidget(Node[] activatedNodes)
getSelection
protected static SelectionDescription getSelection(DFResultSet.VertexState vs,
IJCWidget widget)
getSelectedIds
protected static List<? extends Comparable<?>> getSelectedIds(DFResultSet.VertexState vs,
IJCWidget widget)
getSelectedIdsSafely
protected static List<? extends Comparable<?>> getSelectedIdsSafely(String lockingMsg,
DFResultSet.VertexState vs,
IJCWidget widget)