Class CL_ContextAction

java.lang.Object
javax.swing.AbstractAction
org.jjazz.cl_editor.api.CL_ContextAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, ClsChangeListener, CL_ContextActionListener, org.openide.util.ContextAwareAction

public abstract class CL_ContextAction extends AbstractAction implements CL_ContextActionListener, ClsChangeListener, org.openide.util.ContextAwareAction
A base class for CL_Editor context aware actions.

To be used by actions associated to static menus, buttons or keyboard shortcuts, which act on the selection (chord symbols, bars, etc.), and whose enabled state depends on this selection. If your action is only used in a transient popupmenu created by Utilities.actionsToPopup() with no keyboard shorcut, you might prefer to use a simple AbstractAction+ContextAwareAction (see SetChordColor.java for example).

If your action is used in a transient popup menu (created by Utilities.actionsToPopup()) and needs to listen to a shared service, use a WeakListener or make your action a singleton (see Paste.java for example).

See Also: