Package org.eclipse.gef.fx.nodes
Class AbstractRouter.ControlPointManipulator
java.lang.Object
org.eclipse.gef.fx.nodes.AbstractRouter.ControlPointManipulator
- Enclosing class:
- AbstractRouter
A
AbstractRouter.ControlPointManipulator can be used to record, perform, and
roll back control point changes during routing.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAbstractRouter.ControlPointManipulatorfor the givenConnection. -
Method Summary
Modifier and TypeMethodDescriptionaddRoutingPoint(int index, Point point, double dx, double dy) Records the specified change.addRoutingPoint(Vector delta) Records the specified change.voidaddRoutingPoints(int index, Point point, double... deltas) Records the given changes.voidPerforms the recorded changes.Returns theConnectionthat is manipulated.intgetIndex()Returns the current insertion index for manipulations.getPoint()Returns the currentPointon theConnection.voidsetRoutingData(int index, Point point, Vector direction) Initializes thisAbstractRouter.ControlPointManipulatorfor the recording of changes.
-
Constructor Details
-
ControlPointManipulator
Constructs a newAbstractRouter.ControlPointManipulatorfor the givenConnection.- Parameters:
c- TheConnectionthat is manipulated.
-
-
Method Details
-
addRoutingPoint
Records the specified change.- Parameters:
index- The index at which to insert a control point.point- The start coordinates for the change.dx- The horizontal component of the out direction.dy- The vertical component of the out direction.- Returns:
- A
Vectorspecifying the out direction.
-
addRoutingPoint
Records the specified change. -
addRoutingPoints
Records the given changes.- Parameters:
index- The start index for the changes.point- The start coordinates for the changes.deltas- The out directions for the new points.
-
applyChanges
public void applyChanges()Performs the recorded changes. -
getConnection
Returns theConnectionthat is manipulated.- Returns:
- The
Connectionthat is manipulated.
-
getIndex
public int getIndex()Returns the current insertion index for manipulations.- Returns:
- The current index.
-
getPoint
Returns the currentPointon theConnection.- Returns:
- The current
Point.
-
setRoutingData
Initializes thisAbstractRouter.ControlPointManipulatorfor the recording of changes.- Parameters:
index- The index of the control point after which points are to be added.point- The start coordinates for the changes.direction- The current direction.
-