|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.layout.swimlane.SwimlaneLayout
This class implements NodeLayout to layout nodes
using HierarchicalLayout
The constants which can be used to configure instances of this NodeLayout
class are defined in class SwimlaneConstants.
| Field Summary |
| Fields inherited from interface com.tensegrity.graph.layout.NodeLayout |
DIRECTION_BOTTOM_TO_TOP, DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_TOP_TO_BOTTOM, DIRECTION_UNDEFINED |
| Constructor Summary | |
SwimlaneLayout()
Constructs a new swim-lane layout instance with default settings. |
|
| Method Summary | |
boolean |
addEdge(LayoutableEdge edge)
This method adds an edge to the layout. |
boolean |
addNode(LayoutableNode node)
This method adds nodes into the layout classes. |
void |
afterLayoutHandler()
This method will be called after the arrangement of the graph is completed. |
void |
beforeAddEdgeHandler(int edgeCount)
This method must be called before inserting edges. |
void |
beforeAddNodeHandler(int nodeCount)
This method will be triggered before inserting nodes. |
void |
beforeLayoutHandler()
This method will be called before performing layout to allow the layout class to do initialization work. |
boolean |
error()
Returns true if an error has occurred; otherwise false. |
int |
getDirection()
Returns a constant that represents the direction of the NodeLayout implementation. |
AttributeSet |
getEdgeAttributesTemplate()
Returns the attribute set of edges which is initialized with default values. |
java.lang.String |
getErrorMessage()
Returns the error-message if an error has occurred. |
long |
getEstimatedArrangingTime()
Returns an estimate time for arranging of a given graph. |
AttributeSet |
getLayoutAttributesTemplate()
This method return an AttributeSet which contains all properties
supported by this Layout.
|
java.lang.String |
getName()
Returns the name of the Layout. |
AttributeSet |
getNodeAttributesTemplate()
Returns the attribute set of nodes which is initialized with default values. |
int |
getPreferEdgeType(AttributeSet usingAttributes)
This method allows a layout classes to inform the caller about it preferred edge type. |
AttributeSet |
getReport()
This method submits a report about the last layout process. |
void |
init()
An instance of this class may be used to arrange different graphs. |
boolean |
isGraphSuitable()
This method checks whether the layout is able to arrange the visual elements it contains. |
boolean |
layout(int x,
int y,
boolean reassignPorts)
Performs the layout process. |
void |
setProgressBar(LayoutProgress progressBar)
This method might be use to set a progress bar. |
void |
updateAttributeSet(AttributeSet layoutAttributs)
This method updates a given AttributeSet with the view
of consistency.
|
void |
useAttribute(AttributeSet layoutAttributs)
This method can be used to configure a layout class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwimlaneLayout()
| Method Detail |
public void updateAttributeSet(AttributeSet layoutAttributs)
LayoutAttributeSet with the view
of consistency.
Notice: The given AttributeSet must contains valid properties
supported by this Layout. Please see Layout.getLayoutAttributesTemplate()
for more details.
updateAttributeSet in interface LayoutlayoutAttributs - the attributes that are to be updated.Layout.getLayoutAttributesTemplate()public void init()
Layout
init in interface Layoutpublic java.lang.String getName()
LayoutLayout. This name will be used to
identify a layout and must be unique.
getName in interface Layoutpublic int getDirection()
NodeLayoutNodeLayout implementation. Valid values are defined through
the 'direction' constants from this interface.
getDirection in interface NodeLayoutNodeLayoutpublic boolean isGraphSuitable()
NodeLayout
isGraphSuitable in interface NodeLayoutpublic void beforeAddNodeHandler(int nodeCount)
NodeLayout
beforeAddNodeHandler in interface NodeLayoutnodeCount - The number of nodes that will be added.public boolean addNode(LayoutableNode node)
NodeLayout
addNode in interface NodeLayoutnode - the node that is to be added.
Layout.getErrorMessage()
may be used to get details information.NodeLayout.beforeAddNodeHandler(int)public void beforeAddEdgeHandler(int edgeCount)
NodeLayoutedgeCount may be used for internal preparing
like memory allocation.
beforeAddEdgeHandler in interface NodeLayoutedgeCount - he number of edges that will be added.public boolean addEdge(LayoutableEdge edge)
NodeLayout
addEdge in interface NodeLayoutedge - The edge that is to be added.
Layout.getErrorMessage()
may be used to get details information.NodeLayout.beforeAddEdgeHandler(int)public void useAttribute(AttributeSet layoutAttributs)
LayoutAttributeSet that contains all properties
supported by this Layout.
useAttribute in interface LayoutlayoutAttributs - The attributes that are to be used in the next layout
process.public void beforeLayoutHandler()
Layout
beforeLayoutHandler in interface Layout
public boolean layout(int x,
int y,
boolean reassignPorts)
NodeLayout
layout in interface NodeLayoutx - The left position of the graph bounding box after arranging.y - The top position of the graph bounding box after arranging.reassignPorts - Specifies whether the layout is allowed
to reassign ports or not.
NodeLayout.beforeAddEdgeHandler(int)public void afterLayoutHandler()
Layout
afterLayoutHandler in interface Layoutpublic AttributeSet getLayoutAttributesTemplate()
LayoutAttributeSet which contains all properties
supported by this Layout.
The provided AttributeSet can be modified to configure this
Layout.The method Layout.useAttribute(AttributeSet)
will be used to put a modified copy of this AttributeSet.
getLayoutAttributesTemplate in interface LayoutAttributeSet of this Layout
if any; otherwise null.public AttributeSet getNodeAttributesTemplate()
NodeLayout
getNodeAttributesTemplate in interface NodeLayoutAttributeSet
for nodes if any; otherwise null.AttributeSetpublic AttributeSet getEdgeAttributesTemplate()
NodeLayout
getEdgeAttributesTemplate in interface NodeLayoutAttributeSet
for nodes if any; otherwise null.public boolean error()
LayoutLayout.getErrorMessage() to obtain
a description text about the last occurred error.
error in interface Layoutpublic java.lang.String getErrorMessage()
LayoutLayout.error() to find out whether
an error has occurred.
getErrorMessage in interface Layoutpublic long getEstimatedArrangingTime()
NodeLayout
getEstimatedArrangingTime in interface NodeLayoutpublic AttributeSet getReport()
Layout
getReport in interface LayoutAttributeSet
which contains the report.public void setProgressBar(LayoutProgress progressBar)
NodeLayout
setProgressBar in interface NodeLayoutprogressBar - The progress bar that is to be updated.public int getPreferEdgeType(AttributeSet usingAttributes)
NodeLayout
getPreferEdgeType in interface NodeLayoutusingAttributes - the configuration that should being used.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||