ccs.cpc.impl
Class CpcAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ccs.swing18.I18Action
          extended by ccs.cpc.impl.CpcAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class CpcAction
extends ccs.swing18.I18Action

An Action in Checkpoint Commander.

See Also:
Serialized Form

Field Summary
static int CHECKBOX
          Specialisation: the action represents a checkbox.
static int LCHIRAL
          Specialisation: the action has left chirality.
static int RADIOSORT
          Specialisation: the action represents a radio button in the list of sort-order radio buttons.
static int RADIOWIPE
          Specialisation: the action represents a radio button in the list of wipe-mode radio buttons.
static int RCHIRAL
          Specialisation: the action has right chirality.
 
Fields inherited from class ccs.swing18.I18Action
ACTORSIG0
 
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
CpcAction(CpcImpl cpc, java.lang.String actionID, java.lang.Object target, java.lang.String methodName, int special)
          A new CpcAction.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
           
protected  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 ccs.swing18.I18Action
getActionID, getActor, getIconData, getSpecial, getTarget
 
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
 

Field Detail

CHECKBOX

public static final int CHECKBOX
Specialisation: the action represents a checkbox.

See Also:
Constant Field Values

RADIOWIPE

public static final int RADIOWIPE
Specialisation: the action represents a radio button in the list of wipe-mode radio buttons.

See Also:
Constant Field Values

RADIOSORT

public static final int RADIOSORT
Specialisation: the action represents a radio button in the list of sort-order radio buttons.

See Also:
Constant Field Values

LCHIRAL

public static final int LCHIRAL
Specialisation: the action has left chirality. (Ie. it's specific to the left browser panel.)

See Also:
Constant Field Values

RCHIRAL

public static final int RCHIRAL
Specialisation: the action has right chirality.

See Also:
Constant Field Values
Constructor Detail

CpcAction

public CpcAction(CpcImpl cpc,
                 java.lang.String actionID,
                 java.lang.Object target,
                 java.lang.String methodName,
                 int special)
A new CpcAction.

Parameters:
cpc - The CpCmdr object.
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. Specifically, all actionIDs should begin with 'G'; Menu items will begin "GM", GUI buttons "GB", items on dialogs "GD", buttons on dialogs "GDB".
target - The object containing the method that should be called when this action happens.
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. If the action is not chiral, the method must have zero parameters. If the action is chiral, the method must accept a single boolean, isLeft.
special - Zero, or the action's specialisation - one of the constants defined in this class.
Method Detail

resolveActor

protected java.lang.reflect.Method resolveActor(java.lang.Object target,
                                                java.lang.String methodName,
                                                int special)
                                         throws java.lang.NoSuchMethodException
Description copied from class: ccs.swing18.I18Action
Return the method to invoke on target (won't be null), given its name. You should be able to determine the correct method signature from the specialisation.

Specified by:
resolveActor in class ccs.swing18.I18Action
Throws:
java.lang.NoSuchMethodException

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)