Package org.uncommons.watchmaker.swing
Class AbortControl
- java.lang.Object
-
- org.uncommons.watchmaker.swing.AbortControl
-
- All Implemented Interfaces:
EvolutionControl
public class AbortControl extends Object implements EvolutionControl
A GUI control that allows the user to abort an evolutionary program.
-
-
Constructor Summary
Constructors Constructor Description AbortControl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JButton
getControl()
TerminationCondition
getTerminationCondition()
void
reset()
Enables the GUI control and resets the abort condition ready for use.void
setDescription(String description)
Provides a textual description of the purpose of the control.
-
-
-
Method Detail
-
getControl
public JButton getControl()
- Specified by:
getControl
in interfaceEvolutionControl
- Returns:
- A button that, when pressed, will trigger the abort condition associated with this control.
-
reset
public void reset()
Enables the GUI control and resets the abort condition ready for use.- Specified by:
reset
in interfaceEvolutionControl
-
getTerminationCondition
public TerminationCondition getTerminationCondition()
- Returns:
- A
TerminationCondition
that is tied to this control. It can be passed to anEvolutionEngine
so that the evolution is aborted when this control is invoked.
-
setDescription
public final void setDescription(String description)
Provides a textual description of the purpose of the control. This may be displayed somewhere on the GUI component (typically as tooltip text).- Specified by:
setDescription
in interfaceEvolutionControl
- Parameters:
description
- The description of the control.
-
-