|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.command.BaseCommand
com.tensegrity.skeleton.commands.CommonBaseCommand
com.tensegrity.skeleton.swt.commands.SwtCommonBaseCommand
com.tensegrity.skeleton.swt.commands.SwtDocumentCommand
com.tensegrity.skeleton.swt.commands.SwtCloseCommand
This command, to be used within applications in a SWT context, closes the
currently active Document.
If this document is modified users may save it before it gets closed.
While by default the perform method closes the active
Document (See
SwtDocumentCommand.getDocument()),
one can use the closeDocument(Document) method in order to close a
specific Document.
| Constructor Summary | |
SwtCloseCommand(ApplicationFrame applicationFrame,
java.lang.String command)
Creates the command used to close the currently active Document. |
|
| Method Summary | |
int |
closeDocument(Document document)
Closes the given document. |
boolean |
isEnabled()
Returns false if SwtDocumentCommand.getDocument() returns
null, true otherwise. |
void |
perform(java.lang.Object args)
Updates the StatusBar with this commands title string. |
| Methods inherited from class com.tensegrity.skeleton.swt.commands.SwtDocumentCommand |
getDocument |
| Methods inherited from class com.tensegrity.skeleton.swt.commands.SwtCommonBaseCommand |
getGraphApplication, newGraphDocumentFromFactory |
| Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand |
getApplicationFrame, getTitle |
| Methods inherited from class com.tensegrity.generic.command.BaseCommand |
getDescription, getId, getPerformDescription, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwtCloseCommand(ApplicationFrame applicationFrame,
java.lang.String command)
Document.
applicationFrame - Application context for this command.command - the ID of this command.| Method Detail |
public void perform(java.lang.Object args)
CommonBaseCommand
perform in interface Commandperform in class CommonBaseCommandCommand.perform(java.lang.Object)public boolean isEnabled()
SwtDocumentCommandfalse if SwtDocumentCommand.getDocument() returns
null, true otherwise.
isEnabled in interface CommandisEnabled in class SwtDocumentCommandfalse if SwtDocumentCommand.getDocument() returns
null, true otherwise.Command.isEnabled()public int closeDocument(Document document)
GraphDocument. If the document is modified users may save it
before activating the close.
document - the document instance to close.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||