com.tensegrity.skeleton.swt.commands
Class SwtOpenCommand
java.lang.Object
com.tensegrity.generic.command.BaseCommand
com.tensegrity.skeleton.commands.CommonBaseCommand
com.tensegrity.skeleton.commands.DocumentCommand
com.tensegrity.skeleton.commands.AbstractOpenCommand
com.tensegrity.skeleton.swt.commands.SwtOpenCommand
- All Implemented Interfaces:
- Command
- public class SwtOpenCommand
- extends AbstractOpenCommand
This command, to be used within applications in a SWT context, opens an
existing GraphDocument
and adds it to the MDIComponent of the
application.
This class uses a
SwtGraphFileChooserDialog
to allow users to choose a document to open, and most of the work is
delegated to the
ApplicationFrame.openDocument(File)
method.
- Version:
- $Id: SwtOpenCommand.java,v 1.10 2005/12/08 16:34:35 ArndHouben Exp $
- Author:
- Sebastien Guyon
|
Method Summary |
protected boolean |
doValidateDocument(GraphDocument document)
Utility method which subclasses can overwrite in order to control the
document creation. |
void |
perform(java.lang.Object args)
Updates the StatusBar with this commands title string.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwtOpenCommand
public SwtOpenCommand(ApplicationFrame applicationFrame,
java.lang.String command)
- Constructor for the
SwtOpenCommand.
- Parameters:
applicationFrame - Application context of this command.command - the ID of this command.
doValidateDocument
protected boolean doValidateDocument(GraphDocument document)
- Description copied from class:
AbstractOpenCommand
- Utility method which subclasses can overwrite in order to control the
document creation. This method is called as soon as the
GraphDocument is created and before it is added
to the MDI component.
- Specified by:
doValidateDocument in class AbstractOpenCommand
- Parameters:
document -
- Returns:
- true if the passed
GraphDocument is considered as
valid, false otherwise.
perform
public void perform(java.lang.Object args)
- Description copied from class:
CommonBaseCommand
- Updates the StatusBar with this commands title string.
(non-Javadoc)
- Specified by:
perform in interface Command- Overrides:
perform in class CommonBaseCommand
- See Also:
Command.perform(java.lang.Object)
Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.