Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class ArrangementResult
- Object
- ArrangementResult
Where an arrangement wants every node, and the bends it wants in the edges.
Constructors
public ArrangementResult() |
Methods
public void setPosition(String nodeId, double x, double y) | Records a node’s top left corner. |
public double[] getPosition(String nodeId) | A node’s top left corner as {x, y}, or null when the arrangement left it. |
public void setRoute(String edgeId, double[] route) | Records bend points for an edge, as x, y pairs. |
public double[] getRoute(String edgeId) | An edge’s bend points, or null for a straight edge. |
public void apply(GraphModel model) | Moves every node at once through GraphModel.moveNode and sets every edge’s route. |
Inherited methods
Constructor details
ArrangementResult
public ArrangementResult()Method details
setPosition
public void setPosition(String nodeId, double x, double y)Records a node’s top left corner.
getPosition
public double[] getPosition(String nodeId)A node’s top left corner as
{x, y}, or null when the arrangement left it.setRoute
public void setRoute(String edgeId, double[] route)Records bend points for an edge, as x, y pairs.
getRoute
public double[] getRoute(String edgeId)An edge’s bend points, or null for a straight edge.
apply
public void apply(GraphModel model)Moves every node at once through
GraphModel.moveNode and sets every
edge’s route. Edges the arrangement did not route lose any route they had.