dsto.dfc.swing.table
Class CmdMoveRow

java.lang.Object
  extended by dsto.dfc.swing.commands.AbstractCommand
      extended by dsto.dfc.swing.commands.AbstractMutableCommand
          extended by dsto.dfc.swing.commands.AbstractSelectionBasedCommand
              extended by dsto.dfc.swing.commands.AbstractMoveCommand
                  extended by dsto.dfc.swing.table.CmdMoveRow
All Implemented Interfaces:
Command, SelectionListener, Iconic, Copyable, Disposable, PropertyEventSource, ActionListener, Cloneable, EventListener

public class CmdMoveRow
extends AbstractMoveCommand

Moves rows up/down the table.

Version:
$Revision$

Field Summary
 
Fields inherited from class dsto.dfc.swing.commands.AbstractMoveCommand
direction, MOVE_DOWN, MOVE_DOWN_ICON, MOVE_UP, MOVE_UP_ICON
 
Fields inherited from class dsto.dfc.swing.commands.AbstractSelectionBasedCommand
source
 
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
listeners
 
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand
displayName, icon
 
Fields inherited from interface dsto.dfc.swing.icons.Iconic
NULL_ICON
 
Constructor Summary
CmdMoveRow(DfcTable table, boolean direction)
          Create a new instance.
 
Method Summary
 void execute()
          Execute the command.
protected  int getNextRow(DfcTableModel model, int row)
           
protected  void updateEnabled()
          Override this to update the enabled property appopriately.
 
Methods inherited from class dsto.dfc.swing.commands.AbstractMoveCommand
getAccelerator, getDescription, getGroupInView, getIcon, getMnemonic, getName, isInteractive, selectionChanged
 
Methods inherited from class dsto.dfc.swing.commands.AbstractSelectionBasedCommand
dispose
 
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon
 
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand
actionPerformed, canReplace, getDefaultDisplayName, getDisplayName, getLargeIcon, getLogString, setDisplayName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmdMoveRow

public CmdMoveRow(DfcTable table,
                  boolean direction)
Create a new instance.

Parameters:
table - The table to operate on.
direction - The direction to move the entries (MOVE_UP or MOVE_DOWN).
Method Detail

execute

public void execute()
Description copied from interface: Command
Execute the command.

Specified by:
execute in interface Command
Specified by:
execute in class AbstractMoveCommand

updateEnabled

protected void updateEnabled()
Description copied from class: AbstractMoveCommand
Override this to update the enabled property appopriately.

Overrides:
updateEnabled in class AbstractMoveCommand

getNextRow

protected int getNextRow(DfcTableModel model,
                         int row)


Copyright © 2008 Commonwealth of Australia