public class PopulationWidget extends Object implements IndividualStateListener, IndividualSetListener, Widget, ObjectivesMonitor.ObjectivesListener
Population.| Constructor and Description |
|---|
PopulationWidget(Population population,
Archive archive,
IndividualFactory individualFactory,
ObjectivesMonitor objectivesMonitor)
Constructs a
PopulationWidget. |
| Modifier and Type | Method and Description |
|---|---|
JPanel |
getPanel()
Returns the panel with the content.
|
void |
individualAdded(IndividualSet collection,
Individual individual)
Invoked if the
Individual is added to the IndividualSet. |
void |
individualRemoved(IndividualSet collection,
Individual individual)
Invoked if the
Individual is removed from the
IndividualSet. |
void |
inidividualStateChanged(Individual individual)
Invoked if the
Individual changes its state. |
void |
init(Viewport viewport)
Called once after the widget is added to the
Viewport. |
void |
objectives(Collection<Objective> obj)
Callback method that passes the objectives of the optimization
problem.
|
@Inject public PopulationWidget(Population population, Archive archive, IndividualFactory individualFactory, ObjectivesMonitor objectivesMonitor)
PopulationWidget.population - the populationarchive - the archiveindividualFactory - the individual creatorobjectivesMonitor - the objective monitor that determine the objective of the
optimization problempublic void init(Viewport viewport)
WidgetViewport.public void inidividualStateChanged(Individual individual)
IndividualStateListenerIndividual changes its state.inidividualStateChanged in interface IndividualStateListenerindividual - the individual that changes the statepublic void individualAdded(IndividualSet collection, Individual individual)
IndividualSetListenerIndividual is added to the IndividualSet.individualAdded in interface IndividualSetListenercollection - the observed collectionindividual - the added individualpublic void individualRemoved(IndividualSet collection, Individual individual)
IndividualSetListenerIndividual is removed from the
IndividualSet.individualRemoved in interface IndividualSetListenercollection - the observed collectionindividual - the removed individualpublic JPanel getPanel()
Widgetpublic void objectives(Collection<Objective> obj)
ObjectivesMonitor.ObjectivesListenerobjectives in interface ObjectivesMonitor.ObjectivesListenerobj - the objectives