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

public class ListItemMoveAction<T> extends EnhancedAction
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:
  • Constructor Details

    • ListItemMoveAction

      public ListItemMoveAction(ListField<T> listField, ListItemMoveAction.Direction direction)
      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

      public void actionPerformed(ActionEvent e)