public class TriangleSubgraph extends FigureSubgraph
TriangleSubgraph#setReferenceHeight(double)
(default is 50).TriangleSubgraph
#setReferenceBase(double)
(default is 50) and for a subtree
containing only one leaf the base has length 1.TreeLayoutObserver
is created for the context. It must keep track of
changes in the graph structure, so events related to it should not be
intercepted by other listeners before they reach the subgraph's observer.Modifier and Type | Class and Description |
---|---|
static class |
TriangleSubgraph.TriangleParameters |
FigureSubgraph.SubgraphFigrueListener
DefaultSubgraph.DefaultSubgraphFactory, DefaultSubgraph.LabelSubgraphFactory, DefaultSubgraph.PrunedSuccessorsSubgraphFactory, DefaultSubgraph.TriangleSubgraphFactory
figure
context, disposed, nodes
Constructor and Description |
---|
TriangleSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes,
org.eclipse.gef4.layout.interfaces.LayoutContext context,
TriangleSubgraph.TriangleParameters triangleParameters) |
Modifier and Type | Method and Description |
---|---|
protected void |
createFigure()
Creates a figure for this subgraph and stores it in
FigureSubgraph.figure . |
boolean |
isDirectionDependant() |
void |
setColor(Color color)
Changes the color of the triangle visualizing this subgraph.
|
void |
setDirection(int direction) |
protected void |
updateFigure()
Updates the figure stored in
FigureSubgraph.figure depending on current nodes
contained in this subgraph. |
addNodes, applyLayoutChanges, dispose, getFigure, getLocation, getPredecessingEntities, getSize, getSuccessingEntities, isGraphEntity, isMovable, refreshLocation, removeNodes, setLocation
countNodes, getItems, getNodes, getPreferredAspectRatio, getProperty, isResizable, refreshConnectionsVisibility, refreshSize, setProperty, setSize
public TriangleSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes, org.eclipse.gef4.layout.interfaces.LayoutContext context, TriangleSubgraph.TriangleParameters triangleParameters)
protected void createFigure()
FigureSubgraph
FigureSubgraph.figure
.
This method may not be called right after creation of the subgraph but
later when the figure is actually needed (lazy initialization).createFigure
in class FigureSubgraph
protected void updateFigure()
FigureSubgraph
FigureSubgraph.figure
depending on current nodes
contained in this subgraph. If this method creates a new instance of
IFigure, it should remember to add a FigureSubgraph.SubgraphFigrueListener
to
it.updateFigure
in class FigureSubgraph
public boolean isDirectionDependant()
isDirectionDependant
in interface org.eclipse.gef4.layout.interfaces.SubgraphLayout
isDirectionDependant
in class DefaultSubgraph
public void setDirection(int direction)
setDirection
in interface org.eclipse.gef4.layout.interfaces.SubgraphLayout
setDirection
in class DefaultSubgraph
public void setColor(Color color)
color
- color to useCopyright (c) 2014 itemis AG and others. All rights reserved.