java.lang.Object
de.grogra.pf.ui.edit.SelectionBase
de.grogra.pf.ui.edit.GraphSelectionImpl
- All Implemented Interfaces:
GraphSelection
,Selection
,Described
-
Field Summary
Fields inherited from class de.grogra.pf.ui.edit.SelectionBase
context
Fields inherited from interface de.grogra.util.Described
ACCELERATOR_KEY, ICON, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, TITLE
Fields inherited from interface de.grogra.pf.ui.edit.Selection
DELETABLE, HIERARCHICAL, TRANSFERABLE
-
Constructor Summary
ConstructorDescriptionGraphSelectionImpl
(Context ctx, GraphState[] states, Object[] objects, boolean[] isNode) GraphSelectionImpl
(Context ctx, GraphState state, Object obj, boolean asNode) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected PropertyEditorTree.Node
createPropertyNodes
(PropertyEditorTree t, Property p, UITree sourceTree, Object sourceNode) protected PropertyEditorTree.Node
createPropertyNodesInGroup
(PropertyEditorTree t, Property p, UITree sourceTree, Object sourceGroup) protected PropertyEditorTree
void
delete
(boolean includeChildren) Deletes this selection.boolean
int
Returns the capabilities of this selection.getDescription
(String type) Returns the description associated with the giventype
.protected PropertyEditor
getEditorFor
(Property p, Item item) getGraphState
(int i) protected UITree
protected Object
getHierarchySourceRoot
(UITree source) protected String
getObject
(int i) protected List
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 Details
-
GraphSelectionImpl
-
GraphSelectionImpl
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceGraphSelection
-
getGraphState
- Specified by:
getGraphState
in interfaceGraphSelection
-
getObject
- Specified by:
getObject
in interfaceGraphSelection
-
isNode
public boolean isNode(int i) - Specified by:
isNode
in interfaceGraphSelection
-
contains
- Specified by:
contains
in interfaceGraphSelection
-
equals
-
getDescription
Description copied from interface:Described
Returns the description associated with the giventype
.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 interfaceDescribed
- Parameters:
type
- the type of description- Returns:
- the description, or
null
if no description is available
-
getEditorFor
- Overrides:
getEditorFor
in classSelectionBase
-
getHierarchySource
- Specified by:
getHierarchySource
in classSelectionBase
-
getHierarchySourceRoot
- Specified by:
getHierarchySourceRoot
in classSelectionBase
-
createTree
- Specified by:
createTree
in classSelectionBase
-
createPropertyNodes
protected PropertyEditorTree.Node createPropertyNodes(PropertyEditorTree t, Property p, UITree sourceTree, Object sourceNode) - Specified by:
createPropertyNodes
in classSelectionBase
-
createPropertyNodesInGroup
protected PropertyEditorTree.Node createPropertyNodesInGroup(PropertyEditorTree t, Property p, UITree sourceTree, Object sourceGroup) - Specified by:
createPropertyNodesInGroup
in classSelectionBase
-
getLabelFor
- Specified by:
getLabelFor
in classSelectionBase
-
getProperties
- Specified by:
getProperties
in classSelectionBase
-
getCapabilities
public int getCapabilities()Description copied from interface:Selection
Returns the capabilities of this selection. The returned value is a combination of the flagsSelection.TRANSFERABLE
,Selection.DELETABLE
,Selection.HIERARCHICAL
.- Specified by:
getCapabilities
in interfaceSelection
- Overrides:
getCapabilities
in classSelectionBase
- Returns:
- this selection's capabilities
-
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 capabilitySelection.DELETABLE
.- Specified by:
delete
in interfaceSelection
- Overrides:
delete
in classSelectionBase
- Parameters:
includeChildren
-true
iff children in the hierarchy shall be included
-