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 JButtongetControl()TerminationConditiongetTerminationCondition()voidreset()Enables the GUI control and resets the abort condition ready for use.voidsetDescription(String description)Provides a textual description of the purpose of the control.
-
-
-
Method Detail
-
getControl
public JButton getControl()
- Specified by:
getControlin 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:
resetin interfaceEvolutionControl
-
getTerminationCondition
public TerminationCondition getTerminationCondition()
- Returns:
- A
TerminationConditionthat is tied to this control. It can be passed to anEvolutionEngineso 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:
setDescriptionin interfaceEvolutionControl- Parameters:
description- The description of the control.
-
-