Package fr.ifremer.isisfish.ui.simulator
Class ParamsHandler
java.lang.Object
fr.ifremer.isisfish.ui.CommonHandler
fr.ifremer.isisfish.ui.simulator.SimulatorTabHandler
fr.ifremer.isisfish.ui.simulator.ParamsHandler
Params UI handler.
-
Field Summary
Modifier and TypeFieldDescriptionprotected StorageChangeListener
protected SimulationServiceListener
protected String
protected ParamsUI
Fields inherited from class fr.ifremer.isisfish.ui.simulator.SimulatorTabHandler
simulationUI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFactorWithComponent
(JComponent source) Action appelée lors du clic sur les boutons a coté des composants factorisables.protected void
protected boolean
checkAndPrepare
(String fullSimulationId) protected Factor
getFactor
(FactorGroup factorGroup, String factorPath) Recursive search for factor in factor group by path.Search factor in factor group tree by path.getFilteredOldSimulatorNames
(boolean force) int
Return old simulations.Get population list to fill JList in paramUI.protected ComboBoxModel<String>
protected ComboBoxModel<String>
getSimulParamsSelectModel
(boolean force) Get strategies list to fill Jlist in ParamUI.protected void
protected void
protected void
Lance la simulation.void
launchSimulation
(String simulationId, SimulatorLauncher launcher) Launch automatically the simulation, when is possible (no other simulation) or wait for the last automatically simulation ended.void
launchSimulationWithSensibility
(String simulationId, SimulatorLauncher launcher) Launch simulation with factors variations parameters.protected void
boolean
loadOldSimulation
(String simulName) Load old simulation.void
Population selection changed.void
refresh()
protected void
regionChange
(ItemEvent event) Called on user region selection change.void
regionChange
(String regionName) Change region in simulation launcherprotected void
void
protected void
protected void
void
setNumberOfMonths
(String months) Change number of simulation month by parsing string value.void
void
setPopulations
(List<Population> populations) Set parameter population.protected void
void
setSimulationName
(String simulationName) void
setStrategies
(List<Strategy> strategies) Set parameters strategies.protected void
Methods inherited from class fr.ifremer.isisfish.ui.simulator.SimulatorTabHandler
getFactorGroup, getParameters, setTabSelectedIcon
Methods inherited from class fr.ifremer.isisfish.ui.CommonHandler
setStatusMessage, setStatusMessage
-
Field Details
-
tabUI
-
simulationListener
-
regionStorageListener
-
oldSimulNames
-
simulationName
-
-
Constructor Details
-
ParamsHandler
-
-
Method Details
-
initRegionComboModel
-
afterInit
protected void afterInit() -
setSimulationName
-
refresh
public void refresh() -
regionChange
Called on user region selection change. -
regionChange
Change region in simulation launcher- Parameters:
regionName
- region name
-
loadOldSimulation
Load old simulation. Reset some field to empty default values:- params
- simulation plans
- factors list
- params copy
- factors
- Parameters:
simulName
- name of simulation to load
-
getSimulationLauncher
-
setSensitivityTabRegion
protected void setSensitivityTabRegion() -
initSensitivityParams
protected void initSensitivityParams() -
loadOldSimulation
protected void loadOldSimulation() -
launchSimulation
protected void launchSimulation()Lance la simulation. -
launchSimulationWithSensibility
Launch simulation with factors variations parameters.- Parameters:
simulationId
- id of the simulation to simulatelauncher
- launcher to use- See Also:
-
checkAndPrepare
-
launchSimulation
Launch automatically the simulation, when is possible (no other simulation) or wait for the last automatically simulation ended.- Parameters:
simulationId
- id of the simulation to simulatelauncher
- launcher to use- See Also:
-
populationSelected
public void populationSelected()Population selection changed. Fill matrix panel with population effective of selected population. -
addFactorWithComponent
Action appelée lors du clic sur les boutons a coté des composants factorisables. Contrairement à l'interface 'input', on edite ici des facteurs existants, (créé à la première demande).- Parameters:
source
- la source de l'event
-
getFactor
Search factor in factor group tree by path.- Parameters:
factorPath
- factor path to search- Returns:
- found factor
-
getFactor
Recursive search for factor in factor group by path.- Parameters:
factorGroup
- factor group to search tofactorPath
- factor path to search- Returns:
- found factor
-
setListSimulParamsStrategiesItems
protected void setListSimulParamsStrategiesItems() -
setListSimulParamsPopulationsItems
protected void setListSimulParamsPopulationsItems() -
strategySelected
protected void strategySelected() -
getSimulParamsSelectModel
-
getSimulParamsSelectModel
-
resetFilter
protected void resetFilter() -
getOldSimulationItem
Return old simulations.- Returns:
- old simulations
-
getFilteredOldSimulatorNames
-
setOldSimulatorNames
-
resetOldSimulatorNames
public void resetOldSimulatorNames() -
getStrategies
Get strategies list to fill Jlist in ParamUI.- Returns:
- strategies list
-
setStrategies
Set parameters strategies.- Parameters:
strategies
-
-
getPopulations
Get population list to fill JList in paramUI.- Returns:
- populations list
-
setPopulations
Set parameter population.- Parameters:
populations
- populations to set
-
getNumberOfMonths
public int getNumberOfMonths() -
setNumberOfMonths
Change number of simulation month by parsing string value. Default to 1 if value is not parsable.- Parameters:
months
- number of months to set
-