uchicago.src.sim.gui
Class LayoutWithDisplay
java.lang.Object
uchicago.src.sim.gui.AbstractGraphLayout
uchicago.src.sim.gui.LayoutWithDisplay
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, GraphLayout
- Direct Known Subclasses:
- FruchGraphLayout, KamadaGraphLayout
public abstract class LayoutWithDisplay
- extends AbstractGraphLayout
|
Method Summary |
void |
setDisplay(DisplaySurface surface)
Setting the display surface (or passing it with the constructor)
allows the graph layout to update the display to show the
algorithm's convergence within the current tick. |
protected void |
updateDisplay()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
display
protected DisplaySurface display
isEventThread
protected boolean isEventThread
LayoutWithDisplay
public LayoutWithDisplay(int width,
int height)
- Constructs a new LayoutWithDisplay.
- Parameters:
width - the width of the display in pixelsheight - the height of the display in pixels
LayoutWithDisplay
public LayoutWithDisplay(java.util.List nodes,
int width,
int height)
- Constructs new LayoutWithDisplay.
- Parameters:
nodes - the list of nodes to be optimisedwidth - the width of the display in pixelsheight - the height of the display in pixels
LayoutWithDisplay
public LayoutWithDisplay(java.util.List nodes,
int width,
int height,
DisplaySurface surface)
- Constructs new LayoutWithDisplay.
- Parameters:
nodes - the list of nodes to be optimisedwidth - the width of the display in pixelsheight - the height of the display in pixelssurface - the display surface to update
setDisplay
public void setDisplay(DisplaySurface surface)
- Setting the display surface (or passing it with the constructor)
allows the graph layout to update the display to show the
algorithm's convergence within the current tick.
- Parameters:
surface - the DisplaySurface to update
updateDisplay
protected void updateDisplay()