Package org.eclipse.zest.core.widgets
Class DefaultSubgraph.TriangleSubgraphFactory
java.lang.Object
org.eclipse.zest.core.widgets.DefaultSubgraph.TriangleSubgraphFactory
- All Implemented Interfaces:
SubgraphFactory
- Enclosing class:
DefaultSubgraph
public static class DefaultSubgraph.TriangleSubgraphFactory
extends Object
implements SubgraphFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubgraph
(NodeLayout[] nodes, LayoutContext context) getColor()
int
double
double
void
Changes the default color for newly created subgraphs.void
setDirection
(int direction) Changes the default direction for newly cretaed subgraphs.void
setReferenceBase
(double referenceBase) Sets the maximum base length for the triangle visualizing this subgraph.void
setReferenceHeight
(double referenceHeight) Sets the maximum height for the triangle visualizing this subgraph.
-
Constructor Details
-
TriangleSubgraphFactory
public TriangleSubgraphFactory()
-
-
Method Details
-
createSubgraph
- Specified by:
createSubgraph
in interfaceSubgraphFactory
-
getColor
- Returns:
- initial color of triangles created with this factory
-
setColor
Changes the default color for newly created subgraphs.- Parameters:
color
- color to use
-
getDirection
public int getDirection()- Returns:
- initial direction of triangles created with this factory
-
setDirection
public void setDirection(int direction) Changes the default direction for newly cretaed subgraphs.- Parameters:
direction
- direction to use, can beSubgraphLayout.TOP_DOWN
,SubgraphLayout.BOTTOM_UP
,SubgraphLayout.LEFT_RIGHT
, orSubgraphLayout.RIGHT_LEFT
-
getReferenceHeight
public double getReferenceHeight()- Returns:
- maximum height of triangles created with this factory
-
setReferenceHeight
public void setReferenceHeight(double referenceHeight) Sets the maximum height for the triangle visualizing this subgraph.- Parameters:
referenceHeight
- height to use
-
getReferenceBase
public double getReferenceBase()- Returns:
- maximum base length of triangles created with this factory
-
setReferenceBase
public void setReferenceBase(double referenceBase) Sets the maximum base length for the triangle visualizing this subgraph.- Parameters:
referenceBase
- base length to use
-