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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidarrangeDecoration(javafx.scene.Node decoration, Point offset, Vector direction) Arranges the given decoration according to the passed-in values.protected javafx.scene.shape.ShapeclipAtDecoration(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 ICurvecomputeCurve(Connection connection) voidinterpolate(Connection connection) Interpolates the givenConnection, i.e updates itscurve nodeto 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 decorationNodeto arrange.offset- The offset for the decoration visual.direction- The direction of theConnectionat 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 theICurvegeometry, 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 newICurvegeometry.- Returns:
- An
ICurvethat represents the to be rendered geometry.
-
interpolate
Description copied from interface:IConnectionInterpolatorInterpolates the givenConnection, i.e updates itscurve nodeto reflect a respective geometry. TheIConnectionInterpolatoris also responsible of arranging the connection'sstartandenddecorations (and has to ensure the curve node is properly clipped to not render through the decorations).- Specified by:
interpolatein interfaceIConnectionInterpolator- Parameters:
connection- TheConnectionto interpolate.
-