org.opt4j.viewer
Class ControlButtons

java.lang.Object
  extended by org.opt4j.viewer.ControlButtons
All Implemented Interfaces:
org.opt4j.core.optimizer.ControlListener, org.opt4j.core.optimizer.OptimizerStateListener

public class ControlButtons
extends java.lang.Object
implements org.opt4j.core.optimizer.OptimizerStateListener, org.opt4j.core.optimizer.ControlListener

The ControlButtons contains JButtons for the controls:

See Also:
Control

Field Summary
protected  org.opt4j.core.optimizer.Control control
           
protected  javax.swing.JButton pause
           
protected  javax.swing.JButton start
           
protected  javax.swing.JButton stop
           
protected  javax.swing.JButton terminate
           
 
Constructor Summary
ControlButtons(org.opt4j.core.optimizer.Control control)
          Constructs a ControlButtons.
 
Method Summary
protected  void construct()
          Constructs the buttons.
 javax.swing.JButton getPause()
          Returns the pause button.
 javax.swing.JButton getStart()
          Returns the start button.
 javax.swing.JButton getStop()
          Returns the stop button.
 javax.swing.JButton getTerminate()
          Returns the terminate button.
 void optimizationStarted(org.opt4j.core.optimizer.Optimizer optimizer)
           
 void optimizationStopped(org.opt4j.core.optimizer.Optimizer optimizer)
           
 void stateChanged(org.opt4j.core.optimizer.Control.State state)
           
protected  void update(org.opt4j.core.optimizer.Optimizer optimizer)
          Updates the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

control

protected final org.opt4j.core.optimizer.Control control

start

protected javax.swing.JButton start

pause

protected javax.swing.JButton pause

stop

protected javax.swing.JButton stop

terminate

protected javax.swing.JButton terminate
Constructor Detail

ControlButtons

@Inject
public ControlButtons(org.opt4j.core.optimizer.Control control)
Constructs a ControlButtons.

Parameters:
control - the control
Method Detail

construct

protected final void construct()
Constructs the buttons.


update

protected void update(org.opt4j.core.optimizer.Optimizer optimizer)
Updates the view.


optimizationStarted

public void optimizationStarted(org.opt4j.core.optimizer.Optimizer optimizer)
Specified by:
optimizationStarted in interface org.opt4j.core.optimizer.OptimizerStateListener

optimizationStopped

public void optimizationStopped(org.opt4j.core.optimizer.Optimizer optimizer)
Specified by:
optimizationStopped in interface org.opt4j.core.optimizer.OptimizerStateListener

getStart

public javax.swing.JButton getStart()
Returns the start button.

Returns:
the start button

getPause

public javax.swing.JButton getPause()
Returns the pause button.

Returns:
the pause button

getStop

public javax.swing.JButton getStop()
Returns the stop button.

Returns:
the stop button

getTerminate

public javax.swing.JButton getTerminate()
Returns the terminate button.

Returns:
the terminate button

stateChanged

public void stateChanged(org.opt4j.core.optimizer.Control.State state)
Specified by:
stateChanged in interface org.opt4j.core.optimizer.ControlListener