com.tensegrity.skeleton.commands
Class GraphDocumentSelectionCommand

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.GraphDocumentCommand
                  extended bycom.tensegrity.skeleton.commands.EditGraphDocumentCommand
                      extended bycom.tensegrity.skeleton.commands.GraphDocumentSelectionCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AbstractAlignCommand, CopyCommand, CutCommand, DeleteCommand, GroupSelectionCommand, MoveBackwardCommand, MoveForwardCommand, ShapeFormatCommand, SwtInsertCustomAttributesCommand, SwtShapeFormatCommand, TableCommand, ToBackCommand, ToFrontCommand, UngroupSelectionCommand

public abstract class GraphDocumentSelectionCommand
extends EditGraphDocumentCommand

This abstract Command base class requires an open valid GraphDocument selection and provides functionality for all derived selection-related Command classes.

Version:
$Id: GraphDocumentSelectionCommand.java,v 1.16 2005/06/06 10:22:46 BurkhardWick Exp $
Author:
GillesIachelini

Constructor Summary
GraphDocumentSelectionCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Creates the GraphDocumentSelectionCommand.
 
Method Summary
protected  java.util.List getSelection()
          Returns a List that reflects the current selection of the active document.
protected  boolean hasSelection()
          Returns a boolean that indicates whether a graph element is selected or not.
 boolean isEnabled()
          Checks if there is something selected in the current document.
 
Methods inherited from class com.tensegrity.skeleton.commands.GraphDocumentCommand
getGraphDocument, getVisualGraphView
 
Methods inherited from class com.tensegrity.skeleton.commands.DocumentCommand
getDocument, getGraphApplication, newGraphDocumentFromFactory
 
Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand
getApplicationFrame, getTitle, perform
 
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

GraphDocumentSelectionCommand

public GraphDocumentSelectionCommand(ApplicationFrame applicationFrame,
                                     java.lang.String command)
Creates the GraphDocumentSelectionCommand.

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

isEnabled

public boolean isEnabled()
Checks if there is something selected in the current document.

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class EditGraphDocumentCommand
See Also:
EditGraphDocumentCommand.isEnabled()

hasSelection

protected boolean hasSelection()
Returns a boolean that indicates whether a graph element is selected or not.

Returns:
boolean flag that indicates whether there is a graph element selected or not

getSelection

protected java.util.List getSelection()
Returns a List that reflects the current selection of the active document. Elements that are not graph element are not part of the list.

Returns:
List the selection of the active document.


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