|
|||||||||
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.FlowchartLayout
public class FlowchartLayout
FlowchartLayout can be used to arrange flowcharts representing program source code. The algorithm recognizes program code -like patterns in the graph, such as loops, sequences and if/switch branchings, and arranges them recursively. FlowchartLayout could be used to arrange other types of graphs as well, though with some restrictions. For example it treats all back links as loops in the code, and expects that they are nested - loop links starting closer to the stop node should end closer to the start node. Another similar restriction is that there shouldn't be any cross-links that connect different branches of a decision sub-graph.
Constructor Summary | |
---|---|
FlowchartLayout()
Initializes a new instance of the FlowchartLayout class. |
Method Summary | |
---|---|
boolean |
arrange(Diagram diagram,
DiagramItemList items)
Applies the layout on the specified subset of items from the specified Diagram instance. |
float |
getBranchPadding()
Gets how much space to leave between adjacent decision branches in the flowchart. |
boolean |
getIgnoreRepeatingLinks()
Gets a value indicating whether to ignore repeating links. |
float |
getLinkPadding()
Gets how much space to leave between adjacent back links designating nested loops. |
float |
getNodeDistance()
Gets the distance between consecutive nodes in the flowchart. |
int |
getOrientation()
Gets the overall orientation of the arranged diagram. |
boolean |
getSplitGraph()
Gets a value indicating whether unconnected subgraphs should be laid out independently from each other. |
void |
setBranchPadding(int value)
Sets how much space to leave between adjacent decision branches in the flowchart. |
void |
setIgnoreRepeatingLinks(boolean value)
Sets a value indicating whether to ignore repeating links. |
void |
setLinkPadding(float value)
Sets how much space to leave between adjacent back links designating nested loops. |
void |
setNodeDistance(float value)
Sets the distance between consecutive nodes in the flowchart. |
void |
setOrientation(int value)
Sets the overall orientation of the arranged diagram. |
void |
setSplitGraph(boolean value)
Sets a value indicating whether unconnected subgraphs should be laid out independently from each other. |
Methods inherited from class com.mindfusion.diagramming.AbstractLayout |
---|
arrange, getAnchoring, getKeepGroupLayout, getLayoutLink, getLayoutNode, getMargins, getMultipleGraphsPlacement, getProgress, removeMidleSegmentPoint, setAnchoring, setKeepGroupLayout, 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 FlowchartLayout()
FlowchartLayout
class.
Method Detail |
---|
public boolean arrange(Diagram diagram, DiagramItemList items)
Diagram
instance.
arrange
in class AbstractLayout
diagram
- The Diagram
to arrange.items
- Specifies a subset of diagram items to arrange.
true
if the diagram has been arranged successfully;
otherwise, false
.public boolean getSplitGraph()
true
, each independent graph in
the diagram is laid out in its own layout area. Otherwise all
subgraphs are arranged in the same layout area.
public void setSplitGraph(boolean value)
true
, each independent graph in
the diagram is laid out in its own layout area. Otherwise all
subgraphs are arranged in the same layout area.
public int getOrientation()
public void setOrientation(int value)
public float getBranchPadding()
public void setBranchPadding(int value)
public float getLinkPadding()
public void setLinkPadding(float value)
public float getNodeDistance()
public void setNodeDistance(float value)
public boolean getIgnoreRepeatingLinks()
public void setIgnoreRepeatingLinks(boolean value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |