org.eclipse.gef.fx.nodes

## Class AbstractInterpolator

- java.lang.Object
- - org.eclipse.gef.fx.nodes.AbstractInterpolator

All Implemented Interfaces:
  IConnectionInterpolator

Direct Known Subclasses:
  PolyBezierInterpolator, PolylineInterpolator

    public abstract class AbstractInterpolator
    extends Object
    implements IConnectionInterpolator

Abstract base class for `IConnectionInterpolator` implementations, which supports updating the geometry for an `IGeometry` curve node, as well as arranging and clipping the decorations.

### Constructor Summary

Constructors
Constructor and Description
`AbstractInterpolator()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected void` `arrangeDecoration(Node decoration, Point offset, Vector direction)` Arranges the given decoration according to the passed-in values.
`protected Shape` `clipAtDecoration(Shape curveShape, Shape curveClip, Shape decoration)` Adjusts the curveClip so that the curve node does not paint through the given decoration.
`protected abstract ICurve` `computeCurve(Connection connection)` Computes an `ICurve` geometry from the `Connection`'s points, which is used to update the `curve node`.
`void` `interpolate(Connection connection)` Interpolates the given `Connection`, i.e updates its `curve node` to reflect a respective geometry.

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

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

### Constructor Detail

#### AbstractInterpolator

    public AbstractInterpolator()

### Method Detail

#### arrangeDecoration

    protected void arrangeDecoration(Node decoration,
                                     Point offset,
                                     Vector direction)

Arranges the given decoration according to the passed-in values.

Parameters:
  `decoration` - The decoration `Node` to arrange.
  `offset` - The offset for the decoration visual.
  `direction` - The direction of the `Connection` at the point where the decoration is arranged.

#### clipAtDecoration

    protected Shape clipAtDecoration(Shape curveShape,
                                     Shape curveClip,
                                     Shape decoration)

Adjusts the curveClip so that the curve node does not paint through the given decoration.

Parameters:
  `curveShape` - A shape describing the `ICurve` geometry, which is used for clipping.
  `curveClip` - A shape that represents the clip of the curve node, interpreted in scene coordinates.
  `decoration` - The decoration to clip the curve node from.
Returns:
  A shape representing the resulting clip, interpreted in scene coordinates.

#### computeCurve

    protected abstract ICurve computeCurve(Connection connection)

Computes an `ICurve` geometry from the `Connection`'s points, which is used to update the `curve node`.

Parameters:
  `connection` - The `Connection`, for which to compute a new `ICurve` geometry.
Returns:
  An `ICurve` that represents the to be rendered geometry.

#### interpolate

    public void interpolate(Connection connection)

Description copied from interface: `IConnectionInterpolator`
Interpolates the given `Connection`, i.e updates its `curve node` to reflect a respective geometry. The `IConnectionInterpolator` is also responsible of arranging the connection's `start` and `end` decorations (and has to ensure the curve node is properly clipped to not render through the decorations).

Specified by:
  `interpolate` in interface `IConnectionInterpolator`
Parameters:
  `connection` - The `Connection` to interpolate.