-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.interfaces.OutputMonitor,java.io.Serializable
public interface FXOutputMonitor<T, P extends Position2D<out P>> implements OutputMonitor<T, P>
OutputMonitorthat handles the graphical part of the simulation in JavaFX.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumFXOutputMonitor.ViewStatusThe enum models the status of the view.
-
Method Summary
Modifier and Type Method Description abstract voidsetRealTime(boolean realTime)If enabled, the monitor tries to synchronize the simulation time with the real time, slowing down the simulator if needed. abstract voidrepaint()Repaints this javafx.scene.canvas.Canvas' javafx.scene.canvas.GraphicsContext by drawing all the Effects of each it.unibo.alchemist.model.interfaces.Node of the specified it.unibo.alchemist.model.interfaces.Environment. abstract Collection<EffectGroup<P>>getEffects()Getter method for the Effects to draw. abstract voidsetEffects(Collection<EffectGroup<P>> effects)Setter method for the effects to draw. abstract voidaddEffects(Collection<EffectGroup<P>> effects)Add all the EffectGroups in the collection to the Effects to draw. abstract voidaddEffectGroup(EffectGroup<P> effects)Add the EffectGroup in the collection to the Effects to draw. abstract FXOutputMonitor.ViewStatusgetViewStatus()Getter method for the current view status. abstract voidsetViewStatus(FXOutputMonitor.ViewStatus viewStatus)Setter method for the current view status. abstract KeyboardActionListenergetKeyboardListener()Returns the keyboard listener associated with this monitor. abstract NodeasJavaFXNode()Returns the JavaFX Node that is this monitor. -
-
Method Detail
-
setRealTime
abstract void setRealTime(boolean realTime)
If enabled, the monitor tries to synchronize the simulation time with the real time, slowing down the simulator if needed. If the simulation is slower than the real time, then the display refreshes fast enough to keep the default frame rate.
- Parameters:
realTime- true for the real time mode
-
repaint
abstract void repaint()
Repaints this javafx.scene.canvas.Canvas' javafx.scene.canvas.GraphicsContext by drawing all the Effects of each it.unibo.alchemist.model.interfaces.Node of the specified it.unibo.alchemist.model.interfaces.Environment.
-
getEffects
abstract Collection<EffectGroup<P>> getEffects()
Getter method for the Effects to draw.
-
setEffects
abstract void setEffects(Collection<EffectGroup<P>> effects)
Setter method for the effects to draw.
All previous set Effects are removed.
- Parameters:
effects- theEffectsto draw
-
addEffects
abstract void addEffects(Collection<EffectGroup<P>> effects)
Add all the EffectGroups in the collection to the Effects to draw.
- Parameters:
effects- the EffectGroups to draw
-
addEffectGroup
abstract void addEffectGroup(EffectGroup<P> effects)
Add the EffectGroup in the collection to the Effects to draw.
- Parameters:
effects- the EffectGroup to draw
-
getViewStatus
abstract FXOutputMonitor.ViewStatus getViewStatus()
Getter method for the current view status.
-
setViewStatus
abstract void setViewStatus(FXOutputMonitor.ViewStatus viewStatus)
Setter method for the current view status.
- Parameters:
viewStatus- theViewStatusto set
-
getKeyboardListener
abstract KeyboardActionListener getKeyboardListener()
Returns the keyboard listener associated with this monitor.
-
asJavaFXNode
abstract Node asJavaFXNode()
Returns the JavaFX Node that is this monitor.
-
-
-
-