jimm.datavision.gui.cmd
Class InsertFieldCommand

java.lang.Object
  extended by jimm.datavision.gui.cmd.CommandAdapter
      extended by jimm.datavision.gui.cmd.InsertFieldCommand
All Implemented Interfaces:
Command, Nameable
Direct Known Subclasses:
NewDraggedFieldCommand, NewImageFieldCommand, NewSubreportCommand, NewTextFieldCommand

public abstract class InsertFieldCommand
extends CommandAdapter

Abstract superclass for inserting new fields.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  java.lang.String fieldType
           
protected  FieldWidget fw
           
protected  Point insertLoc
           
protected  SectionResizeCommand sectionResizeCommand
           
protected  SectionWidget sw
           
 
Fields inherited from class jimm.datavision.gui.cmd.CommandAdapter
name
 
Constructor Summary
InsertFieldCommand(SectionWidget sw, java.lang.String fieldType, Point insertLoc)
           
 
Method Summary
protected  Field createField()
          Creates the field.
protected abstract  FieldWidget createFieldWidget(Field f)
           
protected abstract  Rectangle initialFieldBounds()
           
protected abstract  java.lang.Object initialFieldValue()
           
 void perform()
          Performs the command.
 void undo()
          Undoes the command.
 
Methods inherited from class jimm.datavision.gui.cmd.CommandAdapter
getName, redo, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fw

protected FieldWidget fw

sw

protected SectionWidget sw

insertLoc

protected Point insertLoc

fieldType

protected java.lang.String fieldType

sectionResizeCommand

protected SectionResizeCommand sectionResizeCommand
Constructor Detail

InsertFieldCommand

public InsertFieldCommand(SectionWidget sw,
                          java.lang.String fieldType,
                          Point insertLoc)
Method Detail

perform

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

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

createField

protected Field createField()
Creates the field. This default behavior calls Field.create, passing it a type string.


initialFieldBounds

protected abstract Rectangle initialFieldBounds()

initialFieldValue

protected abstract java.lang.Object initialFieldValue()

createFieldWidget

protected abstract FieldWidget createFieldWidget(Field f)