Class ControlButtons

java.lang.Object
org.opt4j.viewer.ControlButtons
All Implemented Interfaces:
ControlListener, OptimizerStateListener

public class ControlButtons extends Object implements OptimizerStateListener, ControlListener

The ControlButtons contains JButtons for the controls:

  • start
  • pause
  • stop
  • terminate
See Also:
  • Field Details

    • control

      protected final Control control
    • start

      protected JButton start
    • pause

      protected JButton pause
    • stop

      protected JButton stop
    • terminate

      protected JButton terminate
  • Constructor Details

    • ControlButtons

      @Inject public ControlButtons(Control control)
      Constructs a ControlButtons.
      Parameters:
      control - the control
  • Method Details

    • 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: OptimizerStateListener
      Invoked if the Optimizer starts the optimization process.
      Specified by:
      optimizationStarted in interface OptimizerStateListener
      Parameters:
      optimizer - the optimizer
    • optimizationStopped

      public void optimizationStopped(Optimizer optimizer)
      Description copied from interface: OptimizerStateListener
      Invoked if the Optimizer stops the optimization process.
      Specified by:
      optimizationStopped in interface OptimizerStateListener
      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: ControlListener
      Invoked if the state of the Control changes.
      Specified by:
      stateChanged in interface ControlListener
      Parameters:
      state - the current state of the optimization process