|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cytoscape.application.swing.ActionEnableSupport
public final class ActionEnableSupport
A class that allows the enabled state of an Action of JMenuItem to managed in
a consistent way.
Recognized values for the "enableFor" description string are:
Field Summary | |
---|---|
static String |
ENABLE_FOR_NETWORK
Enable when at least one network exists. |
static String |
ENABLE_FOR_NETWORK_AND_VIEW
Enable when at least one network WITH view exists. |
static String |
ENABLE_FOR_NETWORK_WITHOUT_VIEW
Enable when at least one network with NO view exists. |
static String |
ENABLE_FOR_SELECTED_EDGES
Enable when edges have been selected in a network. |
static String |
ENABLE_FOR_SELECTED_NODES
Enable when nodes have been selected in a network. |
static String |
ENABLE_FOR_SELECTED_NODES_OR_EDGES
Enable when either nodes or edges have been selected in a network. |
static String |
ENABLE_FOR_TABLE
Enable when at least one network exists. |
Constructor Summary | |
---|---|
ActionEnableSupport(Action action,
String enableFor,
CyApplicationManager applicationManager,
CyNetworkViewManager networkViewManager)
Constructor. |
|
ActionEnableSupport(DynamicSubmenuListener submenuListener,
String enableFor,
CyApplicationManager applicationManager,
CyNetworkViewManager networkViewManager)
Constructor. |
|
ActionEnableSupport(JMenuItem menuItem,
String enableFor,
CyApplicationManager applicationManager,
CyNetworkViewManager networkViewManager)
Constructor. |
Method Summary | |
---|---|
boolean |
isCurrentlyEnabled()
Returns true if the action/menuListener/menuItem is enabled, false otherwise. |
protected void |
setEnabled(boolean b)
|
void |
updateEnableState()
Updates the enable state for the specified action/menuListener/menuItem for the specified enableFor description and the state of the system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ENABLE_FOR_NETWORK
public static final String ENABLE_FOR_NETWORK_WITHOUT_VIEW
public static final String ENABLE_FOR_NETWORK_AND_VIEW
public static final String ENABLE_FOR_SELECTED_NODES_OR_EDGES
public static final String ENABLE_FOR_SELECTED_NODES
public static final String ENABLE_FOR_SELECTED_EDGES
public static final String ENABLE_FOR_TABLE
Constructor Detail |
---|
public ActionEnableSupport(DynamicSubmenuListener submenuListener, String enableFor, CyApplicationManager applicationManager, CyNetworkViewManager networkViewManager)
submenuListener
- The submenu listener whose enabled state will be updated.enableFor
- The description of how the submenu should be enabled.
See class documentation above for allowable values for this string.applicationManager
- The application manager.public ActionEnableSupport(Action action, String enableFor, CyApplicationManager applicationManager, CyNetworkViewManager networkViewManager)
action
- The action whose enabled state will be updated.enableFor
- The description of how the action should be enabled.
See class documentation above for allowable values for this string.applicationManager
- The application manager.public ActionEnableSupport(JMenuItem menuItem, String enableFor, CyApplicationManager applicationManager, CyNetworkViewManager networkViewManager)
menuItem
- The menuItem whose enabled state will be updated.enableFor
- The description of how the menuItem should be enabled.
See class documentation above for allowable values for this string.applicationManager
- The application manager.Method Detail |
---|
public void updateEnableState()
protected void setEnabled(boolean b)
public final boolean isCurrentlyEnabled()
|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |