uchicago.src.sim.gui
Class RandomGraphLayout

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

public class RandomGraphLayout
extends AbstractGraphLayout


Field Summary
 
Fields inherited from class uchicago.src.sim.gui.AbstractGraphLayout
height, nodeList, update, width
 
Constructor Summary
RandomGraphLayout(int width, int height)
           
RandomGraphLayout(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

RandomGraphLayout

public RandomGraphLayout(int width,
                         int height)

RandomGraphLayout

public RandomGraphLayout(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