|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.gui.AbstractGraphLayout
public abstract class AbstractGraphLayout
Abstract implementation of the GraphLayout interface. This implements basic list operations, but no layout algorithm. Sub-classes are expected to implement updateLayout() to do the actual layout of the nodes in the nodeList. In addition subclasses may override the empty ActionListener implementation provided here.
| Field Summary | |
|---|---|
protected int |
height
|
protected java.util.ArrayList |
nodeList
|
protected boolean |
update
|
protected int |
width
|
| Constructor Summary | |
|---|---|
AbstractGraphLayout(int width,
int height)
|
|
AbstractGraphLayout(java.util.List nodes,
int width,
int height)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Empty implementation of ActionListener interface. |
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. |
boolean |
getUpdate()
|
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. |
abstract 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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList nodeList
protected int width
protected int height
protected boolean update
| Constructor Detail |
|---|
public AbstractGraphLayout(int width,
int height)
public AbstractGraphLayout(java.util.List nodes,
int width,
int height)
| Method Detail |
|---|
public int getHeight()
getHeight in interface GraphLayoutpublic int getWidth()
getWidth in interface GraphLayoutpublic void setList(java.util.List listOfNodes)
setList in interface GraphLayoutpublic void appendToList(java.util.List listOfNodes)
appendToList in interface GraphLayoutpublic void appendToList(DrawableNonGridNode node)
appendToList in interface GraphLayoutpublic java.util.ArrayList getNodeList()
getNodeList in interface GraphLayoutpublic void setUpdate(boolean doUpdate)
GraphLayout
setUpdate in interface GraphLayoutdoUpdate - if true, this GraphLayout will perform the layout when
updateLayout is called. If false, then the layout will not be
performed.public boolean getUpdate()
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerpublic abstract void updateLayout()
updateLayout in interface GraphLayout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||