|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GraphLayout
An Interface for laying out graphs (ie networks of nodes and edges). This is used by Network2DDisplay as the source of nodes and edges to draw. The intention here is that the layout algorithm is separated from the actual drawing code. Concrete implementations should work with lists of DrawableNonGridNodes. These nodes are expected to draw themselves, but have their x and y coordinates set via whatever layout algorithm is used by the implementing class.
GraphLayout extends ActionListener. The intent here is that computationally intensive layouts can listen for the Controller's stop, pause, etc. button clicks and interrupt themselves. See the source code to KamadaGraphLayout for an example of this.
| Method Summary | |
|---|---|
void |
appendToList(DrawableNonGridNode node)
Appends the specified nodes to the list of nodes to be laid out by this GraphLayout. |
void |
appendToList(java.util.List listOfNodes)
Appends a list of nodes to the current list of nodes to be laid out by this GraphLayout. |
int |
getHeight()
Gets the height of the area on which to layout the graph. |
java.util.ArrayList |
getNodeList()
Gets the list of nodes. |
int |
getWidth()
Gets the width of the area on which to layout the graph. |
void |
setList(java.util.List listOfNodes)
Sets the list of nodes to be laid out by this GraphLayout. |
void |
setUpdate(boolean doUpdate)
Sets whether the display will update or not when updateLayout is called. |
void |
updateLayout()
Updates the layout of this graph by setting the x, y coordinate of each DrawableNonGridNode in the current list of nodes. |
| Methods inherited from interface java.awt.event.ActionListener |
|---|
actionPerformed |
| Method Detail |
|---|
int getHeight()
int getWidth()
void setList(java.util.List listOfNodes)
void appendToList(java.util.List listOfNodes)
void appendToList(DrawableNonGridNode node)
void updateLayout()
java.util.ArrayList getNodeList()
void setUpdate(boolean doUpdate)
doUpdate - if true, this GraphLayout will perform the layout when
updateLayout is called. If false, then the layout will not be
performed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||