java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.imp.edit.ToolRoot
- All Implemented Interfaces:
Manageable
,PersistenceCapable
,Shareable
,UserFields
,XObject
,Disposable
,Map
,Serializable
- Direct Known Subclasses:
ToolRoot2D
,ToolRoot3D
Instances of this class are used as root nodes of tool graphs for
the interactive manipulation of objects in two- or three-dimensional
views.
- Author:
- Ole Kniemeyer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.graph.impl.Node
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Node.NType
protected Tool
The tool to which this tool node is associated.Fields inherited from class de.grogra.graph.impl.Node
ADDITIONAL_FIELDS, bits, DELETED, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELD, USED_BITS
Fields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
This method is invoked to notify the tool root about modifications of attributes of the tool target.void
executeWithWriteLock
(Command command, EditEvent event) Executes the givencommand
in the main thread of the workbench and with a write-lock on the graph.Returns the target object of the tool.protected boolean
initialize
(Tool tool) Initializes this tool root.boolean
Returnstrue
iff the target object of the tool is a node.Methods inherited from class de.grogra.graph.impl.Node
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupFrom, dupnew, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, findRefinementType, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIgnored, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getNTypeImpl, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getResolution, getShort, getSource, getStamp, getSuccessor, getSymbol, getSymbolColor, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isEncoarseOf, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, newInstance, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExtentIndex, setGraphForDeserialization, setIgnored, setLayer, setMark, setName, setResolution, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplace
Methods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBits
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.grogra.util.Disposable
dispose
Methods inherited from interface de.grogra.persistence.PersistenceCapable
getBitMark, getObjectMark, setBitMark, setObjectMark
-
Field Details
-
tool
The tool to which this tool node is associated. -
$TYPE
-
-
Constructor Details
-
ToolRoot
public ToolRoot()
-
-
Method Details
-
initialize
Initializes this tool root. This method initializes the fieldtool
with the giventool
.- Parameters:
tool
- the tool to which this tool root is associated- Returns:
true
if this tool root actually shall be used for the tool,false
if it shall not be used (e.g., if the actual tool target cannot be manipulated by the tool graph of this tool root).
-
getToolTarget
Returns the target object of the tool.- Returns:
- the target object of the tool
- See Also:
-
isTargetNode
public boolean isTargetNode()Returnstrue
iff the target object of the tool is a node.- Returns:
- is the target object a node?
- See Also:
-
executeWithWriteLock
Executes the givencommand
in the main thread of the workbench and with a write-lock on the graph. Thecontext
-argument of the command'srun
-method will be the givenevent
, thearg
-argument will bethis
.- Parameters:
command
- a command to be executedevent
- the event, it is used asContext
-
attributeChanged
This method is invoked to notify the tool root about modifications of attributes of the tool target.- Parameters:
b
- an array of attributes which have changed
-