@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.| Modifier and Type | Class and Description |
|---|---|
class |
CanvasLayoutUtils.LayoutBoundExceededException |
| Constructor and Description |
|---|
CanvasLayoutUtils() |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getNext(CanvasHandler canvasHandler,
double width,
double height) |
double[] |
getNext(CanvasHandler canvasHandler,
double w,
double h,
double minX,
double minY) |
double[] |
getNext(CanvasHandler canvasHandler,
Node<View<?>,Edge> root) |
double[] |
getNext(CanvasHandler canvasHandler,
Node<View<?>,Edge> root,
double w,
double h,
double minX,
double minY) |
static boolean |
isCanvasRoot(Diagram diagram,
Element parent) |
static boolean |
isCanvasRoot(Diagram diagram,
String pUUID) |
public double[] getNext(CanvasHandler canvasHandler, double width, double height)
public double[] getNext(CanvasHandler canvasHandler, double w, double h, double minX, double minY)
public double[] getNext(CanvasHandler canvasHandler, Node<View<?>,Edge> root)
public double[] getNext(CanvasHandler canvasHandler, Node<View<?>,Edge> root, double w, double h, double minX, double minY)
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.