|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
hades.gui.Command
Command - the common base class for all HADES editing command objects. It models the 'idle command' that does nothing.
Field Summary | |
protected Console |
console
|
protected static boolean |
debug
|
protected Editor |
editor
|
protected boolean |
ready
|
protected static java.lang.String |
versionString
|
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
Command(Editor editor)
the default constructor for all Command objects, belonging to an HADES editor. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
cancel()
|
static void |
dbg(java.lang.String msg)
|
void |
execute()
perform the action corresponding to this Command object and register it with the UndoStack. |
java.lang.String |
getDescription()
|
java.lang.String |
getLogExtraArguments()
return a text-encoding of any extra argument we might want to use for LogManager. |
boolean |
initialize(java.lang.String s)
|
boolean |
isReady()
check whether the current Command object is ready (has all required parameters, etc.). |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
message(java.lang.String msg)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(FigCanvasEvent e)
process a mouse event ME at world coordinates WP and screen coords SP |
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
setPosition(java.awt.Point SP,
java.awt.Point WP)
the following method is used to pass the (snapped!) coordinates of an MouseEvent to a Command object. |
void |
statusMessage(java.lang.String msg)
|
java.lang.String |
toString()
|
void |
undo()
try to undo the action corresponding to this Command object. |
void |
writePositionLogMessage(java.awt.Point SP,
java.awt.Point WP)
|
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 |
protected boolean ready
protected Editor editor
protected static java.lang.String versionString
protected static boolean debug
protected Console console
Constructor Detail |
public Command(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 boolean isReady()
As long as the Command object tells the Editor that it is not ready, all relevant (=registered) Events will be delivered to the Command object.
public void execute()
public void undo()
public void cancel()
public boolean initialize(java.lang.String s)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void mousePressed(FigCanvasEvent e)
FigCanvasListener
mousePressed
in interface FigCanvasListener
public void setPosition(java.awt.Point SP, java.awt.Point WP)
public void writePositionLogMessage(java.awt.Point SP, java.awt.Point WP)
public void statusMessage(java.lang.String msg)
public java.lang.String toString()
public java.lang.String getDescription()
public java.lang.String getLogExtraArguments()
public void message(java.lang.String msg)
public static void dbg(java.lang.String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |