-
- All Implemented Interfaces:
-
javafx.fxml.Initializable
public class ButtonsBarController<P extends Position2D<out P>> implements InitializableThis class models a JavaFX controller for ButtonsBarLayout.fxml.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringBUTTONS_BAR_LAYOUTprivate ButtonstartStopButtonprivate Optional<FXOutputMonitor<out Object, out Object>>displayMonitor
-
Constructor Summary
Constructors Constructor Description ButtonsBarController()Default constructor. ButtonsBarController(FXOutputMonitor<out Object, out Object> displayMonitor)Same as default constructor, but lets specify an it.unibo.alchemist.boundary.interfaces.OutputMonitor to display the effects. ButtonsBarController(Button playPauseButton, Label timeLabel, Label stepLabel)Same as default constructor, but lets specify the play/pause Button, a Label for the steps and a Label for the time. ButtonsBarController(FXOutputMonitor<out Object, out Object> displayMonitor, Button playPauseButton, Label timeLabel, Label stepLabel)Same as default constructor, but lets specify an it.unibo.alchemist.boundary.interfaces.OutputMonitor to display the effects, the play/pause Button, a Label for the steps and a Label for the time.
-
Method Summary
Modifier and Type Method Description final voidsetStartStopButton(Button button)Sets the play/pause toggle. final Optional<FXOutputMonitor<out Object, out Object>>getDisplayMonitor()Getter method for the graphical it.unibo.alchemist.boundary.interfaces.OutputMonitor. final voidsetDisplayMonitor(@Nullable() FXOutputMonitor<out Object, out Object> displayMonitor)Setter method for the graphical it.unibo.alchemist.boundary.interfaces.OutputMonitor. voidinitialize(URL location, ResourceBundle resources)final voidsetTimeMonitor(Label timeMonitor)Sets the time monitor label. final voidsetStepMonitor(Label stepMonitor)Sets the step monitor label. ObservableList<EffectGroup<P>>getObservableEffectsList()Getter method for the Listof groups of effects in the side drawer.-
-
Constructor Detail
-
ButtonsBarController
ButtonsBarController()
Default constructor.
-
ButtonsBarController
ButtonsBarController(FXOutputMonitor<out Object, out Object> displayMonitor)
Same as default constructor, but lets specify an it.unibo.alchemist.boundary.interfaces.OutputMonitor to display the effects.- Parameters:
displayMonitor- the graphicalOutputMonitor
-
ButtonsBarController
ButtonsBarController(Button playPauseButton, Label timeLabel, Label stepLabel)
Same as default constructor, but lets specify the play/pause Button, a Label for the steps and a Label for the time.- Parameters:
playPauseButton- the play/pauseButton; should probably be a it.unibo.alchemist.boundary.monitor.PlayPauseMonitortimeLabel- theLabelfor the steps; should probably be a it.unibo.alchemist.boundary.monitor.generic.NumericLabelMonitorstepLabel- theLabelfor the time; should probably be a it.unibo.alchemist.boundary.monitor.generic.NumericLabelMonitor
-
ButtonsBarController
ButtonsBarController(FXOutputMonitor<out Object, out Object> displayMonitor, Button playPauseButton, Label timeLabel, Label stepLabel)
Same as default constructor, but lets specify an it.unibo.alchemist.boundary.interfaces.OutputMonitor to display the effects, the play/pause Button, a Label for the steps and a Label for the time.- Parameters:
displayMonitor- the graphical it.unibo.alchemist.boundary.interfaces.OutputMonitorplayPauseButton- the play/pauseButton; should probably be a it.unibo.alchemist.boundary.monitor.PlayPauseMonitortimeLabel- theLabelfor the steps; should probably be a it.unibo.alchemist.boundary.monitor.generic.NumericLabelMonitorstepLabel- theLabelfor the time; should probably be a it.unibo.alchemist.boundary.monitor.generic.NumericLabelMonitor
-
-
Method Detail
-
setStartStopButton
final void setStartStopButton(Button button)
Sets the play/pause toggle.
- Parameters:
button- the play/pause toggle button
-
getDisplayMonitor
final Optional<FXOutputMonitor<out Object, out Object>> getDisplayMonitor()
Getter method for the graphical it.unibo.alchemist.boundary.interfaces.OutputMonitor.
-
setDisplayMonitor
final void setDisplayMonitor(@Nullable() FXOutputMonitor<out Object, out Object> displayMonitor)
Setter method for the graphical it.unibo.alchemist.boundary.interfaces.OutputMonitor.
- Parameters:
displayMonitor- the graphical it.unibo.alchemist.boundary.interfaces.OutputMonitor to set; if null, it will be unset
-
initialize
void initialize(URL location, ResourceBundle resources)
-
setTimeMonitor
final void setTimeMonitor(Label timeMonitor)
Sets the time monitor label.
- Parameters:
timeMonitor- the time monitor label
-
setStepMonitor
final void setStepMonitor(Label stepMonitor)
Sets the step monitor label.
- Parameters:
stepMonitor- the step monitor label
-
getObservableEffectsList
ObservableList<EffectGroup<P>> getObservableEffectsList()
Getter method for the
Listof groups of effects in the side drawer.
-
-
-
-