|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractCommand
public abstract class AbstractCommand
Nested Class Summary | |
---|---|
static class |
AbstractCommand.EventDispatcher
|
Constructor Summary | |
---|---|
AbstractCommand(java.lang.String newName,
DrawingEditor newDrawingEditor)
Constructs a command with the given name that applies to the given view. |
|
AbstractCommand(java.lang.String newName,
DrawingEditor newDrawingEditor,
boolean newIsViewRequired)
|
Method Summary | |
---|---|
void |
addCommandListener(CommandListener newCommandListener)
|
void |
dispose()
Releases resources associated with this command |
void |
execute()
Executes the command. |
void |
figureSelectionChanged(DrawingView view)
Sent when the figure selection has changed. |
DrawingEditor |
getDrawingEditor()
|
Undoable |
getUndoActivity()
|
boolean |
isExecutable()
Tests if the command can be executed. |
java.lang.String |
name()
Gets the command name. |
void |
removeCommandListener(CommandListener oldCommandListener)
|
void |
setName(java.lang.String newName)
|
void |
setUndoActivity(Undoable newUndoableActivity)
|
DrawingView |
view()
Convenience method |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCommand(java.lang.String newName, DrawingEditor newDrawingEditor)
newName
- java.lang.StringnewDrawingEditor
- the DrawingEditor which manages the viewspublic AbstractCommand(java.lang.String newName, DrawingEditor newDrawingEditor, boolean newIsViewRequired)
Method Detail |
---|
public void figureSelectionChanged(DrawingView view)
FigureSelectionListener
figureSelectionChanged
in interface FigureSelectionListener
view
- a DrawingViewpublic DrawingEditor getDrawingEditor()
getDrawingEditor
in interface Command
public DrawingView view()
public java.lang.String name()
name
in interface Command
public void setName(java.lang.String newName)
public void dispose()
public void execute()
execute
in interface Command
public boolean isExecutable()
isExecutable
in interface Command
public Undoable getUndoActivity()
getUndoActivity
in interface Command
public void setUndoActivity(Undoable newUndoableActivity)
setUndoActivity
in interface Command
public void addCommandListener(CommandListener newCommandListener)
addCommandListener
in interface Command
public void removeCommandListener(CommandListener oldCommandListener)
removeCommandListener
in interface Command
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |