gistoolkit.application.command
Class EditCommand

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bygistoolkit.application.command.SimpleCommand
          extended bygistoolkit.application.command.EditCommand
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, Command, EditNodesDrawModelListener, java.util.EventListener, java.io.Serializable, ShapeEditorListener

public class EditCommand
extends SimpleCommand
implements java.awt.event.ActionListener, ShapeEditorListener, EditNodesDrawModelListener

Command to select objects on the display to edit, and then edit (move the nodes of the selected object) Creation date: (4/24/2001 2:17:21 PM)

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
EditCommand()
          SelectCommand constructor comment.
EditCommand(GISEditor inEditor)
          Construct a simple command with this display.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent inActionEvent)
          Respont to the actions of the buttons
 void execute()
          Sets the draw model in the display.
 void executeDraw(DrawModel inDrawModel)
          On the first call for the select model, it will change the model to the edit model.
 EditNodesDrawModel getEditModel()
          Insert the method's description here.
 boolean isSelected()
          Determines if the command has selected a shape to edit yet.
 void pointAdded(Point inPoint)
          Called when a point is added to the shape.
 void pointDeselected(Point inPoint)
          Called when a point is deselected.
 void pointRemoved(Point inPoint)
          Called when a point is removed.
 void pointSelected(Point inPoint)
          Called when a point is selected.
 void removeDraw(DrawModel inDrawModel)
          Removes the additional buttons from visibility.
 void setAdd()
          Set the state of the EditNodesDrawModel to Add.
 void setButton(GISMenuButton inButton)
          Set the button in this command.
 void setDelete()
          Set the state of the EditNodesDrawModel to Delete.
 void setEditModel(EditNodesDrawModel newEditModel)
          Insert the method's description here.
 void setMove()
          Set the state of the EditNodesDrawModel to Move.
 void shapeUpdated(EditNodesDrawModelEvent inEvent)
          called when the shape is updated in any way.
 void shapeUpdated(Shape inShape)
          Called when any update happens to the shape.
 
Methods inherited from class gistoolkit.application.command.SimpleCommand
executeAlternate, getGISDisplay, getGISEditor, getIcon, setGISDisplay, setGISEditor, showError, showInformation
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditCommand

public EditCommand()
SelectCommand constructor comment.


EditCommand

public EditCommand(GISEditor inEditor)
Construct a simple command with this display.

Method Detail

execute

public void execute()
Sets the draw model in the display.

Specified by:
execute in interface Command
Overrides:
execute in class SimpleCommand

executeDraw

public void executeDraw(DrawModel inDrawModel)
On the first call for the select model, it will change the model to the edit model.

Specified by:
executeDraw in interface Command
Overrides:
executeDraw in class SimpleCommand

getEditModel

public EditNodesDrawModel getEditModel()
Insert the method's description here. Creation date: (4/24/2001 4:56:44 PM)

Returns:
display.drawmodel.EditNodesDrawModel

isSelected

public boolean isSelected()
Determines if the command has selected a shape to edit yet. Creation date: (4/27/2001 3:07:31 PM)


setAdd

public void setAdd()
Set the state of the EditNodesDrawModel to Add.


setDelete

public void setDelete()
Set the state of the EditNodesDrawModel to Delete.


setEditModel

public void setEditModel(EditNodesDrawModel newEditModel)
Insert the method's description here. Creation date: (4/24/2001 4:56:44 PM)

Parameters:
newEditModel - display.drawmodel.EditNodesDrawModel

setMove

public void setMove()
Set the state of the EditNodesDrawModel to Move.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent inActionEvent)
Respont to the actions of the buttons

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class SimpleCommand

removeDraw

public void removeDraw(DrawModel inDrawModel)
Removes the additional buttons from visibility.

Specified by:
removeDraw in interface Command
Overrides:
removeDraw in class SimpleCommand

setButton

public void setButton(GISMenuButton inButton)
Set the button in this command. Allows this button to assign the sub buttons to the menu.


pointRemoved

public void pointRemoved(Point inPoint)
Called when a point is removed.

Specified by:
pointRemoved in interface ShapeEditorListener

pointAdded

public void pointAdded(Point inPoint)
Called when a point is added to the shape.

Specified by:
pointAdded in interface ShapeEditorListener

pointDeselected

public void pointDeselected(Point inPoint)
Called when a point is deselected.

Specified by:
pointDeselected in interface ShapeEditorListener

shapeUpdated

public void shapeUpdated(Shape inShape)
Called when any update happens to the shape.

Specified by:
shapeUpdated in interface ShapeEditorListener

pointSelected

public void pointSelected(Point inPoint)
Called when a point is selected.

Specified by:
pointSelected in interface ShapeEditorListener

shapeUpdated

public void shapeUpdated(EditNodesDrawModelEvent inEvent)
called when the shape is updated in any way.

Specified by:
shapeUpdated in interface EditNodesDrawModelListener