com.tensegrity.skeleton.commands
Class NewDocumentCommand

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.NewDocumentCommand
All Implemented Interfaces:
Command

public class NewDocumentCommand
extends DocumentCommand

This Command creates a new GraphDocument instance and adds it to the MDIComponent of the application.

Version:
$Id: NewDocumentCommand.java,v 1.65 2005/12/16 09:07:16 BurkhardWick Exp $
Author:
MichaelKegel, Gilles Iachelini, Stepan RUtz

Constructor Summary
NewDocumentCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Creates a new NewDocumentCommand.
 
Method Summary
 GraphDocument getRecentDocument()
          Returns the most recently created GraphDocument or null if none was ever created by this instance.
 GraphDocument newDocument()
          Returns a new GraphDocument.
 GraphDocument newDocument(Graph graph)
          Returns a new GraphDocument for the a given Graph.
 void perform(java.lang.Object args)
          Updates the StatusBar with this commands title string.
 
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, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewDocumentCommand

public NewDocumentCommand(ApplicationFrame applicationFrame,
                          java.lang.String command)
Creates a new NewDocumentCommand.

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

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)

getRecentDocument

public final GraphDocument getRecentDocument()
Returns the most recently created GraphDocument or null if none was ever created by this instance.

Returns:
the most recently created GraphDocument or null.

newDocument

public GraphDocument newDocument()
Returns a new GraphDocument.

Returns:
a new GraphDocument.

newDocument

public GraphDocument newDocument(Graph graph)
Returns a new GraphDocument for the a given Graph.

Parameters:
graph - the Graph the document is based upon
Returns:
the newly created GraphDocument.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.