org.eclipse.gef4.zest.core.widgets

## Class DefaultSubgraph.TriangleSubgraphFactory

- java.lang.Object
- - org.eclipse.gef4.zest.core.widgets.DefaultSubgraph.TriangleSubgraphFactory

All Implemented Interfaces:
  SubgraphFactory

Enclosing class:
  DefaultSubgraph

    public static class DefaultSubgraph.TriangleSubgraphFactory
    extends java.lang.Object
    implements SubgraphFactory

### Constructor Summary

Constructors
Constructor and Description
`DefaultSubgraph.TriangleSubgraphFactory()`

### Method Summary

Methods
`org.eclipse.gef4.layout.interfaces.SubgraphLayout` `createSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes, org.eclipse.gef4.layout.interfaces.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 Detail

#### DefaultSubgraph.TriangleSubgraphFactory

    public DefaultSubgraph.TriangleSubgraphFactory()

### Method Detail

#### createSubgraph

    public org.eclipse.gef4.layout.interfaces.SubgraphLayout createSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes,
                                                                   org.eclipse.gef4.layout.interfaces.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