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
Constructor
Description
`TriangleSubgraphFactory()`

## Method Summary

Modifier and Type
Method
Description
`SubgraphLayout`
`createSubgraph(NodeLayout[] nodes, LayoutContext context)`
`Color`
`getColor()`
`int`
`getDirection()`
`double`
`getReferenceBase()`
`double`
`getReferenceHeight()`
`void`
`setColor(Color color)`
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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TriangleSubgraphFactory

public TriangleSubgraphFactory()

## Method Details

### createSubgraph

public SubgraphLayout createSubgraph(NodeLayout[] nodes, LayoutContext context)

Specified by:
  `createSubgraph` in interface `SubgraphFactory`

### getColor

public Color getColor()

Returns:
  initial color of triangles created with this factory

### setColor

public void setColor(Color color)
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 be `SubgraphLayout.TOP_DOWN`, `SubgraphLayout.BOTTOM_UP`, `SubgraphLayout.LEFT_RIGHT`, or `SubgraphLayout.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