public class LayoutGeneratorSmart extends Object implements LayoutGenerator
| Constructor and Description |
|---|
LayoutGeneratorSmart()
Default constructor.
|
LayoutGeneratorSmart(boolean pdebug)
Constructor with debug-functionality.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateLayout()
Applies all steps of the layout, whose launch-parameters are set to true.
|
double |
getAlignmentThreshold()
Sets the alignment parameter used to align nodes with each other.
|
double |
getAspectratio()
Returns the aspect ratio of the initial drawing area of the graph.
|
boolean |
getAutoscaleNodes()
If set to true, subflow nodes in the given workflow are automatically
scaled to fit their contents.
|
boolean |
getDebug()
If set to true, debugging output will be printed in the command line.
|
double |
getDirection()
Returns the desired average edge direction of the resulting graph as an
angle to the abscissa in degrees.
|
int |
getGraphmode()
Returns the set input type.
|
boolean |
getLaunchAlignNodes()
If set to true, nodes will be aligned either with each other or on a
global grid.
|
boolean |
getLaunchDisplaceIdents()
If set to true, nodes that are placed on the same coordinates will be
displaced slightly, so the forcePush step can move them accordingly.
|
boolean |
getLaunchForcePush()
If set to true, all nodes will repel each other until no overlaps between
nodes are left or the maximum amount of iterations has been reached.
|
boolean |
getLaunchJungLayout()
If set to true, the specified algorithm from the JUNG-library is applied
to the graph.
|
boolean |
getLaunchOrigin()
If set to true, nodes with an in-degree of 0 will be placed at the
leftmost edge of the drawing space.
|
boolean |
getLaunchPushBack()
If set to true, all nodes will be pushed past their predecessors, so no
edges have a direction inverse to the specified direction.
|
boolean |
getLaunchRemoveCycles()
If set to true, a depth-first-search is performed and all back edges are
removed from the model graph.
|
boolean |
getLaunchRotate()
If set to true, the graph is rotated to reach an average flow direction
that is the direction specified.
|
boolean |
getLaunchSeparateDisjunctGraphs()
If set to true, disjunct parts of the model graph will be laid out
separately and then arranged over each other to create the cumulative
layout.
|
boolean |
getLaunchSeparateEdgeTypes()
If set to true, edge types will be separated and a layout generated that
follows edge type priorities.
|
int |
getLayoutSelector()
Returns the Jung layout that is used in the first step of the algorithm.
|
int |
getMaxiterations()
Returns the maximum amount of iterations used by the force push step
of the algorithm.
|
edu.uci.ics.jung.graph.DirectedGraph<VNode,Connection> |
getModelGraph()
Returns the model graph to be laid out.
|
Collection<VNode> |
getNodelist()
Returns a list of the nodes to be laid out.
|
boolean |
getRecursive()
If set to true, the layout is applied to all subflows of the given
workflow recursively.
|
double |
getScaling()
Returns the scaling parameter of the algorithm.
|
double |
getSubflowscale()
Returns the scaling factor that is used to scale subflow-nodes in the
autoscaleNodes procedure.
|
VFlowModel |
getWorkflow()
Returns the workflow to be laid out.
|
void |
setAlignmentThreshold(double palignmentThreshold)
Sets the alignment parameter used to align nodes with each other.
|
void |
setAspectratio(double paspectratio)
Sets the aspect ratio of the initial drawing area of the graph.
|
void |
setAutoscaleNodes(boolean pautoscaleNodes)
If set to true, subflow nodes in the given workflow are automatically
scaled to fit their contents.
|
void |
setDebug(boolean pdebug)
If set to true, debugging output will be printed in the command line.
|
void |
setDirection(double pdirection)
Sets the desired average edge direction as an angle to the abscissa in
degrees.
|
void |
setGraphmode(int pgraphmode)
Sets the input type.
|
void |
setLaunchAlignNodes(boolean plaunchAlignNodes)
If set to true, nodes will be aligned either with each other or on a
global grid.
|
void |
setLaunchDisplaceIdents(boolean plaunchDisplaceIdents)
If set to true, nodes that are placed on the same coordinates will be
displaced slightly, so the forcePush step can move them accordingly.
|
void |
setLaunchForcePush(boolean plaunchForcePush)
If set to true, all nodes will repel each other until no overlaps between
nodes are left or the maximum amount of iterations has been reached.
|
void |
setLaunchJungLayout(boolean plaunchJungLayout)
If set to true, the specified algorithm from the JUNG-library is applied
to the graph.
|
void |
setLaunchOrigin(boolean plaunchOrigin)
If set to true, nodes with an in-degree of 0 will be placed at the
leftmost edge of the drawing space.
|
void |
setLaunchPushBack(boolean plaunchPushBack)
If set to true, all nodes will be pushed past their predecessors, so no
edges have a direction inverse to the specified direction.
|
void |
setLaunchRemoveCycles(boolean plaunchRemoveCycles)
If set to true, a depth-first-search is performed and all back edges are
removed from the model graph.
|
void |
setLaunchRotate(boolean plaunchRotate)
If set to true, the graph is rotated to reach an average flow direction
that is the direction specified.
|
void |
setLaunchSeparateDisjunctGraphs(boolean plaunchSeparateDisjunctGraphs)
If set to true, disjunct parts of the model graph will be laid out
separately and then arranged over each other to create the cumulative
layout.
|
void |
setLaunchSeparateEdgeTypes(boolean plaunchSeparateEdgeTypes)
If set to true, edge types will be separated and a layout generated that
follows edge type priorities.
|
void |
setLayoutSelector(int playoutSelector)
Select the Jung layout that is supposed to be used in the first step of
the algorithm.
|
void |
setMaxiterations(int pmaxiterations)
Sets the maximum amount of iterations for the force push step of the
algorithm.
|
void |
setModelGraph(edu.uci.ics.jung.graph.DirectedGraph<VNode,Connection> pjgraph)
Sets the model graph to be laid out.
|
void |
setNodelist(Collection<VNode> pnodelist)
Sets the list of nodes to be laid out.
|
void |
setRecursive(boolean precursive)
If set to true, the layout is applied to all subflows of the given
workflow recursively.
|
void |
setScaling(double pscaling)
Sets the scaling parameter of the algorithm.
|
void |
setSubflowscale(double psubflowscale)
Sets the scaling factor that is used to scale subflow-nodes in the
autoscaleNodes procedure.
|
void |
setWorkflow(VFlowModel pworkflow)
Sets the workflow to be laid out.
|
public LayoutGeneratorSmart()
public LayoutGeneratorSmart(boolean pdebug)
pdebug - booleanpublic VFlowModel getWorkflow()
getWorkflow in interface LayoutGeneratorpublic edu.uci.ics.jung.graph.DirectedGraph<VNode,Connection> getModelGraph()
public Collection<VNode> getNodelist()
public boolean getRecursive()
getRecursive in interface LayoutGeneratorpublic boolean getAutoscaleNodes()
getAutoscaleNodes in interface LayoutGeneratorpublic int getLayoutSelector()
public double getAspectratio()
public int getGraphmode()
public boolean getLaunchRemoveCycles()
public boolean getLaunchSeparateDisjunctGraphs()
public boolean getLaunchSeparateEdgeTypes()
public boolean getLaunchJungLayout()
public boolean getLaunchRotate()
public boolean getLaunchOrigin()
public boolean getLaunchPushBack()
public boolean getLaunchDisplaceIdents()
public boolean getLaunchForcePush()
public boolean getLaunchAlignNodes()
public int getMaxiterations()
public double getScaling()
public double getSubflowscale()
public double getDirection()
public double getAlignmentThreshold()
public boolean getDebug()
getDebug in interface LayoutGeneratorpublic void setWorkflow(VFlowModel pworkflow)
setWorkflow in interface LayoutGeneratorpworkflow - VFlowModelpublic void setModelGraph(edu.uci.ics.jung.graph.DirectedGraph<VNode,Connection> pjgraph)
pjgraph - DirectedGraphpublic void setNodelist(Collection<VNode> pnodelist)
pnodelist - Collectionpublic void setRecursive(boolean precursive)
setRecursive in interface LayoutGeneratorprecursive - booleanpublic void setAutoscaleNodes(boolean pautoscaleNodes)
setAutoscaleNodes in interface LayoutGeneratorpautoscaleNodes - booleanpublic void setLayoutSelector(int playoutSelector)
playoutSelector - intpublic void setAspectratio(double paspectratio)
paspectratio - doublepublic void setGraphmode(int pgraphmode)
pgraphmode - intpublic void setLaunchRemoveCycles(boolean plaunchRemoveCycles)
plaunchRemoveCycles - booleanpublic void setLaunchSeparateDisjunctGraphs(boolean plaunchSeparateDisjunctGraphs)
plaunchSeparateDisjunctGraphs - booleanpublic void setLaunchSeparateEdgeTypes(boolean plaunchSeparateEdgeTypes)
plaunchSeparateEdgeTypes - booleanpublic void setLaunchJungLayout(boolean plaunchJungLayout)
plaunchJungLayout - booleanpublic void setLaunchRotate(boolean plaunchRotate)
plaunchRotate - booleanpublic void setLaunchOrigin(boolean plaunchOrigin)
plaunchOrigin - booleanpublic void setLaunchPushBack(boolean plaunchPushBack)
plaunchPushBack - booleanpublic void setLaunchDisplaceIdents(boolean plaunchDisplaceIdents)
plaunchDisplaceIdents - booleanpublic void setLaunchForcePush(boolean plaunchForcePush)
plaunchForcePush - booleanpublic void setLaunchAlignNodes(boolean plaunchAlignNodes)
plaunchAlignNodes - booleanpublic void setMaxiterations(int pmaxiterations)
pmaxiterations - intpublic void setScaling(double pscaling)
pscaling - doublepublic void setSubflowscale(double psubflowscale)
psubflowscale - doublepublic void setDirection(double pdirection)
pdirection - doublepublic void setAlignmentThreshold(double palignmentThreshold)
palignmentThreshold - doublepublic void setDebug(boolean pdebug)
setDebug in interface LayoutGeneratorpdebug - booleanpublic void generateLayout()
generateLayout in interface LayoutGenerator