public class ReactorController extends AbstractPlantController implements IPlantControllerManagerListener
Reactor
model with the ReactorView
. Any updates to the view should be
coordinated through this class.component
Constructor and Description |
---|
ReactorController(Reactor model,
ReactorView view,
IRenderQueue renderQueue,
PlantControllerManager manager)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addedController(PlantComponent component,
AbstractPlantController controller)
A controller was created for a PlantComponent.
|
void |
removedController(PlantComponent component)
A controller was just deleted for a PlantComponent.
|
void |
update(IUpdateable component)
|
setBaseColor, setWireFrame
dispose, getModel, setParentNode
public ReactorController(Reactor model, ReactorView view, IRenderQueue renderQueue, PlantControllerManager manager)
model
- The model (a Reactor
) for which this controller
provides a view.view
- The view (a ReactorView
) associated with this
controller.renderQueue
- The queue responsible for tasks that need to be performed on
the jME rendering thread.manager
- A PlantControllerManager
used for looking up
PipeController
s for the current Pipe
s
contained by the Reactor.public void update(IUpdateable component)
view
depending on the changes in the model
.
It also updates the view based on changes to pipes contained in this
reactor.update
in interface IUpdateableListener
update
in class AbstractController
component
- The component that was updated in some way.public void addedController(PlantComponent component, AbstractPlantController controller)
IPlantControllerManagerListener
addedController
in interface IPlantControllerManagerListener
component
- The PlantComponent that now has a controller.controller
- The AbstractPlantController for the component.public void removedController(PlantComponent component)
IPlantControllerManagerListener
removedController
in interface IPlantControllerManagerListener
component
- The PlantComponent that no longer has a controller.