java.lang.Object
de.grogra.graph.GraphBase
de.grogra.graph.GraphFilter
de.grogra.graph.AttributeOverwritingFilter
de.grogra.imp2d.graphs.TopologyGraph
- All Implemented Interfaces:
AttributeChangeListener
,ChangeBoundaryListener
,EdgeChangeListener
,Graph
,EventListener
,Lockable
,EventListener
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.graph.GraphFilter
GraphFilter.AccessorBridge, GraphFilter.State
Nested classes/interfaces inherited from interface de.grogra.util.EventListener
EventListener.Bicast, EventListener.Multicaster
Nested classes/interfaces inherited from interface de.grogra.util.Lockable
Lockable.DeadLockException
-
Field Summary
Fields inherited from class de.grogra.graph.GraphFilter
source
Fields inherited from interface de.grogra.graph.ChangeBoundaryListener
ATTRIBUTE_PRIORITY, TOPOLOGY_PRIORITY, UPDATE_PRIORITY
Fields inherited from interface de.grogra.graph.Graph
BRANCH_EDGE, CONTAINMENT_EDGE, CONTAINMENT_END_EDGE, EDGENODE_IN_EDGE, EDGENODE_OUT_EDGE, ELLIPSE_SYMBOL, IGNORED_EDGE, INSTANTIATION_EDGE, MAIN_GRAPH, MARK_EDGE, MIN_NORMAL_BIT_INDEX, MIN_UNUSED_EDGE, MIN_UNUSED_EDGE_BIT, NOTIFIES_EDGE, PERSISTENT, PERSISTENT_DELETED, RECTANGLE_SYMBOL, REFINEMENT_EDGE, RHOMBUS_SYMBOL, ROUND_RECTANGLE_SYMBOL, SPECIAL_EDGE_MASK, SPECIAL_EDGE_OF_SOURCE_BIT, STD_EDGE_5, STD_EDGE_6, SUCCESSOR_EDGE, TRANSIENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
collapseAll
(Item item, Object info, Context ctx) Method called through GUI.void
collapseSome
(Node root, int maxChildren) protected GraphState
void
eventOccured
(EventObject event) This method is invoked on registered event listeners whenevent
has occured.static void
Method called through GUI.protected boolean
getBoolean
(Object object, GraphFilter.AccessorBridge accessor, GraphState gs) This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
.protected ObjectData
getData
(Object object, boolean asNode, GraphState gs) getDependent
(Object object, boolean asNode, Attribute a) Returns the set of attributes whose values depend on the given attributea
for the givenobject
.protected Attribute[]
getDependentOfSource
(Object object, boolean asNode, Attribute a) int
getEdgeBits
(Object edge) Returns the edge bits of an edge.protected float
getFloat
(Object object, GraphFilter.AccessorBridge accessor, GraphState gs) This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
.protected int
getInt
(Object object, GraphFilter.AccessorBridge accessor, GraphState gs) This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
.int
getLifeCycleState
(Object object, boolean asNode) Returns the life cycle state of the given object as part of this graph.protected Object
getObject
(Object object, GraphFilter.AccessorBridge accessor, Object placeIn, GraphState gs) This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
.Defines the derived attribute which has as value the parent object.Returns the root node for the given root key.Defines the pattern used for the construction of this graph's tree.protected void
initEdgeAccessors
(AccessorMap edgeAccessors) Additional (possibly overwritten) attributes for edges have to be declared in subclasses by overriding this method.protected void
initNodeAccessors
(AccessorMap nodeAccessors) Additional (possibly overwritten) attributes for nodes have to be declared in subclasses by overriding this method.static void
protected boolean
isWritable
(Object object, GraphFilter.AccessorBridge accessor, GraphState gs) GraphFilter.AccessorBridge
forwards the invocation ofAttributeAccessor.isWritable(Object, GraphState)
to this method.protected Object
setObject
(Object object, GraphFilter.AccessorBridge accessor, Object value, GraphState gs) This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by anGraphFilter.AccessorBridge
.Methods inherited from class de.grogra.graph.AttributeOverwritingFilter
accept, getAccessor, getAttributes, getByte, getChar, getDouble, getLong, getShort, initAttributeOverwritingFilter, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort
Methods inherited from class de.grogra.graph.GraphFilter
accept, attributeChanged, beginChange, createBooleanMap, createMainState, createObjectMap, edgeChanged, endChange, getColor, getDescription, getFirstEdge, getId, getInstantiator, getName, getNextEdge, getNodeForId, getObjectForName, getPriority, getRootKeys, getSourceNode, getSourceState, getSpecialEdgeDescriptors, getStamp, getSymbol, getTargetNode
Methods inherited from class de.grogra.graph.GraphBase
addAttributeChangeListener, addAttributeChangeListener, addChangeBoundaryListener, addEdgeChangeListener, addEdgeChangeListener, execute, execute, executeForcedly, executeForcedly, getMainState, getMaxWaitingTime, getQueueLength, getStateMap, init, isLocked, removeAttributeChangeListener, removeAttributeChangeListener, removeChangeBoundaryListener, removeEdgeChangeListener, removeEdgeChangeListener
-
Constructor Details
-
TopologyGraph
-
-
Method Details
-
initNodes
-
initNodeAccessors
Description copied from class:AttributeOverwritingFilter
Additional (possibly overwritten) attributes for nodes have to be declared in subclasses by overriding this method. For each overwritten attribute, a suitable accessor has to be added toaccessors
. Instances ofGraphFilter.AccessorBridge
may be used for this purpose.- Overrides:
initNodeAccessors
in classAttributeOverwritingFilter
- Parameters:
nodeAccessors
- set of node accessors
-
initEdgeAccessors
Description copied from class:AttributeOverwritingFilter
Additional (possibly overwritten) attributes for edges have to be declared in subclasses by overriding this method. For each overwritten attribute, a suitable accessor has to be added toaccessors
. Instances ofGraphFilter.AccessorBridge
may be used for this purpose.- Overrides:
initEdgeAccessors
in classAttributeOverwritingFilter
- Parameters:
edgeAccessors
- set of node accessors
-
getDependent
Description copied from interface:Graph
Returns the set of attributes whose values depend on the given attributea
for the givenobject
.- Specified by:
getDependent
in interfaceGraph
- Overrides:
getDependent
in classGraphFilter
- Parameters:
object
- the objectasNode
-true
ifobject
is a node,false
ifobject
is an edgea
- the attribute- Returns:
- the set of dependent attributes
-
getDependentOfSource
- Overrides:
getDependentOfSource
in classGraphFilter
-
isWritable
Description copied from class:GraphFilter
GraphFilter.AccessorBridge
forwards the invocation ofAttributeAccessor.isWritable(Object, GraphState)
to this method. This method has to be overridden by subclasses which declare a writable attribute by an accessor bridge.- Overrides:
isWritable
in classGraphFilter
- Parameters:
object
- an objectaccessor
- an accessor bridgegs
- current graph state- Returns:
true
iffaccessor
represents a writable attribute
-
createState
- Overrides:
createState
in classGraphFilter
-
getObject
protected Object getObject(Object object, GraphFilter.AccessorBridge accessor, Object placeIn, GraphState gs) Description copied from class:AttributeOverwritingFilter
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
. The default implementation returns the value ofaccessor
's attribute in the source graph.- Overrides:
getObject
in classAttributeOverwritingFilter
- Parameters:
object
- the objectaccessor
- the accessor bridge which invokes this methodplaceIn
- an instance for the result may be provided by the callergs
- current graph state- Returns:
- value of the accessor's attribute for the object
-
getInt
Description copied from class:AttributeOverwritingFilter
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
. The default implementation returns the value ofaccessor
's attribute in the source graph.- Overrides:
getInt
in classAttributeOverwritingFilter
- Parameters:
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state- Returns:
- value of the accessor's attribute for the object
-
getFloat
Description copied from class:AttributeOverwritingFilter
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
. The default implementation returns the value ofaccessor
's attribute in the source graph.- Overrides:
getFloat
in classAttributeOverwritingFilter
- Parameters:
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state- Returns:
- value of the accessor's attribute for the object
-
getBoolean
Description copied from class:AttributeOverwritingFilter
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by anGraphFilter.AccessorBridge
. The default implementation returns the value ofaccessor
's attribute in the source graph.- Overrides:
getBoolean
in classAttributeOverwritingFilter
- Parameters:
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state- Returns:
- value of the accessor's attribute for the object
-
getData
-
setObject
protected Object setObject(Object object, GraphFilter.AccessorBridge accessor, Object value, GraphState gs) Description copied from class:AttributeOverwritingFilter
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by anGraphFilter.AccessorBridge
. The default implementation sets the value ofaccessor
's attribute in the source graph.- Overrides:
setObject
in classAttributeOverwritingFilter
- Parameters:
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state- Returns:
- actual new value of the attribute
-
getEdgeBits
Description copied from interface:Graph
Returns the edge bits of an edge.- Specified by:
getEdgeBits
in interfaceGraph
- Overrides:
getEdgeBits
in classGraphFilter
- Parameters:
edge
- the edge- Returns:
- the edge's edge bits
- See Also:
-
getParentAttribute
Description copied from interface:Graph
Defines the derived attribute which has as value the parent object.- Specified by:
getParentAttribute
in interfaceGraph
- Overrides:
getParentAttribute
in classGraphFilter
- Returns:
- the parent attribute
- See Also:
-
getTreePattern
Description copied from interface:Graph
Defines the pattern used for the construction of this graph's tree.- Specified by:
getTreePattern
in interfaceGraph
- Overrides:
getTreePattern
in classGraphFilter
- Returns:
- an edge pattern
- See Also:
-
getRoot
Description copied from interface:Graph
Returns the root node for the given root key.- Specified by:
getRoot
in interfaceGraph
- Overrides:
getRoot
in classGraphFilter
- Parameters:
key
- a root key, one ofGraph.getRootKeys()
- Returns:
- the root node of the graph identified by
key
, ornull
if no such root node exists - See Also:
-
getLifeCycleState
Description copied from interface:Graph
Returns the life cycle state of the given object as part of this graph.- Specified by:
getLifeCycleState
in interfaceGraph
- Overrides:
getLifeCycleState
in classGraphFilter
- Parameters:
object
- the object to testasNode
-true
ifobject
is a node,false
ifobject
is an edge- Returns:
- life cycle state, one of
Graph.PERSISTENT
,Graph.PERSISTENT_DELETED
,Graph.TRANSIENT
-
eventOccured
Description copied from interface:EventListener
This method is invoked on registered event listeners whenevent
has occured. This general listener interface does not restrict the possible kinds of events. Concrete sources of events should specify which events they may fire.- Specified by:
eventOccured
in interfaceEventListener
- Parameters:
event
- an event
-
collapseSome
-
collapseAll
Method called through GUI. Set all nodes except root node to collapse list.- Parameters:
item
-info
-ctx
-
-
expandAll
Method called through GUI. Remove all nodes from collapse list.- Parameters:
item
-info
-ctx
-
-