|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.bpmn.layout.BpmnLayouter
An automatic layout algorithm for BPMN collaboration diagrams.
The different type of elements have to be marked with the DataProvider keys
BPMN_EDGE_TYPE_DPKEY
and BPMN_NODE_TYPE_DPKEY
.
The algorithm supports both, full layout as well as routing of edges only
(see setLayoutMode(byte)
).
Field Summary | |
static String |
BPMN_EDGE_TYPE_DPKEY
DataProvider key used to store the BPMN specific type for each edge.
|
static String |
BPMN_NODE_TYPE_DPKEY
DataProvider key used to store the BPMN specific type for each node.
|
static byte |
LAYOUT_ALL_ELEMENTS
Sphere of action specifier. |
static byte |
LAYOUT_SELECTED_ELEMENTS
Sphere of action specifier. |
static byte |
MODE_FULL_LAYOUT
Specifies the layout mode. |
static byte |
MODE_ROUTE_EDGES
Specifies the layout mode. |
static byte |
ORIENTATION_LEFT_TO_RIGHT
Specifies the orientation of the drawing. |
static byte |
ORIENTATION_TOP_TO_BOTTOM
Specifies the orientation of the drawing. |
static Object |
SPHERE_OF_ACTION_EDGES_DPKEY
DataProvider key used to mark edges for layout when using
using sphere of action LAYOUT_SELECTED_ELEMENTS . |
static Object |
SPHERE_OF_ACTION_NODES_DPKEY
DataProvider key used to mark nodes for layout when using
using sphere of action LAYOUT_SELECTED_ELEMENTS . |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
BpmnLayouter()
|
Method Summary | |
boolean |
canLayout(LayoutGraph graph)
Returns true .
|
void |
doLayout(LayoutGraph graph)
Lays out the specified graph. |
double |
getLaneInsets()
Returns the insets used for swimlanes. |
byte |
getLayoutMode()
Returns the used layout mode. |
byte |
getLayoutOrientation()
Returns the layout orientation. |
double |
getMinimumEdgeLength()
Returns the minimum length of edges. |
double |
getMinimumNodeDistance()
Returns the minimum distance between two node elements. |
double |
getPoolDistance()
Returns the used minimum distance between two pool elements. |
byte |
getSphereOfAction()
Returns the sphere of action. |
void |
setLaneInsets(double laneInsets)
Sets the insets for swimlanes, that is the distance between a graph element and the border of its enclosing swimlane. |
void |
setLayoutMode(byte layoutMode)
Sets the layout mode. |
void |
setLayoutOrientation(byte layoutOrientation)
Specifies the layout orientation. |
void |
setMinimumEdgeLength(double minimumEdgeLength)
Sets the minimum length of edges. |
void |
setMinimumNodeDistance(double minimumNodeDistance)
Sets the minimum distance between two node elements. |
void |
setPoolDistance(double distance)
Sets the minimum distance between two pool elements. |
void |
setSphereOfAction(byte sphereOfAction)
Sets the sphere of action. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object SPHERE_OF_ACTION_NODES_DPKEY
DataProvider
key used to mark nodes for layout when using
using sphere of action LAYOUT_SELECTED_ELEMENTS
.
getSphereOfAction()
,
setSphereOfAction(byte)
public static final Object SPHERE_OF_ACTION_EDGES_DPKEY
DataProvider
key used to mark edges for layout when using
using sphere of action LAYOUT_SELECTED_ELEMENTS
.
getSphereOfAction()
,
setSphereOfAction(byte)
public static final String BPMN_NODE_TYPE_DPKEY
DataProvider
key used to store the BPMN specific type for each node.
Valid are all node type constants specified by class BpmnElementTypes
.
public static final String BPMN_EDGE_TYPE_DPKEY
DataProvider
key used to store the BPMN specific type for each edge.
Valid are all edge type constants specified by class BpmnElementTypes
.
public static final byte ORIENTATION_TOP_TO_BOTTOM
setLayoutOrientation(byte)
,
Constant Field Valuespublic static final byte ORIENTATION_LEFT_TO_RIGHT
setLayoutOrientation(byte)
,
Constant Field Valuespublic static final byte MODE_ROUTE_EDGES
setLayoutMode(byte)
,
Constant Field Valuespublic static final byte MODE_FULL_LAYOUT
setLayoutMode(byte)
,
Constant Field Valuespublic static final byte LAYOUT_ALL_ELEMENTS
setSphereOfAction(byte)
,
Constant Field Valuespublic static final byte LAYOUT_SELECTED_ELEMENTS
SPHERE_OF_ACTION_EDGES_DPKEY
and the selection state of a node is
determined by a boolean value returned by the data provider associated with the data provider key
SPHERE_OF_ACTION_NODES_DPKEY
.
Note, if the layout mode is set to MODE_FULL_LAYOUT
non-selected elements may also be moved to
produce valid drawings. However the layout algorithm uses the initial position of such elements as sketch.
setSphereOfAction(byte)
,
Constant Field ValuesConstructor Detail |
public BpmnLayouter()
Method Detail |
public byte getLayoutMode()
Defaults to MODE_FULL_LAYOUT
.
setLayoutMode(byte)
public void setLayoutMode(byte layoutMode)
MODE_FULL_LAYOUT
and MODE_ROUTE_EDGES
.
Defaults to MODE_FULL_LAYOUT
.
layoutMode
- one of
IllegalArgumentException
- if the specified layout mode does not
match any of the layout mode constants defined in this class.getLayoutMode()
public byte getSphereOfAction()
Defaults to LAYOUT_ALL_ELEMENTS
.
setSphereOfAction(byte)
public void setSphereOfAction(byte sphereOfAction)
LAYOUT_ALL_ELEMENTS
and LAYOUT_SELECTED_ELEMENTS
.
Defaults to LAYOUT_ALL_ELEMENTS
.
Note, if the sphere of action is set to LAYOUT_SELECTED_ELEMENTS
and the layout mode to MODE_FULL_LAYOUT
non-selected elements may
also be moved. However the layout algorithm uses the initial position of
such elements as sketch.
sphereOfAction
- one of
IllegalArgumentException
- if the specified sphere of action does not
match any of the sphere of action constants defined in this class.getSphereOfAction()
,
setLayoutMode(byte)
public double getLaneInsets()
Defaults to 10.0
.
setLaneInsets(double)
public void setLaneInsets(double laneInsets)
Defaults to 10.0
.
laneInsets
- the distance between graph elements and the border
of their enclosing swimlanes.getLaneInsets()
public double getMinimumNodeDistance()
Defaults to 30.0
setMinimumNodeDistance(double)
public void setMinimumNodeDistance(double minimumNodeDistance)
Defaults to 30.0
getMinimumNodeDistance()
public double getMinimumEdgeLength()
Defaults to 20.0
.
setMinimumEdgeLength(double)
public void setMinimumEdgeLength(double minimumEdgeLength)
Defaults to 20.0
.
getMinimumEdgeLength()
public double getPoolDistance()
Defaults to 50.0
.
setPoolDistance(double)
public void setPoolDistance(double distance)
Defaults to 50.0
.
getPoolDistance()
public byte getLayoutOrientation()
Defaults to ORIENTATION_LEFT_TO_RIGHT
.
setLayoutOrientation(byte)
public void setLayoutOrientation(byte layoutOrientation)
Defaults to ORIENTATION_LEFT_TO_RIGHT
.
layoutOrientation
- one of
IllegalArgumentException
- if the specified orientation does not
match any of the layout orientation constants defined in this class.getLayoutOrientation()
public boolean canLayout(LayoutGraph graph)
true
.
This method does not check whether the specified graph can be laid out
by this algorithm at all.
canLayout
in interface Layouter
public void doLayout(LayoutGraph graph)
doLayout
in interface Layouter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |