@Dependent public class CanvasLayoutUtils extends Object
getNextLayoutPosition( CanvasHandler canvasHandler ) returns the
cartesian coordinates for an empty area found in the diagram's graph that is being managed by the
canvas handler instance.
- Calling getNextLayoutPosition( CanvasHandler canvasHandler, Element> source ) returns the
cartesian coordinates for an empty area found in the diagram's graph but relative to the given source
argument and its parent, if any.
In both cases the resulting coordinates are given from the coordinates of the visible element in the graph, which
is position is on bottom right rather than the others, plus a given PADDING anb some
error margin given by the MARGIN floating point.
TODO: This has to be refactored by the use of a good impl that achieve good dynamic layouts. Probably each Definition Set / Diagram will require a different layout manager as well.
| Constructor and Description |
|---|
CanvasLayoutUtils() |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getNext(CanvasHandler canvasHandler,
double height) |
double[] |
getNext(CanvasHandler canvasHandler,
double height,
Point2D offset) |
double[] |
getNext(CanvasHandler canvasHandler,
double h,
Point2D offset,
Point2D min) |
double[] |
getNext(CanvasHandler canvasHandler,
Node<View<?>,Edge> root,
double h,
Point2D offset,
Point2D min) |
double[] |
getNext(CanvasHandler canvasHandler,
Node<View<?>,Edge> root,
Node<View<?>,Edge> newNode) |
static boolean |
isCanvasRoot(Diagram diagram,
Element parent) |
static boolean |
isCanvasRoot(Diagram diagram,
String pUUID) |
public double[] getNext(CanvasHandler canvasHandler, double height)
public double[] getNext(CanvasHandler canvasHandler, double height, Point2D offset)
public double[] getNext(CanvasHandler canvasHandler, double h, Point2D offset, Point2D min)
public double[] getNext(CanvasHandler canvasHandler, Node<View<?>,Edge> root, Node<View<?>,Edge> newNode)
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.