be.ugent.caagt.swirl.actions

Class SingleSelectionAction


public class SingleSelectionAction
extends SimpleAction

Simple action which selects a given index in a SingleSelectionModel.

See Also:
SelectionGroup, Description

Field Summary

protected SingleSelectionModel
selectionModel
protected int
value

Fields inherited from class be.ugent.caagt.swirl.actions.SimpleAction

MEDIUM_DISABLED_ICON, MEDIUM_ICON

Constructor Summary

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

Method Summary

void
actionPerformed(ActionEvent e)

Methods inherited from class be.ugent.caagt.swirl.actions.SimpleAction

actionPerformed

Field Details

selectionModel

protected final SingleSelectionModel selectionModel

value

protected final int value

Constructor Details

SingleSelectionAction

public SingleSelectionAction(SingleSelectionModel selectionModel,
                             int value,
                             ResourceBundle bundle,
                             String key,
                             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).

SingleSelectionAction

public SingleSelectionAction(SingleSelectionModel selectionModel,
                             int value,
                             ResourceBundle bundle,
                             String key,
                             Icon icon,
                             Icon mediumIcon,
                             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)

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)
Overrides:
actionPerformed in interface SimpleAction