org.wilmascope.forcelayout
Class ForceManager
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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()