Package org.opt4j.viewer
Class ControlButtons
- java.lang.Object
-
- org.opt4j.viewer.ControlButtons
-
- All Implemented Interfaces:
ControlListener,OptimizerStateListener
public class ControlButtons extends Object implements OptimizerStateListener, ControlListener
The
ControlButtonscontainsJButtons for the controls:- start
- pause
- stop
- terminate
- See Also:
Control
-
-
Constructor Summary
Constructors Constructor Description ControlButtons(Control control)Constructs aControlButtons.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconstruct()Constructs the buttons.JButtongetPause()Returns the pause button.JButtongetStart()Returns the start button.JButtongetStop()Returns the stop button.JButtongetTerminate()Returns the terminate button.voidoptimizationStarted(Optimizer optimizer)Invoked if theOptimizerstarts the optimization process.voidoptimizationStopped(Optimizer optimizer)Invoked if theOptimizerstops the optimization process.voidstateChanged(Control.State state)Invoked if the state of theControlchanges.protected voidupdate(Optimizer optimizer)Updates the view.
-
-
-
Constructor Detail
-
ControlButtons
@Inject public ControlButtons(Control control)
Constructs aControlButtons.- Parameters:
control- the control
-
-
Method Detail
-
construct
protected final void construct()
Constructs the buttons.
-
update
protected void update(Optimizer optimizer)
Updates the view.
-
optimizationStarted
public void optimizationStarted(Optimizer optimizer)
Description copied from interface:OptimizerStateListenerInvoked if theOptimizerstarts the optimization process.- Specified by:
optimizationStartedin interfaceOptimizerStateListener- Parameters:
optimizer- the optimizer
-
optimizationStopped
public void optimizationStopped(Optimizer optimizer)
Description copied from interface:OptimizerStateListenerInvoked if theOptimizerstops the optimization process.- Specified by:
optimizationStoppedin interfaceOptimizerStateListener- Parameters:
optimizer- the optimizer
-
getStart
public JButton getStart()
Returns the start button.- Returns:
- the start button
-
getPause
public JButton getPause()
Returns the pause button.- Returns:
- the pause button
-
getStop
public JButton getStop()
Returns the stop button.- Returns:
- the stop button
-
getTerminate
public JButton getTerminate()
Returns the terminate button.- Returns:
- the terminate button
-
stateChanged
public void stateChanged(Control.State state)
Description copied from interface:ControlListenerInvoked if the state of theControlchanges.- Specified by:
stateChangedin interfaceControlListener- Parameters:
state- the current state of the optimization process
-
-