Cytoscape 3.0.0-alpha8-SNAPSHOT API

org.cytoscape.application.swing
Class TaskFactoryEnableSupport

java.lang.Object
  extended by org.cytoscape.application.swing.TaskFactoryEnableSupport

public final class TaskFactoryEnableSupport
extends Object

A class that allows the enabled state of an Action of JMenuItem to be managed in a consistent way.


Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Constructor Summary
TaskFactoryEnableSupport(Action action, TaskFactory tfp)
          Constructor.
TaskFactoryEnableSupport(DynamicSubmenuListener submenuListener, TaskFactory tfp)
          Constructor.
TaskFactoryEnableSupport(JMenuItem menuItem, TaskFactory tfp)
          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
 

Constructor Detail

TaskFactoryEnableSupport

public TaskFactoryEnableSupport(DynamicSubmenuListener submenuListener,
                                TaskFactory tfp)
Constructor.

Parameters:
submenuListener - The submenu listener whose enabled state will be updated.
tfp - The task factory enabler that indicates whether or not the submenu listener should be enabled.

TaskFactoryEnableSupport

public TaskFactoryEnableSupport(Action action,
                                TaskFactory tfp)
Constructor.

Parameters:
action - The action whose enabled state will be updated.
tfp - The task factory enabler that indicates whether or not the action should be enabled.

TaskFactoryEnableSupport

public TaskFactoryEnableSupport(JMenuItem menuItem,
                                TaskFactory tfp)
Constructor.

Parameters:
menuItem - The menuItem whose enabled state will be updated.
tfp - The task factory enabler that indicates whether or not the menu item should be enabled.
Method Detail

updateEnableState

public void updateEnableState()
Updates the enable state for the specified action/menuListener/menuItem for the specified enableFor description and the state of the system.


setEnabled

protected void setEnabled(boolean b)

isCurrentlyEnabled

public final boolean isCurrentlyEnabled()
Returns true if the action/menuListener/menuItem is enabled, false otherwise.

Returns:
true if the action/menuListener/menuItem is enabled, false otherwise.

Cytoscape 3.0.0-alpha8-SNAPSHOT API

Copyright 2011 Cytoscape Consortium. All rights reserved.