de.grogra.pf.ui.edit
Class GraphSelectionImpl

java.lang.Object
  extended by de.grogra.pf.ui.edit.SelectionBase
      extended by de.grogra.pf.ui.edit.GraphSelectionImpl
All Implemented Interfaces:
GraphSelection, Selection, Described

public class GraphSelectionImpl
extends SelectionBase
implements GraphSelection


Field Summary
 
Fields inherited from class de.grogra.pf.ui.edit.SelectionBase
context
 
Fields inherited from interface de.grogra.pf.ui.edit.Selection
DELETABLE, HIERARCHICAL, TRANSFERABLE
 
Fields inherited from interface de.grogra.util.Described
ACCELERATOR_KEY, ICON, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, TITLE
 
Constructor Summary
GraphSelectionImpl(Context ctx, GraphState[] states, java.lang.Object[] objects, boolean[] isNode)
           
GraphSelectionImpl(Context ctx, GraphState state, java.lang.Object obj, boolean asNode)
           
 
Method Summary
 boolean contains(Graph graph, java.lang.Object object, boolean asNode)
           
protected  PropertyEditorTree.Node createPropertyNodes(PropertyEditorTree t, Property p, UITree sourceTree, java.lang.Object sourceNode)
           
protected  PropertyEditorTree.Node createPropertyNodesInGroup(PropertyEditorTree t, Property p, UITree sourceTree, java.lang.Object sourceGroup)
           
protected  PropertyEditorTree createTree()
           
 void delete(boolean includeChildren)
          Deletes this selection.
 boolean equals(java.lang.Object o)
           
 int getCapabilities()
          Returns the capabilities of this selection.
 java.lang.Object getDescription(java.lang.String type)
          Returns the description associated with the given type.
protected  PropertyEditor getEditorFor(Property p, Item item)
           
 GraphState getGraphState(int i)
           
protected  UITree getHierarchySource()
           
protected  java.lang.Object getHierarchySourceRoot(UITree source)
           
protected  java.lang.String getLabelFor(Property p)
           
 java.lang.Object getObject(int i)
           
protected  java.util.List getProperties(PropertyEditorTree tree)
           
 boolean isNode(int i)
           
 int size()
           
 
Methods inherited from class de.grogra.pf.ui.edit.SelectionBase
createPropertyEditorComponent, createPropertyEditorMenu, createPropertyNodes, getContext, remove, toTransferable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.pf.ui.edit.Selection
createPropertyEditorComponent, createPropertyEditorMenu, getContext, toTransferable
 

Constructor Detail

GraphSelectionImpl

public GraphSelectionImpl(Context ctx,
                          GraphState[] states,
                          java.lang.Object[] objects,
                          boolean[] isNode)

GraphSelectionImpl

public GraphSelectionImpl(Context ctx,
                          GraphState state,
                          java.lang.Object obj,
                          boolean asNode)
Method Detail

contains

public boolean contains(Graph graph,
                        java.lang.Object object,
                        boolean asNode)
Specified by:
contains in interface GraphSelection

createPropertyNodes

protected PropertyEditorTree.Node createPropertyNodes(PropertyEditorTree t,
                                                      Property p,
                                                      UITree sourceTree,
                                                      java.lang.Object sourceNode)
Specified by:
createPropertyNodes in class SelectionBase

createPropertyNodesInGroup

protected PropertyEditorTree.Node createPropertyNodesInGroup(PropertyEditorTree t,
                                                             Property p,
                                                             UITree sourceTree,
                                                             java.lang.Object sourceGroup)
Specified by:
createPropertyNodesInGroup in class SelectionBase

createTree

protected PropertyEditorTree createTree()
Specified by:
createTree in class SelectionBase

delete

public void delete(boolean includeChildren)
Description copied from interface: Selection
Deletes this selection. The precise semantics of deletion depends on the selection. This method is only invoked if this selection has the capability Selection.DELETABLE.

Specified by:
delete in interface Selection
Overrides:
delete in class SelectionBase
Parameters:
includeChildren - true iff children in the hierarchy shall be included

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getCapabilities

public int getCapabilities()
Description copied from interface: Selection
Returns the capabilities of this selection. The returned value is a combination of the flags Selection.TRANSFERABLE, Selection.DELETABLE, Selection.HIERARCHICAL.

Specified by:
getCapabilities in interface Selection
Overrides:
getCapabilities in class SelectionBase
Returns:
this selection's capabilities

getDescription

public java.lang.Object getDescription(java.lang.String type)
Description copied from interface: Described
Returns the description associated with the given type. type has to be one of the predefined constants of this interface, the returned value has to conform to the specification of the used constant.

Specified by:
getDescription in interface Described
Parameters:
type - the type of description
Returns:
the description, or null if no description is available

getEditorFor

protected PropertyEditor getEditorFor(Property p,
                                      Item item)
Overrides:
getEditorFor in class SelectionBase

getGraphState

public GraphState getGraphState(int i)
Specified by:
getGraphState in interface GraphSelection

getHierarchySource

protected UITree getHierarchySource()
Specified by:
getHierarchySource in class SelectionBase

getHierarchySourceRoot

protected java.lang.Object getHierarchySourceRoot(UITree source)
Specified by:
getHierarchySourceRoot in class SelectionBase

getLabelFor

protected java.lang.String getLabelFor(Property p)
Specified by:
getLabelFor in class SelectionBase

getObject

public java.lang.Object getObject(int i)
Specified by:
getObject in interface GraphSelection

getProperties

protected java.util.List getProperties(PropertyEditorTree tree)
Specified by:
getProperties in class SelectionBase

isNode

public boolean isNode(int i)
Specified by:
isNode in interface GraphSelection

size

public int size()
Specified by:
size in interface GraphSelection