com.mindfusion.diagramming
Class ExpandHeaderRowCmd

java.lang.Object
  extended by com.mindfusion.diagramming.Command
      extended by com.mindfusion.diagramming.ExpandHeaderRowCmd

public final class ExpandHeaderRowCmd
extends Command

Implements undo and redo of collapsing or expanding the header row of a table section.


Constructor Summary
ExpandHeaderRowCmd(TableNode table, int rowIndex)
          Initializes a new ExpandHeaderRowCmd instance.
 
Method Summary
 void execute(boolean undoEnabled)
          This method is called internally by JDiagram when performing the action.
 int getRowIndex()
          Gets the index of the header row that defines which rows are collapsed or defined.
 TableNode getTable()
          Gets the table whose rows are expanded or collapsed by this command.
 void redo()
          This method is called by the UndoManager when redoing actions.
 void undo()
          This method is called by the UndoManager when undoing actions.
 
Methods inherited from class com.mindfusion.diagramming.Command
addSubCmd, adopt, getContext, getSubCommands, getTitle, isContainerOf, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandHeaderRowCmd

public ExpandHeaderRowCmd(TableNode table,
                          int rowIndex)
Initializes a new ExpandHeaderRowCmd instance.

Parameters:
table - The TableNode whose rows are expanded or collapsed through this command.
rowIndex - The index of the header row that defines the table section to be expanded or collapsed.
Method Detail

execute

public void execute(boolean undoEnabled)
This method is called internally by JDiagram when performing the action.

Specified by:
execute in class Command
Parameters:
undoEnabled - true if the undo manager is enabled at this time, otherwise false.

undo

public void undo()
This method is called by the UndoManager when undoing actions.

Overrides:
undo in class Command

redo

public void redo()
This method is called by the UndoManager when redoing actions.

Overrides:
redo in class Command

getTable

public TableNode getTable()
Gets the table whose rows are expanded or collapsed by this command.

Returns:
A TableNode object.

getRowIndex

public int getRowIndex()
Gets the index of the header row that defines which rows are collapsed or defined.

Returns:
An integer value specifying the header row index.