Class SimulationSettings
java.lang.Object
com.eco.bio7.simulation.SimulationSettings
The settings of a simulation model in Bio7: a custom view ("Settings") with
a control for each field with the annotation
Param and a button for
each method with the annotation Action (the same controls as the
HTML export, below the headings of their groups). A change sets the field of
the running model (live) or, with restart = true, sets it and calls the
setup.
A model can show an own panel, e.g., a Composite designed with the
WindowBuilder: Simulation.settings(Composite) creates it. The
widgets of its fields are bound to the model by their names (see
bind(Object, Simulation)).
-
Method Summary
Modifier and TypeMethodDescriptionstatic intbind(Object panel, Simulation model) Binds the widgets of a panel (e.g., a Composite designed with the WindowBuilder) to the model by the names of the fields of the panel: a Scale or Slider with the name of a Param field: the range of the Param (min, max, step), else the value of the selection a Spinner: the value (with its digits), a Text: the value as text a check Button: a boolean Param, a Combo: a String Param (the options of the Param if the Combo has no items) a Label with the name of a Param and "Value" (e.g., feedValue): shows the value a push Button with the name of an Action method: calls the method; the names setup and export: the setup and the HTML export Called automatically for the panel ofSimulation.settings(Composite).static voidshow(Simulation model) Shows the settings of the model (in the thread of the user interface).
-
Method Details
-
show
Shows the settings of the model (in the thread of the user interface). -
bind
Binds the widgets of a panel (e.g., a Composite designed with the WindowBuilder) to the model by the names of the fields of the panel:- a Scale or Slider with the name of a Param field: the range of the Param (min, max, step), else the value of the selection
- a Spinner: the value (with its digits), a Text: the value as text
- a check Button: a boolean Param, a Combo: a String Param (the options of the Param if the Combo has no items)
- a Label with the name of a Param and "Value" (e.g., feedValue): shows the value
- a push Button with the name of an Action method: calls the method; the names setup and export: the setup and the HTML export
Simulation.settings(Composite).- Parameters:
panel- the object with the widgets as fieldsmodel- the simulation model- Returns:
- the number of the bound widgets
-