Package org.evoludo.simulator.views
Class Distribution.TraitCommand
Object
TraitCommand
- All Implemented Interfaces:
Scheduler.ScheduledCommand
,Command
- Enclosing class:
Distribution
Command to toggle the inclusion of a trait on the phase plane axis.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
The axis that this command affects.(package private) int
The index of the trait to show on the axis.(package private) ContextMenuCheckBoxItem[]
The list of traits to toggle.static final int
The index of the horizontal axis.static final int
The index of the vertical axis. -
Constructor Summary
ConstructorsConstructorDescriptionTraitCommand
(ContextMenuCheckBoxItem[] traitItems, int idx, int axis) Construct a new command to toggle the inclusion of a trait on either one of the phase plane axis. -
Method Summary
-
Field Details
-
X_AXIS
public static final int X_AXISThe index of the horizontal axis.- See Also:
-
Y_AXIS
public static final int Y_AXISThe index of the vertical axis.- See Also:
-
idx
int idxThe index of the trait to show on the axis. -
axis
int axisThe axis that this command affects. -
traitItems
ContextMenuCheckBoxItem[] traitItemsThe list of traits to toggle.
-
-
Constructor Details
-
TraitCommand
Construct a new command to toggle the inclusion of a trait on either one of the phase plane axis.- Parameters:
traitItems
- the list of traits to toggleidx
- the index of the trait to show/hide on the axisaxis
- the index of the axis
-
-
Method Details
-
execute
public void execute()- Specified by:
execute
in interfaceCommand
- Specified by:
execute
in interfaceScheduler.ScheduledCommand
-