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

## edu.uci.ics.jung.visualization
Interface VisualizationModel

All Superinterfaces:
  ChangeEventSupport

All Known Implementing Classes:
  DefaultVisualizationModel

public interface VisualizationModel
extends ChangeEventSupport

Interface for the state holding model of the VisualizationViewer. Refactored and extracted from the 1.6.0 version of VisualizationViewer

Author:
  Tom Nelson - RABA Technologies

Method Summary
`void` | `addChangeListener(ChangeListener l)` Register `l` as a listeners to changes in the model.
`ChangeListener[]` | `getChangeListeners()` Returns an array of all the `ChangeListener`s added with addChangeListener().
`Layout` | `getGraphLayout()` Returns the current graph layout.
`long` | `getRelaxerThreadSleepTime()`
`void` | `init()` initialize the layout
`boolean` | `isVisRunnerRunning()` Returns a flag that says whether the visRunner thread is running.
`void` | `prerelax()` iterate over the layout algorithm prior to displaying the graph
`void` | `removeChangeListener(ChangeListener l)` Removes a ChangeListener.
`void` | `restart()` restart the layout
`void` | `restartThreadOnly()`
`void` | `setGraphLayout(Layout layout)` set the graph Layout
`void` | `setGraphLayout(Layout layout, Dimension d)` Sets the graph Layout and initialize the Layout size to the passed dimensions.
`void` | `setRelaxerThreadSleepTime(long relaxerThreadSleepTime)` Sets the relaxerThreadSleepTime.
`void` | `setTextCallback(StatusCallback scb)` set a callback to be called during the relaxer iteration
`void` | `start()` start the relaxer
`void` | `stop()` Request that the relaxer be stopped.
`void` | `suspend()` suspend the relaxer
`void` | `unsuspend()` unsuspend the relaxer

Methods inherited from interface edu.uci.ics.jung.utils.ChangeEventSupport
`fireStateChanged`

Method Detail

### getRelaxerThreadSleepTime

    public long getRelaxerThreadSleepTime()

  Returns:
    the sleep time of the relaxer thread

### setTextCallback

    public void setTextCallback(StatusCallback scb)

  set a callback to be called during the relaxer iteration

  Parameters:
    `scb` -

### restart

    public void restart()

  restart the layout

### init

    public void init()

  initialize the layout

### start

    public void start()

  start the relaxer

### suspend

    public void suspend()

  suspend the relaxer

### unsuspend

    public void unsuspend()

  unsuspend the relaxer

### prerelax

    public void prerelax()

  iterate over the layout algorithm prior to displaying the graph

### setRelaxerThreadSleepTime

    public void setRelaxerThreadSleepTime(long relaxerThreadSleepTime)

  Sets the relaxerThreadSleepTime. @see #getRelaxerThreadSleepTime()

  Parameters:
    `relaxerThreadSleepTime` - The relaxerThreadSleepTime to set.

### setGraphLayout

    public void setGraphLayout(Layout layout)

  set the graph Layout

  Parameters:
    `layout` -

### setGraphLayout

    public void setGraphLayout(Layout layout,
                               Dimension d)

  Sets the graph Layout and initialize the Layout size to the passed dimensions. The passed Dimension will often be the size of the View that will display the graph.

  Parameters:
    `layout` -
    `d` -

### getGraphLayout

    public Layout getGraphLayout()

  Returns the current graph layout.

### restartThreadOnly

    public void restartThreadOnly()

### isVisRunnerRunning

    public boolean isVisRunnerRunning()

  Returns a flag that says whether the visRunner thread is running. If it is not, then you may need to restart the thread.

### stop

    public void stop()

  Request that the relaxer be stopped. The Thread will terminate.

### addChangeListener

    public void addChangeListener(ChangeListener l)

  Register `l` as a listeners to changes in the model. The View registers in order to repaint itself when the model changes.

  Specified by:
    `addChangeListener` in interface `ChangeEventSupport`

### removeChangeListener

    public void removeChangeListener(ChangeListener l)

  Removes a ChangeListener.

  Specified by:
    `removeChangeListener` in interface `ChangeEventSupport`
  Parameters:
    `l` - the listener to be removed

### getChangeListeners

    public ChangeListener[] getChangeListeners()

  Returns an array of all the `ChangeListener`s added with addChangeListener().

  Specified by:
    `getChangeListeners` in interface `ChangeEventSupport`
  Returns:
    all of the `ChangeListener`s added or an empty array if no listeners have been added

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