public class VisualizationControl extends java.lang.Object implements VisualEventListener
Constructor and Description |
---|
VisualizationControl()
Constructs a VisualControl.
|
Modifier and Type | Method and Description |
---|---|
void |
addControlEventListener(ControlEventListener listener)
Adds a ControlEventListener for receiving the ControlEvents from
the VisualModules
|
void |
addModule(VisualModule module)
Registers a VisualModule to the VisualizationController.
|
void |
fireControlEvent(ControlEvent evt)
Fires a ControlEvent.
|
static VisualizationClock |
getClock()
Gets the clock instance which determines the time value
for this VisualizationControl
|
VisualModule |
getModule(java.lang.String name)
Gets a registered VisualModule with the given name.
|
void |
removeControlEventListener(ControlEventListener listener)
Removes a registered ControlListener.
|
void |
removeModule(java.lang.String name)
Removes the VisualModule with the name from the VisualizationControl if present.
|
void |
setExecutionSpeed(double rate)
Sets the speed of the visualization clock to: real speed * rate.
|
void |
visualEventReceived(VisualEvent evt)
Invoked when a VisualEvent occurred.
|
public void addControlEventListener(ControlEventListener listener)
listener
- The listener to be added.public void addModule(VisualModule module)
module
- The VisualModule to be registered.public void fireControlEvent(ControlEvent evt)
evt
- The ControlEvent to be fired.public static VisualizationClock getClock()
public VisualModule getModule(java.lang.String name)
name
- The name of the registered VisualModule to be get.public void removeControlEventListener(ControlEventListener listener)
listener
- The listener to be removed.public void removeModule(java.lang.String name)
name
- The name of the VisualModule to be removed.public void setExecutionSpeed(double rate)
speed
- The execution speed rate. If the rate is <= 0, the
clock will keep running with the old speed.public void visualEventReceived(VisualEvent evt)
VisualEventListener
visualEventReceived
in interface VisualEventListener
evt
- The occurred VisualEvent.