Class VisRunner
java.lang.Object
edu.uci.ics.jung.algorithms.layout.util.VisRunner
Implementation of a relaxer thread for layouts.
Extracted from the
VisualizationModel
in previous
versions of JUNG.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Used for synchronization.protected IterativeContext
protected boolean
protected long
how long the relaxer thread pauses between iteration loops.protected boolean
protected Thread
-
Constructor Summary
ConstructorsConstructorDescriptionVisRunner
(IterativeContext process) Creates an instance for the specified process. -
Method Summary
Modifier and TypeMethodDescriptionlong
void
pause()
Make the relaxer thread wait.void
prerelax()
Execute a loop of steps in the calling thread, firing no events.void
relax()
Execute a loop of steps in a new Thread, firing an event after each step.void
resume()
Make the relaxer thread resume.void
run()
void
setSleepTime
(long sleepTime) void
stop()
Set flags to stop the relaxer thread.
-
Field Details
-
running
protected boolean running -
process
-
stop
protected boolean stop -
manualSuspend
protected boolean manualSuspend -
thread
-
sleepTime
protected long sleepTimehow long the relaxer thread pauses between iteration loops. -
pauseObject
Used for synchronization.
-
-
Constructor Details
-
VisRunner
Creates an instance for the specified process.- Parameters:
process
- the process (generally a layout) for which this instance is created
-
-
Method Details
-
getSleepTime
public long getSleepTime()- Returns:
- the relaxerThreadSleepTime
-
setSleepTime
public void setSleepTime(long sleepTime) - Specified by:
setSleepTime
in interfaceRelaxer
- Parameters:
sleepTime
- the sleep time to set for this thread
-
prerelax
public void prerelax()Description copied from interface:Relaxer
Execute a loop of steps in the calling thread, firing no events. -
pause
public void pause()Description copied from interface:Relaxer
Make the relaxer thread wait. -
relax
public void relax()Description copied from interface:Relaxer
Execute a loop of steps in a new Thread, firing an event after each step. -
resume
public void resume()Description copied from interface:Relaxer
Make the relaxer thread resume. -
stop
public void stop()Description copied from interface:Relaxer
Set flags to stop the relaxer thread. -
run
public void run()
-