|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
ccs.swing18.I18Action
public abstract class I18Action
An Action which incorporates CCS' I18N and target method invocation support.
Field Summary | |
---|---|
protected static java.lang.Class[] |
ACTORSIG0
The empty array of classes. getMethod() implementations may find this useful. |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
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 |
Constructor Summary | |
---|---|
I18Action(java.lang.String actionID,
java.lang.Object target,
java.lang.String methodName,
int special)
A new I18Action. |
Method Summary | |
---|---|
java.lang.String |
getActionID()
Return this action's ID. |
java.lang.reflect.Method |
getActor()
Return the defined actor method upon the target. |
protected java.io.InputStream |
getIconData(java.lang.String resID)
Retrieve icon graphics data. |
int |
getSpecial()
Return the specialisation of the action. |
java.lang.Object |
getTarget()
Return the target of this action. |
protected abstract java.lang.reflect.Method |
resolveActor(java.lang.Object target,
java.lang.String methodName,
int special)
Return the method to invoke on target (won't be null), given its name. |
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 |
Field Detail |
---|
protected static final java.lang.Class[] ACTORSIG0
Constructor Detail |
---|
public I18Action(java.lang.String actionID, java.lang.Object target, java.lang.String methodName, int special)
actionID
- The unique ID string for this action. This is used as
the base for several related I18N strings and must obey the conventions
laid down in ccs.utils.MsgHelper
. .target
- The object containing the method that should be called when
this action happens. If null, the action won't do anything.methodName
- the name of the method of target to be called when the
action happens. The method must be accessible and must be declared by the
class of target
directly (not inherited). It may throw
Exception
; this will be caught and handled via
HurlLogic
. The method must return void and have zero parameters.special
- Zero, or the action's specialisation. These are optional
constants defined by subclasses.Method Detail |
---|
protected abstract java.lang.reflect.Method resolveActor(java.lang.Object target, java.lang.String methodName, int special) throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
protected java.io.InputStream getIconData(java.lang.String resID)
resID
- The resource ID of the graphics data. Defined by the
I18N properties file. Interpretation is application-specific.public java.lang.String getActionID()
public int getSpecial()
public java.lang.Object getTarget()
public java.lang.reflect.Method getActor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |