com.rapidminer.gui
Class ConditionalAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.rapidminer.gui.ConditionalAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
CopyAction, CutAction, DeleteOperatorAction, InfoOperatorAction, NewBuildingBlockAction, NewOperatorAction, PasteAction, RenameOperatorAction, RunResumeAction, SaveBuildingBlockAction, StopAction, ValidateProcessAction

public abstract class ConditionalAction
extends javax.swing.AbstractAction

An action that must be enabled/disabled depending on certain conditions. These conditions can be mandatrory, disallowed, or irrelevant. All ConditionalActions created are added to a collection and there status is automatically checked if the condition premises might have changed.

Author:
Ingo Mierswa, Simon Fischer Exp $
See Also:
Serialized Form

Field Summary
static int CLIPBOARD_FILLED
           
static int DESCRIPTION_VIEW
           
static int DISALLOWED
           
static int DONT_CARE
           
static int MANDATORY
           
static int NUMBER_OF_CONDITIONS
           
static int OPERATOR_CHAIN_SELECTED
           
static int OPERATOR_SELECTED
           
static int PROCESS_PAUSED
           
static int PROCESS_RUNNING
           
static int PROCESS_STOPPED
           
static int ROOT_SELECTED
           
static int SIBLINGS_EXIST
           
static int XML_VIEW
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
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
 
Constructor Summary
ConditionalAction(java.lang.String name)
           
ConditionalAction(java.lang.String name, javax.swing.Icon icon)
           
 
Method Summary
 void setCondition(int index, int condition)
           
static void updateAll(boolean[] states)
          Updates all actions.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

DISALLOWED

public static final int DISALLOWED
See Also:
Constant Field Values

DONT_CARE

public static final int DONT_CARE
See Also:
Constant Field Values

MANDATORY

public static final int MANDATORY
See Also:
Constant Field Values

OPERATOR_SELECTED

public static final int OPERATOR_SELECTED
See Also:
Constant Field Values

OPERATOR_CHAIN_SELECTED

public static final int OPERATOR_CHAIN_SELECTED
See Also:
Constant Field Values

ROOT_SELECTED

public static final int ROOT_SELECTED
See Also:
Constant Field Values

SIBLINGS_EXIST

public static final int SIBLINGS_EXIST
See Also:
Constant Field Values

CLIPBOARD_FILLED

public static final int CLIPBOARD_FILLED
See Also:
Constant Field Values

PROCESS_STOPPED

public static final int PROCESS_STOPPED
See Also:
Constant Field Values

PROCESS_PAUSED

public static final int PROCESS_PAUSED
See Also:
Constant Field Values

PROCESS_RUNNING

public static final int PROCESS_RUNNING
See Also:
Constant Field Values

XML_VIEW

public static final int XML_VIEW
See Also:
Constant Field Values

DESCRIPTION_VIEW

public static final int DESCRIPTION_VIEW
See Also:
Constant Field Values

NUMBER_OF_CONDITIONS

public static final int NUMBER_OF_CONDITIONS
See Also:
Constant Field Values
Constructor Detail

ConditionalAction

public ConditionalAction(java.lang.String name)

ConditionalAction

public ConditionalAction(java.lang.String name,
                         javax.swing.Icon icon)
Method Detail

setCondition

public void setCondition(int index,
                         int condition)
Parameters:
index - one out of OPERATOR_SELECTED, OPERATOR_CHAIN_SELECTED, ROOT_SELECTED, CLIPBOARD_FILLED, and PROCESS_RUNNING
condition - one out of DISALLOWED, DONT_CARE, and MANDATORY

updateAll

public static void updateAll(boolean[] states)
Updates all actions.



Copyright © 2001-2009 by Rapid-I