protected static class AbstractRouter.ControlPointManipulator
extends java.lang.Object
AbstractRouter.ControlPointManipulator
can be used to record, perform, and
roll back control point changes during routing.Constructor and Description |
---|
ControlPointManipulator(Connection c)
Constructs a new
AbstractRouter.ControlPointManipulator for the given
Connection . |
Modifier and Type | Method and Description |
---|---|
Vector |
addRoutingPoint(int index,
Point point,
double dx,
double dy)
Records the specified change.
|
Vector |
addRoutingPoint(Vector delta)
Records the specified change.
|
void |
addRoutingPoints(int index,
Point point,
double... deltas)
Records the given changes.
|
void |
applyChanges()
Performs the recorded changes.
|
Connection |
getConnection()
Returns the
Connection that is manipulated. |
int |
getIndex()
Returns the current insertion index for manipulations.
|
Point |
getPoint()
Returns the current
Point on the Connection . |
void |
setRoutingData(int index,
Point point,
Vector direction)
Initializes this
AbstractRouter.ControlPointManipulator for the recording of
changes. |
public ControlPointManipulator(Connection c)
AbstractRouter.ControlPointManipulator
for the given
Connection
.c
- The Connection
that is manipulated.public Vector addRoutingPoint(int index, Point point, double dx, double dy)
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.Vector
specifying the out direction.public void addRoutingPoints(int index, Point point, double... deltas)
index
- The start index for the changes.point
- The start coordinates for the changes.deltas
- The out directions for the new points.public void applyChanges()
public Connection getConnection()
Connection
that is manipulated.Connection
that is manipulated.public int getIndex()
public Point getPoint()
Point
on the Connection
.Point
.public void setRoutingData(int index, Point point, Vector direction)
AbstractRouter.ControlPointManipulator
for the recording of
changes.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.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.