|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
hades.gui.Command
hades.gui.CopyCommand
CopyCommand - copy an object in a HADES Design.
Field Summary | |
(package private) ObjectCanvas |
canvas
|
(package private) java.awt.Point |
newPos
|
(package private) java.awt.Point |
oldPos
|
(package private) SimObject |
source
|
(package private) SimObject |
target
|
Fields inherited from class hades.gui.Command |
console, debug, editor, ready, versionString |
Constructor Summary | |
CopyCommand(Editor editor)
the default constructor for all CopyCommand objects. |
Method Summary | |
void |
cancel()
|
void |
execute()
perform the action corresponding to this CopyCommand object and register it with the UndoStack. |
java.lang.String |
getDescription()
|
void |
mousePressed(FigCanvasEvent ME)
extract the screen and world coordinates of this Event, and dispatch to setPosition(). |
void |
setPosition(java.awt.Point SP,
java.awt.Point WP)
this method should be called twice for a copy command. |
java.lang.String |
toString()
toString(): identify this CopyCommand |
void |
undo()
try to undo the action corresponding to this CopyCommand object: we simply delete the copied object. |
Methods inherited from class hades.gui.Command |
actionPerformed, dbg, getLogExtraArguments, initialize, isReady, keyPressed, keyReleased, keyTyped, message, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, statusMessage, writePositionLogMessage |
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
java.awt.Point oldPos
java.awt.Point newPos
SimObject source
SimObject target
ObjectCanvas canvas
Constructor Detail |
public CopyCommand(Editor editor)
Note that other parameter values (like names, event sources, ...) should be set later on with calls to the corresponding event dispatcher methods, e.g. mousePressed().
Method Detail |
public void execute()
execute
in class Command
public void cancel()
cancel
in class Command
public void undo()
undo
in class Command
public void mousePressed(FigCanvasEvent ME)
mousePressed
in interface FigCanvasListener
mousePressed
in class Command
public void setPosition(java.awt.Point SP, java.awt.Point WP)
setPosition
in class Command
public java.lang.String toString()
toString
in class Command
public java.lang.String getDescription()
getDescription
in class Command
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |