hades.gui
Class DeselectAllCommand

java.lang.Object
  extended byjava.util.EventObject
      extended byhades.gui.Command
          extended byhades.gui.DeselectAllCommand
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 DeselectAllCommand
extends Command

DeselectAllCommand - deselect all visible objects in the Hades editor, including SimObject's symbols, Signal wire segments and solder dots, and standard FIG objects.

See Also:
Serialized Form

Field Summary
(package private)  ObjectCanvas canvas
           
 
Fields inherited from class hades.gui.Command
console, debug, editor, ready, versionString
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DeselectAllCommand(Editor editor)
           
 
Method Summary
 void execute()
          remove all selected objects from the editor's Selection collection, and graphically deselect all visible toplevel editor FIG objects.
 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)
          note that 'select all' does not really require any mouse coords.
 java.lang.String toString()
           
 void undo()
          undo: do nothing.
 
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

canvas

ObjectCanvas canvas
Constructor Detail

DeselectAllCommand

public DeselectAllCommand(Editor editor)
Method Detail

execute

public void execute()
remove all selected objects from the editor's Selection collection, and graphically deselect all visible toplevel editor FIG objects.

Unlike other commands, the DeselectAllCommand is not registered with the undo stack, as all previous selection status is lost anyway and cannot be restored.

Overrides:
execute in class Command

undo

public void undo()
undo: do nothing. Because any previous selection status has been lost, there is no way to restore any previous selections. We just print a warning message to that effect.

Overrides:
undo in class Command

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)
note that 'select all' does not really require any mouse coords.

Overrides:
setPosition in class Command

toString

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

getDescription

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