com.dlsc.flexgantt.command.treetable

## Class DefaultRowResizeCommand

- java.lang.Object
- - com.dlsc.flexgantt.command.AbstractCommand
  - - com.dlsc.flexgantt.command.treetable.DefaultRowResizeCommand

- All Implemented Interfaces:
    ICommand, Serializable

      public class DefaultRowResizeCommand
      extends AbstractCommand

  A command that changes the height of a tree table node. This command only works in situations where the tree table node is an implementor of the `ITreeTableNode` interface.
  Since:
    1.0
  Version:
    $Revision: 1.6 $
  Author:
    Dirk Lemmermann
  See Also:
    `IRowPolicy.getRowResizeCommand(Object, com.dlsc.flexgantt.model.treetable.ITreeTableModel, int)`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultRowResizeCommand(ITreeTableNode node, int height)` Constructs a new command.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `executeCommand(IProgressMonitor monitor)` Executes the command.
    `int` | `getNewRowHeight()` Returns the new height of the tree table node.
    `ITreeTableNode` | `getNode()` Returns the node that received a new row height.
    `int` | `getOldRowHeight()` Returns the old height of the tree table node.
    `void` | `undoCommand(IProgressMonitor monitor)` Undos the command.

    - ### Methods inherited from class com.dlsc.flexgantt.command.AbstractCommand

      `getName, isRedoable, isRelevant, isUndoable, redoCommand, setName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultRowResizeCommand

          public DefaultRowResizeCommand(ITreeTableNode node,
                                         int height)

      Constructs a new command.
      Parameters:
        `node` - the tree table node that will receive a new height
        `height` - the new height that will be assigned to the node
      Since:
        1.0

  - ### Method Detail

    - #### executeCommand

          public void executeCommand(IProgressMonitor monitor)
                              throws CommandException

      Description copied from interface: `ICommand`
      Executes the command.
      Parameters:
        `monitor` - a progress monitor
      Throws:
        `CommandException` - if anything during the execution of the command has gone wrong

    - #### undoCommand

          public void undoCommand(IProgressMonitor monitor)
                           throws CommandException

      Description copied from interface: `ICommand`
      Undos the command.
      Parameters:
        `monitor` - a progress monitor
      Throws:
        `CommandException` - if anything during the execution of the command has gone wrong

    - #### getNode

          public ITreeTableNode getNode()

      Returns the node that received a new row height.
      Returns:
        the node that gets modified
      Since:
        1.0

    - #### getNewRowHeight

          public int getNewRowHeight()

      Returns the new height of the tree table node.
      Returns:
        the new row height
      Since:
        1.0

    - #### getOldRowHeight

          public int getOldRowHeight()

      Returns the old height of the tree table node. This method only returns reasonable values after the command has been executed.
      Returns:
        the old row height
      Since:
        1.0

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.