Package org.opt4j.viewer
Class Viewer
- java.lang.Object
-
- org.opt4j.viewer.Viewer
-
- All Implemented Interfaces:
OptimizerStateListener
public class Viewer extends Object implements OptimizerStateListener
TheViewer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classViewer.CloseEventTheViewer.CloseEventthat is triggered if this viewer is closed.
-
Field Summary
Fields Modifier and Type Field Description protected Viewer.CloseEventcloseEventprotected booleancloseOnStopprotected Controlcontrolprotected JFrameframeprotected StatusBarstatusBarprotected Stringtitleprotected ToolBartoolBarprotected Viewportviewport
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidoptimizationStarted(Optimizer optimizer)Invoked if theOptimizerstarts the optimization process.voidoptimizationStopped(Optimizer optimizer)Invoked if theOptimizerstops the optimization process.
-
-
-
Field Detail
-
control
protected final Control control
-
closeEvent
protected final Viewer.CloseEvent closeEvent
-
closeOnStop
protected final boolean closeOnStop
-
title
protected final String title
-
viewport
protected final Viewport viewport
-
toolBar
protected final ToolBar toolBar
-
statusBar
protected final StatusBar statusBar
-
frame
protected JFrame frame
-
-
Constructor Detail
-
Viewer
@Inject public Viewer(Viewport viewport, ToolBar toolBar, StatusBar statusBar, Control control, String title, Viewer.CloseEvent closeEvent, boolean closeOnStop)
Constructs aViewer.- Parameters:
viewport- the viewporttoolBar- the toolBarstatusBar- the statusBarcontrol- the controltitle- the title of the framecloseEvent- event on closing the GUI windowcloseOnStop- close window at the end of the optimization run
-
-
Method Detail
-
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
-
-