|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjimm.datavision.gui.cmd.CommandAdapter
public abstract class CommandAdapter
An abstract adapter class for performing a command. It exists as a
convenience for creating command objects. The perform and undo methods
in this class are empty. redo calls perform.
The getName method provides read-only access to the name
provided at construction time. The setName method does
nothing.
| Field Summary | |
|---|---|
protected java.lang.String |
name
|
| Constructor Summary | |
|---|---|
CommandAdapter(java.lang.String name)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
Returns the name. |
void |
perform()
Performs the command. |
void |
redo()
Redoes the command by calling perform(). |
void |
setName(java.lang.String name)
A command's name is immutable. |
void |
undo()
Undoes the command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
| Constructor Detail |
|---|
public CommandAdapter(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
Nameable
getName in interface Nameablepublic void setName(java.lang.String name)
setName in interface Nameablename - the new namepublic void perform()
perform in interface Commandpublic void undo()
undo in interface Commandpublic void redo()
perform().
redo in interface Command
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||