Package org.opt4j.viewer
Class PopulationWidget
java.lang.Object
org.opt4j.viewer.PopulationWidget
- All Implemented Interfaces:
IndividualSetListener,IndividualStateListener,ObjectivesMonitor.ObjectivesListener,Widget
public class PopulationWidget
extends Object
implements IndividualStateListener, IndividualSetListener, Widget, ObjectivesMonitor.ObjectivesListener
A widget that monitors the
Population.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPopulationWidget(Population population, Archive archive, IndividualFactory individualFactory, ObjectivesMonitor objectivesMonitor) Constructs aPopulationWidget. -
Method Summary
Modifier and TypeMethodDescriptiongetPanel()Returns the panel with the content.protected final JTablegetTable()voidindividualAdded(IndividualSet collection, Individual individual) Invoked if theIndividualis added to theIndividualSet.voidindividualRemoved(IndividualSet collection, Individual individual) Invoked if theIndividualis removed from theIndividualSet.voidinidividualStateChanged(Individual individual) Invoked if theIndividualchanges its state.voidCalled once after the widget is added to theViewport.voidobjectives(Collection<Objective> obj) Callback method that passes the objectives of the optimization problem.protected voidpaint()
-
Field Details
-
OFFSET
protected static final int OFFSET- See Also:
-
archive
-
population
protected final org.opt4j.viewer.SynchronizedIndividualList population -
swtIndividuals
-
objectives
-
panel
-
table
-
size
protected int size -
task
-
-
Constructor Details
-
PopulationWidget
@Inject public PopulationWidget(Population population, Archive archive, IndividualFactory individualFactory, ObjectivesMonitor objectivesMonitor) Constructs aPopulationWidget.- Parameters:
population- the populationarchive- the archiveindividualFactory- the individual creatorobjectivesMonitor- the objective monitor that determine the objective of the optimization problem
-
-
Method Details
-
getTable
-
init
Description copied from interface:WidgetCalled once after the widget is added to theViewport. -
inidividualStateChanged
Description copied from interface:IndividualStateListenerInvoked if theIndividualchanges its state.- Specified by:
inidividualStateChangedin interfaceIndividualStateListener- Parameters:
individual- the individual that changes the state
-
individualAdded
Description copied from interface:IndividualSetListenerInvoked if theIndividualis added to theIndividualSet.- Specified by:
individualAddedin interfaceIndividualSetListener- Parameters:
collection- the observed collectionindividual- the added individual
-
individualRemoved
Description copied from interface:IndividualSetListenerInvoked if theIndividualis removed from theIndividualSet.- Specified by:
individualRemovedin interfaceIndividualSetListener- Parameters:
collection- the observed collectionindividual- the removed individual
-
paint
protected void paint() -
getPanel
Description copied from interface:WidgetReturns the panel with the content. -
objectives
Description copied from interface:ObjectivesMonitor.ObjectivesListenerCallback method that passes the objectives of the optimization problem.- Specified by:
objectivesin interfaceObjectivesMonitor.ObjectivesListener- Parameters:
obj- the objectives
-