org.wilmascope.forcelayout
Class ForceManager

java.lang.Object
  extended by org.wilmascope.forcelayout.ForceManager

public class ForceManager
extends java.lang.Object

This class provides a manager or registry of all the available forces which can be added to an instance of ForceLayout. This class implements the Singleton design pattern (Gamma et al.) such that there can only ever be one instance in the system and a reference to that instance can be obtained by calling the static {link #getInstance()} method from anywhere.


Nested Class Summary
 class ForceManager.UnknownForceTypeException
           
 
Method Summary
 void addPrototypeForce(Force prototype)
           
 Force createForce(java.lang.String forceType)
           
 java.util.Collection<Force> getAvailableForces()
           
static ForceManager getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ForceManager getInstance()

createForce

public Force createForce(java.lang.String forceType)
                  throws ForceManager.UnknownForceTypeException
Throws:
ForceManager.UnknownForceTypeException

addPrototypeForce

public void addPrototypeForce(Force prototype)

getAvailableForces

public java.util.Collection<Force> getAvailableForces()