Cytoscape 2.2 (c) 2004 ISB, MSKCC, UCSD

cytoscape.util
Class CytoscapeAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bycytoscape.util.CytoscapeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable

public abstract class CytoscapeAction
extends AbstractAction

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CytoscapeAction()
           
CytoscapeAction(String name)
           
CytoscapeAction(String name, Icon icon)
           
 
Method Summary
 String actionHelp()
           
abstract  void actionPerformed(ActionEvent e)
           
 Object clone()
          The default clone() implementation delegates to the create() method of DataTypeUtilities.getDataTypeFactory( this.getClass() ).
 String[] completions()
           
static List getActionList()
           
 int getKeyCode()
           
 int getKeyModifiers()
           
 String getName()
           
 String getPreferredButtonGroup()
          This method returns a ButtonGroup specification string.
 String getPreferredMenu()
          This method returns a Menu specification string.
 Integer getPrefferedIndex()
           
 boolean isAccelerated()
           
 boolean isInMenuBar()
          By default all CytoscapeActions wish to be included in CommunityMenuBars, but you may override if you wish.
 boolean isInToolBar()
          By default no CytoscapeActions wish to be included in CommunityToolBars, but you may override if you wish.
 void setAcceleratorCombo(int key_code, int key_mods)
           
 void setName(String name)
           
 void setPreferredButtonGroup(String new_preferred)
           
 void setPreferredIndex(int index)
           
 void setPreferredMenu(String new_preferred)
           
 void takeArgs(String[] argv)
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CytoscapeAction

public CytoscapeAction()

CytoscapeAction

public CytoscapeAction(String name)

CytoscapeAction

public CytoscapeAction(String name,
                       Icon icon)
Method Detail

getActionList

public static List getActionList()

setName

public void setName(String name)

getName

public String getName()

actionHelp

public String actionHelp()

completions

public String[] completions()

takeArgs

public void takeArgs(String[] argv)

actionPerformed

public abstract void actionPerformed(ActionEvent e)

clone

public Object clone()
The default clone() implementation delegates to the create() method of DataTypeUtilities.getDataTypeFactory( this.getClass() ). Override if your CytoscapeAction maintains state that must be transmitted to the clone.


isInMenuBar

public boolean isInMenuBar()
By default all CytoscapeActions wish to be included in CommunityMenuBars, but you may override if you wish.

Returns:
true If this Action should be included in a CommunityMenuBar.
See Also:
#getPrefferedMenu();

isInToolBar

public boolean isInToolBar()
By default no CytoscapeActions wish to be included in CommunityToolBars, but you may override if you wish.

Returns:
true If this Action should be included in a CommunityMenuBar.
See Also:
#getPrefferedButtonGroup();

setPreferredIndex

public void setPreferredIndex(int index)

getPrefferedIndex

public Integer getPrefferedIndex()

setAcceleratorCombo

public void setAcceleratorCombo(int key_code,
                                int key_mods)

isAccelerated

public boolean isAccelerated()

getKeyCode

public int getKeyCode()

getKeyModifiers

public int getKeyModifiers()

getPreferredMenu

public String getPreferredMenu()
This method returns a Menu specification string. Submenus are preceeded by dots in this string, so the result "File.Import" specifies the submenu "Import" of the menu "File". If the result is null, the menu will be placed in a default location.

Returns:
a Menu specification string, or null if this Action should be placed in a default Menu.
See Also:
#inMenuBar()

setPreferredMenu

public void setPreferredMenu(String new_preferred)

getPreferredButtonGroup

public String getPreferredButtonGroup()
This method returns a ButtonGroup specification string. Subgroups are preceeded by dots in this string, so the result "Edit.Selection Modes" specifies the subgroup "Selection Modes" of the group "Edit". If the result is null, the button will be placed in a default location.

Returns:
a ButtonGroup specification string, or null if the button for this Action should be placed in a default ButtonGroup.
See Also:
#inToolBar()

setPreferredButtonGroup

public void setPreferredButtonGroup(String new_preferred)

www.cytoscape.org