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
FieldsModifier and TypeFieldDescriptionprotected StorageChangeListenerprotected SimulationServiceListenerprotected Stringprotected ParamsUIFields inherited from class fr.ifremer.isisfish.ui.simulator.SimulatorTabHandler
simulationUI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFactorWithComponent(JComponent source) Action appelée lors du clic sur les boutons a coté des composants factorisables.protected voidprotected booleancheckAndPrepare(String fullSimulationId) protected FactorgetFactor(FactorGroup factorGroup, String factorPath) Recursive search for factor in factor group by path.Search factor in factor group tree by path.getFilteredOldSimulatorNames(boolean force) intReturn 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 voidprotected voidprotected voidLance la simulation.voidlaunchSimulation(String simulationId, SimulatorLauncher launcher) Launch automatically the simulation, when is possible (no other simulation) or wait for the last automatically simulation ended.voidlaunchSimulationWithSensibility(String simulationId, SimulatorLauncher launcher) Launch simulation with factors variations parameters.protected voidbooleanloadOldSimulation(String simulName) Load old simulation.voidPopulation selection changed.voidrefresh()protected voidregionChange(ItemEvent event) Called on user region selection change.voidregionChange(String regionName) Change region in simulation launcherprotected voidvoidprotected voidprotected voidvoidsetNumberOfMonths(String months) Change number of simulation month by parsing string value.voidvoidsetPopulations(List<Population> populations) Set parameter population.protected voidvoidsetSimulationName(String simulationName) voidsetStrategies(List<Strategy> strategies) Set parameters strategies.protected voidMethods inherited from class fr.ifremer.isisfish.ui.simulator.SimulatorTabHandler
getFactorGroup, getParameters, setTabSelectedIconMethods 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
-