net.jinx.physics.spring
Class SpringManager

java.lang.Object
  extended by net.jinx.action.Actor
      extended by net.jinx.physics.spring.SpringManager
All Implemented Interfaces:
Force

public class SpringManager
extends Actor
implements Force


Constructor Summary
SpringManager()
           
 
Method Summary
 void added(PhysicalObject obj)
          Called by Universe to notify this Force that a PhysicalObject has been added to the simulation.
 void applyForce(PhysicalObject obj)
          Provides the force acting on object due to this Force.
static boolean isSpringNode(PhysicalObject obj)
           
protected  void processEvent(ActorEvent e)
          Processes an ActorEvent.
 void removed(PhysicalObject obj)
          Called by Universe to notify this Force that a PhysicalObject has been removed from the simulation.
 
Methods inherited from class net.jinx.action.Actor
checkAllowAdd, getName, getOwner, hashCode, ownerChanged, sendEvent, sendEvent, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringManager

public SpringManager()
Method Detail

isSpringNode

public static boolean isSpringNode(PhysicalObject obj)

added

public void added(PhysicalObject obj)
Description copied from interface: Force
Called by Universe to notify this Force that a PhysicalObject has been added to the simulation.

Specified by:
added in interface Force
Parameters:
obj - the PhysicalObject that was added.

removed

public void removed(PhysicalObject obj)
Description copied from interface: Force
Called by Universe to notify this Force that a PhysicalObject has been removed from the simulation.

Specified by:
removed in interface Force
Parameters:
obj - the PhysicalObject that was removed.

applyForce

public void applyForce(PhysicalObject obj)
Description copied from interface: Force
Provides the force acting on object due to this Force.

Specified by:
applyForce in interface Force
Parameters:
obj - the PhysicalObject.

processEvent

protected void processEvent(ActorEvent e)
Description copied from class: Actor
Processes an ActorEvent. This is what most Actor objects exist for.

Specified by:
processEvent in class Actor
Parameters:
e - the ActorEvent to process.