hades.gui
Class SignalSetValueCommand

java.lang.Object
  extended byjava.util.EventObject
      extended byhades.gui.Command
          extended byhades.gui.SignalSetValueCommand
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, FigCanvasListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

public class SignalSetValueCommand
extends Command

SignalSetValueCommand - set a value for an HADES StdLogic1164 Signal

See Also:
Serialized Form

Field Summary
(package private)  ObjectCanvas canvas
           
(package private)  SignalStdLogic1164 target
           
(package private)  int value
           
 
Fields inherited from class hades.gui.Command
console, debug, editor, ready, versionString
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SignalSetValueCommand(Editor editor)
           
 
Method Summary
 void execute()
          perform the action corresponding to this SignalSetValueCommand 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 move command.
 void setValue(int v)
           
 java.lang.String toString()
          toString(): identify this SignalSetValueCommand
 void undo()
          try to undo the action of this SignalSetValueCommand object.
 
Methods inherited from class hades.gui.Command
actionPerformed, cancel, 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

target

SignalStdLogic1164 target

canvas

ObjectCanvas canvas

value

int value
Constructor Detail

SignalSetValueCommand

public SignalSetValueCommand(Editor editor)
Method Detail

execute

public void execute()
perform the action corresponding to this SignalSetValueCommand object and register it with the UndoStack.

Overrides:
execute in class Command

undo

public void undo()
try to undo the action of this SignalSetValueCommand object.

Overrides:
undo in class Command

setValue

public void setValue(int v)

mousePressed

public void mousePressed(FigCanvasEvent ME)
extract the screen and world coordinates of this Event, and dispatch to setPosition().

Specified by:
mousePressed in interface FigCanvasListener
Overrides:
mousePressed in class Command

setPosition

public void setPosition(java.awt.Point SP,
                        java.awt.Point WP)
this method should be called twice for a move command. At the first call, we expect the old position of the object to be moved, and on the second call its target position.

Overrides:
setPosition in class Command

toString

public java.lang.String toString()
toString(): identify this SignalSetValueCommand

Overrides:
toString in class Command

getDescription

public java.lang.String getDescription()
Overrides:
getDescription in class Command