Package 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
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
arrangeDecoration
(javafx.scene.Node decoration, Point offset, Vector direction) Arranges the given decoration according to the passed-in values.protected javafx.scene.shape.Shape
clipAtDecoration
(javafx.scene.shape.Shape curveShape, javafx.scene.shape.Shape curveClip, javafx.scene.shape.Shape decoration) Adjusts the curveClip so that the curve node does not paint through the given decoration.protected abstract ICurve
computeCurve
(Connection connection) void
interpolate
(Connection connection) Interpolates the givenConnection
, i.e updates itscurve node
to reflect a respective geometry.
-
Constructor Details
-
AbstractInterpolator
public AbstractInterpolator()
-
-
Method Details
-
arrangeDecoration
Arranges the given decoration according to the passed-in values.- Parameters:
decoration
- The decorationNode
to arrange.offset
- The offset for the decoration visual.direction
- The direction of theConnection
at the point where the decoration is arranged.
-
clipAtDecoration
protected javafx.scene.shape.Shape clipAtDecoration(javafx.scene.shape.Shape curveShape, javafx.scene.shape.Shape curveClip, javafx.scene.shape.Shape decoration) Adjusts the curveClip so that the curve node does not paint through the given decoration.- Parameters:
curveShape
- A shape describing theICurve
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
- Parameters:
connection
- TheConnection
, for which to compute a newICurve
geometry.- Returns:
- An
ICurve
that represents the to be rendered geometry.
-
interpolate
Description copied from interface:IConnectionInterpolator
Interpolates the givenConnection
, i.e updates itscurve node
to reflect a respective geometry. TheIConnectionInterpolator
is also responsible of arranging the connection'sstart
andend
decorations (and has to ensure the curve node is properly clipped to not render through the decorations).- Specified by:
interpolate
in interfaceIConnectionInterpolator
- Parameters:
connection
- TheConnection
to interpolate.
-