|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.AbstractLayout
com.mindfusion.diagramming.LayeredLayout
public class LayeredLayout
Implements a layered graph layout algorithm. This algorithm assigns diagram nodes to distinct horizontal or vertical layers. While arranging the layers, the layout routine seeks to meet the following criteria:
Constructor Summary | |
---|---|
LayeredLayout()
Initializes a new instance of the LayeredLayout class. |
|
LayeredLayout(int orientation,
float layerDistance,
float nodeDistance,
float xGap,
float yGap)
Initializes a new instance of the LayeredLayout class. |
Method Summary | |
---|---|
boolean |
arrange(Diagram diagram,
DiagramItemList items)
Arranges the specified flowchart. |
int |
getDirection()
Gets a value indicating in what direction the arrows in the arranged diagram should go. |
boolean |
getEnableCustomLayers()
Gets a value indicating whether to indicating whether the layered layout will honor the LayeredLayoutTraits.Layer flags. |
DiagramNode |
getEndNode()
Gets the node that should be placed in the last layer of the arranged graph. |
boolean |
getEnforceLinkFlow()
Gets a value indicating whether to attempt to force all links to go in the same direction. |
boolean |
getIgnoreNodeSize()
Gets a value indicating whether the distance between adjacent nodes in the final layout should be independent of the nodes' size. |
boolean |
getKeepGroupLayout()
Gets a value specifying whether the relative position of nodes within groups should be kept intact. |
float |
getLayerDistance()
Gets the desired distance between adjacent layers. |
float |
getLinksCompactFactor()
Gets a value indicating how much to compact the outermost arrows. |
int |
getLinkType()
Gets the appearance of the links in the final layout. |
float |
getNodeDistance()
Gets the desired distance between adjacent nodes on the same layer. |
int |
getOrientation()
Gets a value indicating what the overall orientation of the arranged diagram should be. |
boolean |
getSplitLayers()
Gets a value indicating whether layers that are much wider than the other layers should be split. |
DiagramNode |
getStartNode()
Gets the node that should be placed in the first layer of the arranged graph. |
LayeredLayoutStatistics |
getStatistics()
Gets layout-specific information about the nodes and links participating in the layout. |
boolean |
getStraightenLongLinks()
|
long |
getTimeLimit()
Gets the time-out value set for the path-finding part of the layered layout algorithm. |
float |
getXGap()
Gets a value indicating how much horizontal space should be left between the document boundaries and the graph. |
float |
getYGap()
Gets a value indicating how much vertical space should be left between the document boundaries and the graph. |
void |
setDirection(int value)
Sets a value indicating in what direction the arrows in the arranged diagram should go. |
void |
setEnableCustomLayers(boolean value)
Sets a value indicating whether to indicating whether the layered layout will honor the LayeredLayoutTraits.Layer flags. |
void |
setEndNode(DiagramNode value)
Sets the node that should be placed in the last layer of the arranged graph. |
void |
setEnforceLinkFlow(boolean value)
Sets a value indicating whether to attempt to force all links to go in the same direction. |
void |
setIgnoreNodeSize(boolean value)
Sets a value indicating whether the distance between adjacent nodes in the final layout should be independent of the nodes' size. |
void |
setKeepGroupLayout(boolean value)
Sets a value specifying whether the relative position of nodes within groups should be kept intact. |
void |
setLayerDistance(float value)
Sets the desired distance between adjacent layers. |
void |
setLinksCompactFactor(float value)
Sets a value indicating how much to compact the outermost arrows. |
void |
setLinkType(int value)
Sets the appearance of the links in the final layout. |
void |
setNodeDistance(float value)
Sets the desired distance between adjacent nodes on the same layer. |
void |
setOrientation(int value)
Sets a value indicating what the overall orientation of the arranged diagram should be. |
void |
setSplitLayers(boolean value)
Sets a value indicating whether layers that are much wider than the other layers should be split. |
void |
setStartNode(DiagramNode value)
Sets the node that should be placed in the first layer of the arranged graph. |
void |
setStraightenLongLinks(boolean value)
|
void |
setTimeLimit(long value)
Sets a time-out value for the path-finding part of the layered layout algorithm. |
void |
setXGap(float value)
Sets a value indicating how much horizontal space should be left between the document boundaries and the graph. |
void |
setYGap(float value)
Sets a value indicating how much vertical space should be left between the document boundaries and the graph. |
Methods inherited from class com.mindfusion.diagramming.AbstractLayout |
---|
arrange, getAnchoring, getLayoutLink, getLayoutNode, getMargins, getMultipleGraphsPlacement, getProgress, removeMidleSegmentPoint, setAnchoring, setLayoutLink, setLayoutNode, setMargins, setMultipleGraphsPlacement, setProgress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LayeredLayout()
public LayeredLayout(int orientation, float layerDistance, float nodeDistance, float xGap, float yGap)
orientation
- One of the Orientation
constants.layerDistance
- A float value specifying the desired distance
between adjacent layers.nodeDistance
- A float value specifying the desired distance
between adjacent nodes.xGap
- A float value specifying the horizontal offset from the
left document bound.yGap
- A float value specifying the vertical offset from the
top document bound.Method Detail |
---|
public boolean arrange(Diagram diagram, DiagramItemList items)
arrange
in class AbstractLayout
diagram
- The Diagram
to arrange.items
- A collection of nodes and links from diagram that define
the subgraph to arrange.
true
public boolean getKeepGroupLayout()
getKeepGroupLayout
in class AbstractLayout
true
if the relative position of nodes within
groups should be preserved, otherwise false
.public void setKeepGroupLayout(boolean value)
setKeepGroupLayout
in class AbstractLayout
value
- true
if the relative position of nodes within
groups should be preserved, otherwise false
.public int getOrientation()
Orientation
constants.public void setOrientation(int value)
value
- One of the Orientation
constants.public int getDirection()
Direction
constants.public void setDirection(int value)
value
- One of the Direction
constants.public float getLayerDistance()
public void setLayerDistance(float value)
value
- A float value specifying the distance between adjacent layers.public float getNodeDistance()
public void setNodeDistance(float value)
value
- A float value specifying the distance between adjacent nodes.public float getXGap()
public void setXGap(float value)
value
- A float value specifying the horizontal offset from the
left document bound.public float getYGap()
public void setYGap(float value)
value
- A float value specifying the vertical offset from the
top document bound.public boolean getSplitLayers()
true
if long layers will be split,
otherwise false
.public void setSplitLayers(boolean value)
value
- true
if long layers should be split,
otherwise false
.public float getLinksCompactFactor()
public void setLinksCompactFactor(float value)
value
- A float multiplier applied to the distance
between outermost arrows.public long getTimeLimit()
public void setTimeLimit(long value)
value
- An integer value specifying the maximum time in milliseconds
the path-finding algorithm can run.public boolean getIgnoreNodeSize()
public void setIgnoreNodeSize(boolean value)
public boolean getEnableCustomLayers()
public void setEnableCustomLayers(boolean value)
public int getLinkType()
LayeredLayoutLinkType
constants.public void setLinkType(int value)
value
- One of the LayeredLayoutLinkType
constants.public LayeredLayoutStatistics getStatistics()
public boolean getEnforceLinkFlow()
public void setEnforceLinkFlow(boolean value)
public boolean getStraightenLongLinks()
public void setStraightenLongLinks(boolean value)
public DiagramNode getStartNode()
DiagramNode
.public void setStartNode(DiagramNode value)
value
- A DiagramNode
object representing the start node.public DiagramNode getEndNode()
DiagramNode
.public void setEndNode(DiagramNode value)
start node
is specified too.
value
- A DiagramNode
object representing the end node.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |