|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
VisualSubgraph are the view counterparts to the
Subgraph objects in the graph model package. At the same
time they are derived from the VisualNode
interface and thus allow nesting of (visual-)subgraphs within graphs.
Since VisualSubgraphs are actually
VisualNodes they can be added to
VisualGraphs and to
VisualSubgraphs as well.
Additionally the implement the CompositeGroup
interface and functionality. This means VisualSubgraphs can
have their own active selections, coordinate systems and serve as
containers for Composite and
CompositeGroups.
This interface defines a VisualSubGraph. Such a subgraph
is nested within a top-level VisualGraphView and represents
a VisualGraph object of its own.
VisualPorts to the enclosing VisualGraph instances are
internally managed by the folding functions and allow to group/ungroup
VisualSubgraphs without loss of information.
The behavior that is specified in
Graph concerning the adding
and removing of Nodes and
Edges applies to any
Subgraph as well.
Several methods in this interface specification are inherited from
the more generic super-interface
VisualGraphObjectContainer, which allows
generic handling of both VisualGraphs and
VisualSubgraphs.
VisualGraphObjectContainer,
VisualGraph,
VisualGraphObject,
VisualNode,
VisualEdge,
VisualPort,
VisualGraphView,
Node,
Subgraph,
Composite,
CompositeGroup| Field Summary |
| Fields inherited from interface com.tensegrity.graph.view.VisualNode |
DEFAULT_PORT, DIRECTION_PORT, NO_ARGUMENT, SHORTESTPATH_ARGUMENT, SHORTESTPATH_ARGUMENT_FLAT |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Fields inherited from interface com.tensegrity.graph.layout.LayoutableNode |
BBOXMASK_INCLUDE_ALL, BBOXMASK_INCLUDE_EXTERNALS_ALL, BBOXMASK_INCLUDE_EXTERNALS_BACK, BBOXMASK_INCLUDE_EXTERNALS_BOTTOM, BBOXMASK_INCLUDE_EXTERNALS_FRONT, BBOXMASK_INCLUDE_EXTERNALS_LEFT, BBOXMASK_INCLUDE_EXTERNALS_RIGHT, BBOXMASK_INCLUDE_EXTERNALS_TOP, BBOXMASK_INCLUDE_MARKER, BBOXMASK_INCLUDE_SHADOW, BBOXMASK_INCLUDE_STROKE |
| Method Summary | |
void |
addVisualGraphListener(VisualGraphListener listener)
Adds the
given by listener to the VisualSubraph's
internal structure. |
boolean |
applyLayout(LayoutService service,
java.lang.String layoutContext,
java.util.List objectsToLayout)
Applies a layout to this VisualSubgraph. |
VisualGraph |
deepCopyVisualGraph(Graph graph)
Returns a deep copy of the subgraphs underlying VisualGraph. |
void |
deleteSelection()
Deletes all currently selected visualgraphobjects. |
CompositeGroup |
getCompositeGroup()
Returns the instance of the CompositeGroup associated to the
VisualSubgraph instance. |
VisualPort |
getInnerVisualPortByID(long id)
API internal method. |
VisualSubgraph |
getParent()
Returns the parent VisualSubgraph or null,
if there is no parent VisualSubgraph that this
instance is nested in. |
Subgraph |
getSubgraph()
Returns the reference to the Subgraph
this VisualSubgraph is associated with. |
VisualPort |
getVisualPortWrapperByInnerVisualNodeAndPortID(VisualNode visualnode,
long portid)
API internal method. |
void |
internalBuildPortWrappers()
API internal method. |
void |
removeVisualGraphListener(VisualGraphListener listener)
Remove the
given by listener from the VisualSubraph's
internal structure. |
void |
removeVisualNode(VisualNode visualnode,
boolean overrideRules)
Removes a visualnode from the graphview. |
void |
verify()
Verify the VisualSubgraph internally. |
| Methods inherited from interface com.tensegrity.graph.view.VisualGraphObject |
deepCopy, getBaseComposite, getGraphObject, getID, getParentContainer, getRootContainer, getRule, getRuleRegistry, getUniqueID, isPinned, registerVetoableVisualEventMediator, registerVisualEventMediator, setPinned, setRule, setRuleRegistry |
| Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree |
| Methods inherited from interface com.tensegrity.generic.attribute.Attributable |
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue |
| Methods inherited from interface com.tensegrity.graph.layout.Layoutable |
getEdgeLayoutContext, getLayoutAttributeSet, getLayoutContext, getNodeLayoutContext, setEdgeLayoutContext, setLayoutAttributes, setLayoutContext, setNodeLayoutContext |
| Methods inherited from interface com.tensegrity.graph.layout.LayoutableNode |
getBoundingBox, getBoundingBox, getLocation, getPortCoordinate, getPortDirection, getPorts, getSize, layout, setLocation |
| Method Detail |
public CompositeGroup getCompositeGroup()
CompositeGroup associated to the
VisualSubgraph instance.
CompositeGroup instancepublic Subgraph getSubgraph()
Subgraph
this VisualSubgraph is associated with.
public VisualSubgraph getParent()
VisualSubgraph or null,
if there is no parent VisualSubgraph that this
instance is nested in.
VisualSubgraph that we are nested in or the
nil-pointer.
public void removeVisualNode(VisualNode visualnode,
boolean overrideRules)
throws IllegalNodeException
VisualSubgraph
for this operation to succeed.
Existing rules that might prevention are
silently ignored by this method.
visualnode - the VisualNode to remove from the
VisualSubgraph.overrideRules - true if rules should not be
applied.
IllegalNodeException - thrown if the VisualNode
is in an illegal state, or if the VisualNode is not in the
VisualSubgraph.VisualNode
public boolean applyLayout(LayoutService service,
java.lang.String layoutContext,
java.util.List objectsToLayout)
VisualSubgraph.
service - the layout service to use.layoutContext - the layout context to use.objectsToLayout - Graphobjects which should be layouted.
true if the layout succeeded, otherwise false.public void deleteSelection()
public VisualGraph deepCopyVisualGraph(Graph graph)
VisualGraph.
VisualGraphpublic void addVisualGraphListener(VisualGraphListener listener)
VisualGraphListener
given by listener to the VisualSubraph's
internal structure. The VisualGraphListener instance is
notified on every event that occurs at the VisualSubgraph
listener - the VisualGraphListener instance to addpublic void removeVisualGraphListener(VisualGraphListener listener)
VisualGraphListener
given by listener from the VisualSubraph's
internal structure. The VisualGraphListener instance is
no longer notified on the events that occurs at the
VisualSubgraph
listener - the VisualGraphListener instance to addpublic VisualPort getInnerVisualPortByID(long id)
id - the visualport-id to look up
VisualPort or null if none
is found.
public VisualPort getVisualPortWrapperByInnerVisualNodeAndPortID(VisualNode visualnode,
long portid)
public void internalBuildPortWrappers()
public void verify()
VisualSubgraph internally. Invoking this method
may be very expensive and should not be done by the client. Consider
this method to be API-Internal.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||