public class ArchiveWidget extends Object implements OptimizerIterationListener, IndividualSetListener, Widget, ObjectivesMonitor.ObjectivesListener
| Constructor and Description |
|---|
ArchiveWidget(Archive archive,
Optimizer optimizer,
Set<IndividualMouseListener> mouseListeners,
ObjectivesMonitor objectivesMonitor)
Constructs an
ArchiveWidget. |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndividualMouseListener(IndividualMouseListener listener)
Adds a
IndividualMouseListener. |
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 |
init(Viewport viewport)
Called once after the widget is added to the
Viewport. |
void |
iterationComplete(Optimizer optimizer,
int iteration)
Invoked if the
Optimizer completes an iteration. |
void |
objectives(Collection<Objective> obj)
Callback method that passes the objectives of the optimization
problem.
|
void |
removeIndivdiualMouseListener(IndividualMouseListener listener)
Removes a
IndividualMouseListener. |
@Inject public ArchiveWidget(Archive archive, Optimizer optimizer, Set<IndividualMouseListener> mouseListeners, ObjectivesMonitor objectivesMonitor)
ArchiveWidget.archive - the archiveoptimizer - the optimizermouseListeners - listeners for mouse events on IndividualsobjectivesMonitor - the objective monitor that determine the objective of the
optimization problempublic void init(Viewport viewport)
WidgetViewport.public void addIndividualMouseListener(IndividualMouseListener listener)
IndividualMouseListener.listener - the individual mouse listener to be addedpublic void removeIndivdiualMouseListener(IndividualMouseListener listener)
IndividualMouseListener.listener - the individual mouse listener to be removedpublic void iterationComplete(Optimizer optimizer, int iteration)
OptimizerIterationListenerOptimizer completes an iteration.iterationComplete in interface OptimizerIterationListeneroptimizer - the optimizeriteration - the completed iterationpublic 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