pedviz.algorithms
Interface Algorithm

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
ErrorChecking, FamilySplitter, Layout, RubberBands, SameParents, Sugiyama, SugiyamaLayout

public interface Algorithm
extends java.lang.Runnable

Implementations of this interface represent a graph algorithm. It can be run as a thread and the registered ChangeListener will be notified about the progress.

Version:
0.1
Author:
Lukas Forer

Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Registers a ChangeListener.
 java.lang.String getMessage()
          Returns a short description of the algorithm.
 int getPercentComplete()
          Returns the progress in percents from 0 to 100
 void run()
          Starts the algorithm.
 

Method Detail

getMessage

java.lang.String getMessage()
Returns a short description of the algorithm.

Returns:
a short description of the algorithm

getPercentComplete

int getPercentComplete()
Returns the progress in percents from 0 to 100

Returns:
the progress in percents

addChangeListener

void addChangeListener(javax.swing.event.ChangeListener l)
Registers a ChangeListener. It will be notified about the progress of the algorithm.

Parameters:
l - Change

run

void run()
Starts the algorithm.

Specified by:
run in interface java.lang.Runnable