Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.util
Class CytoscapeAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by cytoscape.util.CytoscapeAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, MenuListener
Direct Known Subclasses:
AlphabeticalSelectionAction, AnnotationGui, BackgroundColorAction, BendSelectedEdgesAction, BirdsEyeViewAction, BookmarkAction, CloneGraphInNewWindowAction, CreateNetworkViewAction, CytoPanelAction, DeleteAction, DeselectAllAction, DeSelectAllEdgesAction, DeSelectAllNodesAction, DestroyNetworkAction, DestroyNetworkViewAction, ExitAction, ExportAction, ExportAsGMLAction, ExportAsGraphicsAction, ExportAsInteractionsAction, ExportAsXGMMLAction, ExportEdgeAttributesAction, ExportNodeAttributesAction, ExportVizmapAction, FitContentAction, GraphObjectSelectionAction, HelpAboutAction, HelpContactHelpDeskAction, HelpContentsAction, HideSelectedAction, HideSelectedEdgesAction, HideSelectedNodesAction, ImportBioDataServerAction, ImportEdgeAttributesAction, ImportExpressionMatrixAction, ImportGraphFileAction, ImportNodeAttributesAction, ImportVizmapAction, InvertSelectedEdgesAction, InvertSelectedNodesAction, ListFromFileSelectionAction, LoggerAction, MapOntologyAction, NewNetworkAction, NewSessionAction, NewWindowSelectedNodesEdgesAction, NewWindowSelectedNodesOnlyAction, OpenSessionAction, PluginManagerAction, PluginUpdateAction, PreferenceAction, PrintAction, ProxyServerAction, RedoAction, SaveSessionAction, SaveSessionAsAction, SelectAdjacentEdgesAction, SelectAllAction, SelectAllEdgesAction, SelectAllNodesAction, SelectConnectedNodesAction, SelectFirstNeighborsAction, SettingsAction, SetVisualPropertiesAction, ShowAllAction, ShowGraphicsDetailsAction, ShrinkExpandGraph, StraightenSelectedEdgesAction, ToggleVisualMapperAction, UndoAction, UnHideSelectedEdgesAction, UnHideSelectedNodesAction, WebServiceNetworkImportAction, ZoomAction, ZoomSelectedAction

public abstract class CytoscapeAction
extends AbstractAction
implements MenuListener

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)
          Creates a new CytoscapeAction object.
CytoscapeAction(String name, Icon icon)
          Creates a new CytoscapeAction object.
 
Method Summary
 String actionHelp()
          DOCUMENT ME!
abstract  void actionPerformed(ActionEvent e)
          DOCUMENT ME!
 Object clone()
          The default clone() implementation delegates to the create() method of DataTypeUtilities.getDataTypeFactory( this.getClass() ).
 String[] completions()
          DOCUMENT ME!
static List getActionList()
          DOCUMENT ME!
 int getKeyCode()
          DOCUMENT ME!
 int getKeyModifiers()
          DOCUMENT ME!
 String getName()
          DOCUMENT ME!
 String getPreferredButtonGroup()
          This method returns a ButtonGroup specification string.
 String getPreferredMenu()
          This method returns a Menu specification string.
 Integer getPrefferedIndex()
          DOCUMENT ME!
 boolean isAccelerated()
          DOCUMENT ME!
 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 menuCanceled(MenuEvent e)
          This method can be used at your discretion, but otherwise does nothing.
 void menuDeselected(MenuEvent e)
          This method can be used at your discretion, but otherwise does nothing.
 void menuSelected(MenuEvent e)
          This method can be overridden by individual actions to set the state of menu items based on whatever unique circumstances that menu option cares about.
 void setAcceleratorCombo(int key_code, int key_mods)
          DOCUMENT ME!
 void setName(String name)
          DOCUMENT ME!
 void setPreferredButtonGroup(String new_preferred)
           
 void setPreferredIndex(int index)
          DOCUMENT ME!
 void setPreferredMenu(String new_preferred)
           
 void takeArgs(String[] argv)
          DOCUMENT ME!
 
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)
Creates a new CytoscapeAction object.

Parameters:
name - DOCUMENT ME!

CytoscapeAction

public CytoscapeAction(String name,
                       Icon icon)
Creates a new CytoscapeAction object.

Parameters:
name - DOCUMENT ME!
icon - DOCUMENT ME!
Method Detail

getActionList

public static List getActionList()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setName

public void setName(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!

getName

public String getName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

actionHelp

public String actionHelp()
DOCUMENT ME!

Returns:
DOCUMENT ME!

completions

public String[] completions()
DOCUMENT ME!

Returns:
DOCUMENT ME!

takeArgs

public void takeArgs(String[] argv)
DOCUMENT ME!

Parameters:
argv - DOCUMENT ME!

actionPerformed

public abstract void actionPerformed(ActionEvent e)
DOCUMENT ME!

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - DOCUMENT ME!

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.

Overrides:
clone in class AbstractAction

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)
DOCUMENT ME!

Parameters:
index - DOCUMENT ME!

getPrefferedIndex

public Integer getPrefferedIndex()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setAcceleratorCombo

public void setAcceleratorCombo(int key_code,
                                int key_mods)
DOCUMENT ME!

Parameters:
key_code - DOCUMENT ME!
key_mods - DOCUMENT ME!

isAccelerated

public boolean isAccelerated()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getKeyCode

public int getKeyCode()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getKeyModifiers

public int getKeyModifiers()
DOCUMENT ME!

Returns:
DOCUMENT ME!

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)

menuCanceled

public void menuCanceled(MenuEvent e)
This method can be used at your discretion, but otherwise does nothing. It exists primarily to have access to menuSelected().

Specified by:
menuCanceled in interface MenuListener
Parameters:
e - The triggering event.

menuDeselected

public void menuDeselected(MenuEvent e)
This method can be used at your discretion, but otherwise does nothing. It exists primarily to have access to menuSelected().

Specified by:
menuDeselected in interface MenuListener
Parameters:
e - The triggering event.

menuSelected

public void menuSelected(MenuEvent e)
This method can be overridden by individual actions to set the state of menu items based on whatever unique circumstances that menu option cares about. If not overridden, this method does nothing.

Specified by:
menuSelected in interface MenuListener
Parameters:
e - The triggering event.

www.cytoscape.org