com.tensegrity.skeleton.commands
Class OpenCommand

java.lang.Object
  extended bycom.tensegrity.generic.command.BaseCommand
      extended bycom.tensegrity.skeleton.commands.CommonBaseCommand
          extended bycom.tensegrity.skeleton.commands.DocumentCommand
              extended bycom.tensegrity.skeleton.commands.AbstractOpenCommand
                  extended bycom.tensegrity.skeleton.commands.OpenCommand
All Implemented Interfaces:
Command

public class OpenCommand
extends AbstractOpenCommand

This Command opens an existing GraphDocument and adds it to the MDIComponent of the application.

This class uses a GraphFileChooserDialog to allow users to choose a document to open.

Version:
$Id: OpenCommand.java,v 1.41 2005/12/12 13:23:39 BurkhardWick Exp $
Author:
MichaelKegel, Gilles Iachelini, Stepan RUtz

Field Summary
protected  RuleFeedback rulefeedback
          rulefeedback sink, that displays rule operation results
 
Constructor Summary
OpenCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Constructor for the OpenCommand.
 
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 com.tensegrity.skeleton.commands.AbstractOpenCommand
isEnabled
 
Methods inherited from class com.tensegrity.skeleton.commands.DocumentCommand
getDocument, 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
 

Field Detail

rulefeedback

protected RuleFeedback rulefeedback
rulefeedback sink, that displays rule operation results

Constructor Detail

OpenCommand

public OpenCommand(ApplicationFrame applicationFrame,
                   java.lang.String command)
Constructor for the OpenCommand.

Parameters:
applicationFrame - Application context of this command.
command - the ID of this command.
Method Detail

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.