Cytoscape 3.0.1 API

org.cytoscape.application.swing
Interface CyAction

All Superinterfaces:
Action, ActionListener, EventListener, MenuListener, PopupMenuListener
All Known Implementing Classes:
AbstractCyAction

public interface CyAction
extends Action, MenuListener, PopupMenuListener

An interface that describes how an action should be placed within the menus and/or toolbars of the Swing application.


Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.

Field Summary
 
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
 
Method Summary
 KeyStroke getAcceleratorKeyStroke()
          Returns the accelerator KeyStroke defined for this action.
 float getMenuGravity()
          Returns the gravity used to place the menu item for this action.
 String getName()
          Returns the name of the action.
 String getPreferredMenu()
          This method returns a Menu specification string.
 float getToolbarGravity()
          Returns the gravity used to place this action in the toolbar.
 boolean isInMenuBar()
          Returns whether the action should be in the menu bar.
 boolean isInToolBar()
          Returns whether the action should be in the tool bar.
 void updateEnableState()
          Forces the action to update its enable state based on the criteria defined for the action.
 boolean useCheckBoxMenuItem()
          Returns whether or not a checkbox menu item should be used.
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 
Methods inherited from interface javax.swing.event.MenuListener
menuCanceled, menuDeselected, menuSelected
 
Methods inherited from interface javax.swing.event.PopupMenuListener
popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible
 

Method Detail

getName

String getName()
Returns the name of the action.

Returns:
the name of the action.

isInMenuBar

boolean isInMenuBar()
Returns whether the action should be in the menu bar.

Returns:
whether the action should be in the menu bar.

isInToolBar

boolean isInToolBar()
Returns whether the action should be in the tool bar.

Returns:
whether the action should be in the tool bar.

getMenuGravity

float getMenuGravity()
Returns the gravity used to place the menu item for this action. Gravity is a numeric value associated with each menu item. MenuItems in the same menu pull-down are sorted in ascending order based on their gravity values.

Returns:
The gravity used to place the menu item for this action.

getToolbarGravity

float getToolbarGravity()
Returns the gravity used to place this action in the toolbar. Gravity is a numeric value associated with each menu item. MenuItems in the same menu pull-down are sorted in ascending order based on their gravity values.

Returns:
The gravity used to place this action in the toolbar.

getAcceleratorKeyStroke

KeyStroke getAcceleratorKeyStroke()
Returns the accelerator KeyStroke defined for this action. Will return null if no accelerator is set.

Returns:
the accelerator KeyStroke defined for this action. Will return null if no accelerator is set.

getPreferredMenu

String getPreferredMenu()
This method returns a Menu specification string. Submenus are preceded 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:
the string identifying the preferred menu.

useCheckBoxMenuItem

boolean useCheckBoxMenuItem()
Returns whether or not a checkbox menu item should be used.

Returns:
whether or not a checkbox menu item should be used.

updateEnableState

void updateEnableState()
Forces the action to update its enable state based on the criteria defined for the action.


Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.