be.ugent.caagt.swirl.actions
Class SingleSelectionAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by be.ugent.caagt.swirl.actions.SimpleAction
          extended by be.ugent.caagt.swirl.actions.SingleSelectionAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class SingleSelectionAction
extends SimpleAction

Simple action which selects a given index in a SingleSelectionModel.

See Also:
SelectionGroup, Description, Serialized Form

Field Summary
protected  javax.swing.SingleSelectionModel selectionModel
           
protected  int value
           
 
Fields inherited from class be.ugent.caagt.swirl.actions.SimpleAction
MEDIUM_DISABLED_ICON, MEDIUM_ICON, SMALL_DISABLED_ICON, TOGGLE_BUTTON_MODEL
 
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
SingleSelectionAction(javax.swing.SingleSelectionModel selectionModel, int value, java.util.ResourceBundle bundle, java.lang.String key, javax.swing.Icon icon)
          Construct an action of this type with an internationalized description string and given icon.
SingleSelectionAction(javax.swing.SingleSelectionModel selectionModel, int value, java.util.ResourceBundle bundle, java.lang.String key, javax.swing.Icon icon, javax.swing.Icon mediumIcon, javax.swing.Icon mediumDisabledIcon)
          Construct an action of this type with an internationalized description string and given icons.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 
Methods inherited from class be.ugent.caagt.swirl.actions.SimpleAction
setMediumDisabledIcon, setMediumIcon, setSharedToggleButtonModel, setSmallDisabledIcon
 
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
 

Field Detail

selectionModel

protected final javax.swing.SingleSelectionModel selectionModel

value

protected final int value
Constructor Detail

SingleSelectionAction

public SingleSelectionAction(javax.swing.SingleSelectionModel selectionModel,
                             int value,
                             java.util.ResourceBundle bundle,
                             java.lang.String key,
                             javax.swing.Icon icon,
                             javax.swing.Icon mediumIcon,
                             javax.swing.Icon mediumDisabledIcon)
Construct an action of this type with an internationalized description string and given icons.

Parameters:
selectionModel - Selection model which will be changed by this action
value - Value to be selected by this action
bundle - Resource bundle which contains the description for this action.
key - Key used for the description of this action in the bundle.
icon - Small icon to be used for menu and standard button decoration (or null)
mediumIcon - Medium size icon to be used for tool bar buttons (or null)
mediumDisabledIcon - Medium size icon to be used for a disabled tool bar buttons (or null)

SingleSelectionAction

public SingleSelectionAction(javax.swing.SingleSelectionModel selectionModel,
                             int value,
                             java.util.ResourceBundle bundle,
                             java.lang.String key,
                             javax.swing.Icon icon)
Construct an action of this type with an internationalized description string and given icon.

Parameters:
selectionModel - Selection model which will be changed by this action
value - Value to be selected by this action
bundle - Resource bundle which contains the description for this action.
key - Key used for the description of this action in the bundle.
icon - Small icon to be used for menu and standard button decoration (or null).
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class SimpleAction