Package ca.corbett.forms.actions
Class ListItemMoveAction<T>
java.lang.Object
javax.swing.AbstractAction
ca.corbett.extras.EnhancedAction
ca.corbett.forms.actions.ListItemMoveAction<T>
- Type Parameters:
T- The type of items in the ListField.
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
An EnhancedAction that can be used with any ListField to move the selected items up or down in the list.
- Since:
- swing-extras 2.7
- Author:
- scorbo2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSpecifies the direction in which list items will be moved when this action is executed. -
Field Summary
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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
ConstructorsConstructorDescriptionListItemMoveAction(ListField<T> listField, ListItemMoveAction.Direction direction) Creates a new ListItemMoveAction with the default name and the given ListField.ListItemMoveAction(String name, ListField<T> listField, ListItemMoveAction.Direction direction) Creates a new ListItemMoveAction with the specified name and ListField.ListItemMoveAction(Icon icon, ListField<T> listField, ListItemMoveAction.Direction direction) Creates a new ListItemMoveAction with the specified icon and ListField. -
Method Summary
Methods inherited from class ca.corbett.extras.EnhancedAction
getAcceleratorKey, getDescription, getIcon, getName, getTooltip, setAcceleratorKey, setDescription, setIcon, setName, setTooltipMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
ListItemMoveAction
Creates a new ListItemMoveAction with the default name and the given ListField.- Parameters:
listField- The ListField in which selected items will be moved. Must not be null.direction- The direction in which selected items will be moved.
-
ListItemMoveAction
public ListItemMoveAction(String name, ListField<T> listField, ListItemMoveAction.Direction direction) Creates a new ListItemMoveAction with the specified name and ListField.- Parameters:
name- The name for this action.listField- The ListField in which selected items will be moved. Must not be null.direction- The direction in which selected items will be moved. Must not be null.
-
ListItemMoveAction
public ListItemMoveAction(Icon icon, ListField<T> listField, ListItemMoveAction.Direction direction) Creates a new ListItemMoveAction with the specified icon and ListField.- Parameters:
icon- The icon for this action.listField- The ListField in which selected items will be moved. Must not be null.direction- The direction in which selected items will be moved. Must not be null.
-
-
Method Details
-
actionPerformed
-