Package org.opt4j.viewer
Class ControlButtons
java.lang.Object
org.opt4j.viewer.ControlButtons
- All Implemented Interfaces:
ControlListener
,OptimizerStateListener
The ControlButtons
contains JButton
s for the controls:
- start
- pause
- stop
- terminate
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
Constructs the buttons.getPause()
Returns the pause button.getStart()
Returns the start button.getStop()
Returns the stop button.Returns the terminate button.void
optimizationStarted
(Optimizer optimizer) Invoked if theOptimizer
starts the optimization process.void
optimizationStopped
(Optimizer optimizer) Invoked if theOptimizer
stops the optimization process.void
stateChanged
(Control.State state) Invoked if the state of theControl
changes.protected void
Updates the view.
-
Field Details
-
control
-
start
-
pause
-
stop
-
terminate
-
-
Constructor Details
-
ControlButtons
Constructs aControlButtons
.- Parameters:
control
- the control
-
-
Method Details
-
construct
protected final void construct()Constructs the buttons. -
update
Updates the view. -
optimizationStarted
Description copied from interface:OptimizerStateListener
Invoked if theOptimizer
starts the optimization process.- Specified by:
optimizationStarted
in interfaceOptimizerStateListener
- Parameters:
optimizer
- the optimizer
-
optimizationStopped
Description copied from interface:OptimizerStateListener
Invoked if theOptimizer
stops the optimization process.- Specified by:
optimizationStopped
in interfaceOptimizerStateListener
- Parameters:
optimizer
- the optimizer
-
getStart
Returns the start button.- Returns:
- the start button
-
getPause
Returns the pause button.- Returns:
- the pause button
-
getStop
Returns the stop button.- Returns:
- the stop button
-
getTerminate
Returns the terminate button.- Returns:
- the terminate button
-
stateChanged
Description copied from interface:ControlListener
Invoked if the state of theControl
changes.- Specified by:
stateChanged
in interfaceControlListener
- Parameters:
state
- the current state of the optimization process
-