|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The EdgeLayout interface specifies the contract for classes
responsible for laying out the visual edges of a graph only. An instance
should take the current edge path into consideration and rearrange edges
according to the layout configuration or context. In other words, the
attributes used to configure an EdgeLayout instance should
have an influence on the strategy used to set the edge paths.
An EdgeLayout is only allowed to arrange the edge elements
of a given graph. It should take the current edge path into consideration
and rearrange edges as far as it is necessary to satisfy its configuration.
An EdgeLayout class may be used individually or by a
LayoutController. To ensure that it is always
used properly, the following invocation order is stipulated:
Layout.getLayoutAttributesTemplate()Layout.init()Layout.useAttribute(AttributeSet)storePreferEdgePoints(ArrayList)Layout.beforeLayoutHandler() relayout(ArrayList, ArrayList, Boundary) Layout.afterLayoutHandler()
_____________________________________
| + getLayoutAttributesTemplate |
|_____________________________________|
| __________________________________|
| | # init |
| |__________________________________|
| | _______________________________|
| | | + useAttribute |
| | |_______________________________|
| | | + storePreferEdgePoints |
| | |_______________________________|
| | | __________________________|
| | | | # beforeLayoutHandler |
| | | | # relayout |
| | | | # afterLayoutHandler |
| | | |__________________________|
| | | | + getReport |
| | | |__________________________|
| | |_______________________________|
| |__________________________________|
|_____________________________________|
| Method Summary | |
AttributeSet |
getEdgeAttributesTemplate()
Returns the attribute set for edges which is initialized with default values. |
boolean |
relayout(java.util.ArrayList edges,
java.util.ArrayList hindrances,
Boundary border)
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. |
| Methods inherited from interface com.tensegrity.graph.layout.Layout |
afterLayoutHandler, beforeLayoutHandler, error, getErrorMessage, getLayoutAttributesTemplate, getName, getReport, init, updateAttributeSet, useAttribute |
| Method Detail |
public boolean storePreferEdgePoints(java.util.ArrayList edges)
EdgeLayout
should take the current edge paths into consideration because in most cases
the edge paths will have already been arranged by a NodeLayout.
edges - a List containing the edges
of which the additional points are to be stored.
public boolean storePreferEdgePoints(LayoutableEdge edge,
boolean doRemove)
EdgeLayout should take the current edge paths into
consideration because in most cases the edge paths will have already
been arranged by a NodeLayout.
edge - 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 edges,
java.util.ArrayList hindrances,
Boundary border)
edges - All edges that should be rearranged. The elements the ArrayList
are from type EdgeMap.hindrances - A list of hindrances.
Each hindrance is an integer array of length 5 containing a
node boundary and its identifier, as shown here:
border - the total available area that can be used by the edge layout
public AttributeSet getEdgeAttributesTemplate()
AttributeSet
for nodes if any; otherwise null.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||