jimm.datavision.gui.cmd
Class TypingCommand

java.lang.Object
  extended by jimm.datavision.gui.cmd.CommandAdapter
      extended by jimm.datavision.gui.cmd.TypingCommand
All Implemented Interfaces:
Command, Nameable

public class TypingCommand
extends CommandAdapter

Moves a single field.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  TextFieldWidget fw
           
protected  Rectangle newBounds
           
protected  java.lang.String newText
           
protected  Rectangle oldBounds
           
protected  java.lang.String oldText
           
protected  int origHeight
           
protected  SectionResizeCommand sectionResizeCommand
           
protected  SectionWidget sw
           
 
Fields inherited from class jimm.datavision.gui.cmd.CommandAdapter
name
 
Constructor Summary
TypingCommand(TextFieldWidget fw, int origHeight)
           
 
Method Summary
 void perform()
          Saves new text.
 void redo()
          Redoes the command by calling CommandAdapter.perform().
 void undo()
          Undoes the command.
 
Methods inherited from class jimm.datavision.gui.cmd.CommandAdapter
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fw

protected TextFieldWidget fw

sw

protected SectionWidget sw

oldText

protected java.lang.String oldText

newText

protected java.lang.String newText

oldBounds

protected Rectangle oldBounds

newBounds

protected Rectangle newBounds

origHeight

protected int origHeight

sectionResizeCommand

protected SectionResizeCommand sectionResizeCommand
Constructor Detail

TypingCommand

public TypingCommand(TextFieldWidget fw,
                     int origHeight)
Method Detail

perform

public void perform()
Saves new text. The type has already been performed by the user.

Specified by:
perform in interface Command
Overrides:
perform in class CommandAdapter

undo

public void undo()
Description copied from class: CommandAdapter
Undoes the command. The default implementation does nothing.

Specified by:
undo in interface Command
Overrides:
undo in class CommandAdapter

redo

public void redo()
Description copied from class: CommandAdapter
Redoes the command by calling CommandAdapter.perform().

Specified by:
redo in interface Command
Overrides:
redo in class CommandAdapter