|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.layout.edge.DefaultEdgeLayout
This EdgeLayout implementation arranges
edges without moving any nodes. While most NodeLayout
classes are not able to route edges alone but only together with the connected
nodes, a layouter which only routes edges is an essential part of every application
that supports runtime user-interaction.
This EdgeLayout implementation can be used to
completely arrange edges or simply to refine the edges which have already been
roughly arranged by a NodeLayout.
This class builds on a set of building blocks. Each building block handles a specific aspect of edge arrangement. The following layout building blocks are provided:
The required constants to configure an EdgeLayout instance are defined in
class EdgeLayoutConstants.
| Constructor Summary | |
DefaultEdgeLayout()
Constructs an EdgeLayout instance and initializes it with
default attributes. |
|
| Method Summary | |
void |
afterLayoutHandler()
This method will be called after the arrangement of the graph is completed. |
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. |
AttributeSet |
getEdgeAttributesTemplate()
Returns the attribute set for edges which is initialized with default values. |
java.lang.String |
getErrorMessage()
Returns the error-message if an error has occurred. |
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 |
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 |
relayout(java.util.ArrayList edgesToReadgust,
java.util.ArrayList hindrance,
Boundary boundary)
Arranges all specified edges, which may be arranged completely or simply readjusted, taking the current edge paths into consideration. |
boolean |
storePreferEdgePoints(java.util.ArrayList edges)
Call this method to store additional edge points. |
boolean |
storePreferEdgePoints(LayoutableEdge edge,
boolean doRemove)
Call this method to store additional edge points for a specified edge. |
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 DefaultEdgeLayout()
EdgeLayout instance and initializes it with
default attributes.
| 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 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 Layoutpublic boolean storePreferEdgePoints(java.util.ArrayList edges)
EdgeLayoutEdgeLayout
should take the current edge paths into consideration because in most cases
the edge paths will have already been arranged by a NodeLayout.
storePreferEdgePoints in interface EdgeLayoutedges - a List containing the edges
of which the additional points are to be stored.
public boolean storePreferEdgePoints(LayoutableEdge edge,
boolean doRemove)
EdgeLayoutEdgeLayout should take the current edge paths into
consideration because in most cases the edge paths will have already
been arranged by a NodeLayout.
storePreferEdgePoints in interface EdgeLayoutedge - the edges of which the additional points are to be stored.doRemove - specifies whether the existing points should be overwritten or not
public boolean relayout(java.util.ArrayList edgesToReadgust,
java.util.ArrayList hindrance,
Boundary boundary)
EdgeLayout
relayout in interface EdgeLayoutedgesToReadgust - All edges that should be rearranged. The elements the ArrayList
are from type EdgeMap.hindrance - A list of hindrances.
Each hindrance is an integer array of length 5 containing a
node boundary and its identifier, as shown here:
boundary - the total available area that can be used by the edge layout
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 getEdgeAttributesTemplate()
EdgeLayout
getEdgeAttributesTemplate in interface EdgeLayoutAttributeSet
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 AttributeSet getReport()
Layout
getReport in interface LayoutAttributeSet
which contains the report.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||