View Javadoc
1   package edu.uci.ics.jung.algorithms.layout.util;
2   
3   /**
4    * Interface for operating the relax iterations on a layout.
5    * 
6    * @author Tom Nelson - tomnelson@dev.java.net
7    *
8    */
9   public interface Relaxer {
10  	
11  	/**
12  	 * Execute a loop of steps in a new Thread,
13  	 * firing an event after each step.
14  	 */
15  	void relax();
16  	
17  	/**
18  	 * Execute a loop of steps in the calling
19  	 * thread, firing no events.
20  	 */
21  	void prerelax();
22  	
23  	/**
24  	 * Make the relaxer thread wait.
25  	 */
26  	void pause();
27  	
28  	/**
29  	 * Make the relaxer thread resume.
30  	 *
31  	 */
32  	void resume();
33  	
34  	/**
35  	 * Set flags to stop the relaxer thread.
36  	 */
37  	void stop();
38  
39  	/**
40  	 * @param i the sleep time between iterations, in milliseconds
41  	 */
42  	void setSleepTime(long i);
43  }