uchicago.src.sim.gui
Class CircularGraphLayout

java.lang.Object
  extended by uchicago.src.sim.gui.AbstractGraphLayout
      extended by uchicago.src.sim.gui.CircularGraphLayout
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, GraphLayout

public class CircularGraphLayout
extends AbstractGraphLayout


Field Summary
 
Fields inherited from class uchicago.src.sim.gui.AbstractGraphLayout
height, nodeList, update, width
 
Constructor Summary
CircularGraphLayout(int width, int height)
           
CircularGraphLayout(java.util.List nodes, int width, int height)
           
 
Method Summary
 void setPad(int p)
          Sets the number of pixels to shrink radius by.
 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 uchicago.src.sim.gui.AbstractGraphLayout
actionPerformed, appendToList, appendToList, getHeight, getNodeList, getUpdate, getWidth, setList, setUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircularGraphLayout

public CircularGraphLayout(int width,
                           int height)

CircularGraphLayout

public CircularGraphLayout(java.util.List nodes,
                           int width,
                           int height)
Method Detail

setPad

public void setPad(int p)
Sets the number of pixels to shrink radius by. Java draws object from top left hand corner and this allows objects drawn on the far right to be visible.


updateLayout

public void updateLayout()
Description copied from class: AbstractGraphLayout
Updates the layout of this graph by setting the x, y coordinate of each DrawableNonGridNode in the current list of nodes.

Specified by:
updateLayout in interface GraphLayout
Specified by:
updateLayout in class AbstractGraphLayout