|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.util.MenuSeparatorCommand
public final class MenuSeparatorCommand
Provides a command to serve as a separator in a list of commands.
Since separators are just place-holders without any state of their
own, i.e one separator is exactly the same as another, this class is
implemented using the Singleton Design Pattern. This means that
there will be at most one instance of this class created, and
that access to the instance must be through a special method
called instance() rather than through the standard
constructor.
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns super.clone(). |
void |
execute(java.lang.Object arg)
Does nothing. |
com.sas.util.Command[] |
getCommands()
Returns a zero-length array. |
java.lang.String |
getText()
Returns the empty string. |
static MenuSeparatorCommand |
instance()
Returns an instance of this class. |
boolean |
isExecutable()
Returns false. |
boolean |
isSeparator()
Returns true. |
boolean |
isUndoable()
Returns false. |
void |
setText(java.lang.String newValue)
Does nothing. |
void |
undo()
Does nothing. |
| Method Detail |
|---|
public static MenuSeparatorCommand instance()
public boolean isSeparator()
true.
isSeparator in interface MenuCommandpublic boolean isExecutable()
false.
isExecutable in interface com.sas.util.Commandpublic boolean isUndoable()
false.
isUndoable in interface com.sas.util.Commandpublic void undo()
undo in interface com.sas.util.Command
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonableclone in interface com.sas.util.Commandclone in class java.lang.Objectjava.lang.CloneNotSupportedException - Propagated from super.clone().public com.sas.util.Command[] getCommands()
getCommands in interface CommandsInterfacepublic void execute(java.lang.Object arg)
execute in interface com.sas.util.SimpleCommandpublic java.lang.String getText()
getText in interface com.sas.lang.StringDataInterfacepublic void setText(java.lang.String newValue)
setText in interface com.sas.lang.StringDataInterface
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||