|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This is the general interface for any Layout class which
uses a graph drawing algorithm to perform a layout operation
on the visual elements of a graph.
This interface consolidates the common methods that would have been
duplicated in interfaces NodeLayout and EdgeLayout.
Layout specifies one particular part of the contract to a
LayoutController by providing methods that deal with life cycle
issues, such as initialization and configuration by attribute. Moreover,
this interface specifies methods which allows implementations to be notified
before and after a layout operation. Finally, Layout classes
should provide a report of the last performed layout operation.
A Layout instance holds the nodes and edges of the graph that is to be arranged.
Those nodes and edges implement type
EdgeLayout and
NodeLayout respectively.
A Layout is only allowed to move nodes, reassign ports and
change the edge path according to its implemented layout algorithm.
| 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. |
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. |
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. |
| Method Detail |
public void init()
public java.lang.String getName()
Layout. This name will be used to
identify a layout and must be unique.
public AttributeSet getLayoutAttributesTemplate()
AttributeSet which contains all properties
supported by this Layout.
The provided AttributeSet can be modified to configure this
Layout.The method useAttribute(AttributeSet)
will be used to put a modified copy of this AttributeSet.
AttributeSet of this Layout
if any; otherwise null.public void useAttribute(AttributeSet layoutAttributs)
AttributeSet that contains all properties
supported by this Layout.
layoutAttributs - The attributes that are to be used in the next layout
process.public void updateAttributeSet(AttributeSet layoutAttributs)
AttributeSet with the view
of consistency.
Notice: The given AttributeSet must contains valid properties
supported by this Layout. Please see getLayoutAttributesTemplate()
for more details.
layoutAttributs - the attributes that are to be updated.getLayoutAttributesTemplate()public void beforeLayoutHandler()
public void afterLayoutHandler()
public boolean error()
getErrorMessage() to obtain
a description text about the last occurred error.
public java.lang.String getErrorMessage()
error() to find out whether
an error has occurred.
public AttributeSet getReport()
AttributeSet
which contains the report.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||