Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected DisplaySurface` | `display`
`protected boolean` | `isEventThread`

Fields inherited from class uchicago.src.sim.gui.AbstractGraphLayout
`height, nodeList, update, width`

Constructor Summary
`LayoutWithDisplay(int width, int height)` Constructs a new LayoutWithDisplay.
`LayoutWithDisplay(java.util.List nodes, int width, int height)` Constructs new LayoutWithDisplay.
`LayoutWithDisplay(java.util.List nodes, int width, int height, DisplaySurface surface)` Constructs new LayoutWithDisplay.

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 uchicago.src.sim.gui.AbstractGraphLayout
`actionPerformed, appendToList, appendToList, getHeight, getNodeList, getUpdate, getWidth, setList, setUpdate, updateLayout`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### display

    protected DisplaySurface display

### isEventThread

    protected boolean isEventThread

Constructor Detail

### LayoutWithDisplay

    public LayoutWithDisplay(int width,
                             int height)

  Constructs a new LayoutWithDisplay.

  Parameters:
    `width` - the width of the display in pixels
    `height` - 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 optimised
    `width` - the width of the display in pixels
    `height` - 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 optimised
    `width` - the width of the display in pixels
    `height` - the height of the display in pixels
    `surface` - the display surface to update

Method Detail

### 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD