|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
org.opa.core.OPAAction
This abstract class represents a response to a user initiated event. Modules register OPAAction classes with an instance of OPAActionManager. OPAActionManager is responsible for enabling/disabling all registered OPAActions in response to GUI focus changes. OPAActions are also used to build the application menubar, toolbars and popup menu. It is important that OPAAction classes be Singletons. That is, there should only ever be a single instance of the class in the JVM at any time. All requests for action will be directed to that instance. Therefore, OPAAction subclasses should provide a public static OPAAction getInstance() method. OPAAction is based on the Java Action API and the "Cookie" design pattern used by the Netbeans IDE (www.netbeans.org).
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 | |
OPAAction()
|
Method Summary | |
abstract java.lang.Class |
getCookieInterface()
Returns the OPACookie to be associated with this OPAAction. |
abstract java.lang.String |
getMenuPath()
Returns a the preferred menu path for this events 'menu' agent. |
abstract java.lang.String |
getPosition()
This is the priority level used by OPA when building the system menu. |
abstract boolean |
onMenubar()
Add to application menubar? |
abstract boolean |
onPopup()
Add to application popup menu? |
abstract boolean |
onToolbar()
Add to application toolbar? |
abstract void |
setCookie(OPACookie cookieInstance)
Adds an OPACookie instance to this action. |
abstract void |
setHelp(java.awt.Component c)
|
protected void |
setIcon(javax.swing.Icon icon)
|
protected void |
setName(java.lang.String name)
|
protected void |
setToolTip(java.lang.String toolTip)
|
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
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 OPAAction()
Method Detail |
public abstract boolean onToolbar()
public abstract boolean onMenubar()
public abstract boolean onPopup()
public abstract java.lang.String getMenuPath()
public abstract java.lang.String getPosition()
public abstract void setHelp(java.awt.Component c)
public abstract java.lang.Class getCookieInterface()
public abstract void setCookie(OPACookie cookieInstance)
protected void setName(java.lang.String name)
protected void setToolTip(java.lang.String toolTip)
protected void setIcon(javax.swing.Icon icon)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |