Class FactorWizardHandler
java.lang.Object
fr.ifremer.isisfish.ui.sensitivity.wizard.FactorWizardHandler
- All Implemented Interfaces:
ContinuousPanelListener
Handler for all class in wizard packages.
- Version:
- $Revision$ Last update : $Date$ By : $Author$
- Author:
- chatellier
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContinuousEquationFactor(Factor f, boolean exist) voidaddContinuousFactor(String name, String comment, String path, ContinuousDomain domain, boolean exist) Ajout d'un facteur continue de type (min/max).voidaddDiscreteEquationFactor(String name, String comment, String path, List<Object> values, boolean exist) protected voidaddDiscreteFactor(DiscreteDomain domain, String name, String comment, String path, List<Object> values, boolean exist) voidvoidprotected voidvoidaddTabs(FactorWizardUI factorWizardUI) Rafraichit l'assistant de facteur pour modifier le nombre de valeurs (onglet) d'un composant discret.protected voidprotected ContinuousPanelgetContinuousPanel(Object value, org.nuiton.topia.persistence.TopiaEntityContextable bean, String property) Retourne le componant permettant de mettre en facteur continue une valeur.protected JComponentgetEditorWithValue(FactorWizardUI factorWizardUI, Factor factor, Domain domain, Object value) Renvoie un componsant gaphique initialisé avec la valeur qui est enregistré dans le domain.protected FactorGroupprotected ContinuousPanelgetNewContinuousComponent(FactorWizardUI factorWizardUI, String factorPath) Return new continuous component inited with value defined by factor path.protected JComponentgetNewDiscreteComponent(FactorWizardUI factorWizardUI) Return new discrete component inited with value defined by factor path.protected SimulationParameterprotected org.nuiton.topia.TopiaContextgetTopiaContext(FactorWizardUI factorWizardUI) Return opened topia context that need to be closed.protected ContinuousPanelgetTypeContinousComponent(FactorWizardUI factorWizardUI, Class type, Object value) Get new special component for typed parameters.protected JComponentgetTypeDiscreteComponent(FactorWizardUI factorWizardUI, Class type, Object value) Get new special component for typed parameters.voidinitExistingFactor(FactorWizardUI factorWizardUI, Factor factor) Appelé suite a un double clic sur l'arbre des facteurs pour modifier un facteur.voidinitNewFactor(FactorWizardUI factorWizardUI, org.nuiton.topia.persistence.TopiaEntityContextable bean, String property) Initialize un nouveau wizard avec lorsque l'utilisateur clic sur un layer sont le sous composant accepte la mise en facteur.voidvoidremove(FactorWizardUI factorWizardUI) Remove current factor.protected voidremoveFactor(FactorGroup factorGroup, String factorPath) Recursive remove for factor in factor group by path.voidremoveFactor(String factorPath) Remove factor in factor group tree by path.voidsave(FactorWizardUI factorWizardUI) Save current factor.protected voidsaveContinue(String name, String comment, String path, ContinuousPanel panel, boolean exist) Save a continous factor.protected voidsaveDiscret(String name, String comment, String path, Component[] components, boolean exist) Save a discret factor.
-
Field Details
-
factorWizardUI
-
-
Constructor Details
-
FactorWizardHandler
-
-
Method Details
-
afterInit
protected void afterInit() -
getTopiaContext
protected org.nuiton.topia.TopiaContext getTopiaContext(FactorWizardUI factorWizardUI) throws org.nuiton.topia.TopiaException Return opened topia context that need to be closed. There is several things in ugly jaxx context:- opened TopiaContext from SensitivityTabUI that is null in ParamUI
- RegionStorage on SimulAction
- Returns:
- opened topia context
- Throws:
org.nuiton.topia.TopiaException
-
initNewFactor
public void initNewFactor(FactorWizardUI factorWizardUI, org.nuiton.topia.persistence.TopiaEntityContextable bean, String property) Initialize un nouveau wizard avec lorsque l'utilisateur clic sur un layer sont le sous composant accepte la mise en facteur. On recupere des info sur le type correspondant à la proprieté a mettre en facteur pour savoir le composant d'edition et s'il peut etre continue ou pas.- Parameters:
factorWizardUI- factorWizardUIbean- bean in current uiproperty- bean property to edit
-
initExistingFactor
Appelé suite a un double clic sur l'arbre des facteurs pour modifier un facteur.- Parameters:
factorWizardUI- view to initfactor- factor factor to edit
-
getEditorWithValue
protected JComponent getEditorWithValue(FactorWizardUI factorWizardUI, Factor factor, Domain domain, Object value) Renvoie un componsant gaphique initialisé avec la valeur qui est enregistré dans le domain. Pour réédition d'un facteur existant (facteur discret).- Parameters:
factorWizardUI- context for context value (RegionStorage)value- type to get editorfactor- factor for path valuedomain- domain for domain type- Returns:
- component ui component with value
-
getContinuousPanel
protected ContinuousPanel getContinuousPanel(Object value, org.nuiton.topia.persistence.TopiaEntityContextable bean, String property) Retourne le componant permettant de mettre en facteur continue une valeur.- Parameters:
value- value (must be continuable)bean- bean (in case of equation)property- bean property (in case of equation)- Returns:
- component initialized
-
addTabs
Rafraichit l'assistant de facteur pour modifier le nombre de valeurs (onglet) d'un composant discret.- Parameters:
factorWizardUI- factorWizardUI
-
getNewDiscreteComponent
Return new discrete component inited with value defined by factor path. Le composant retourné est inclut dans un jscrollpane (sauf pour les matrices qui contient deja un jscrollpane)- Parameters:
factorWizardUI- factorWizardUI- Returns:
- component copy
-
getNewContinuousComponent
protected ContinuousPanel getNewContinuousComponent(FactorWizardUI factorWizardUI, String factorPath) Return new continuous component inited with value defined by factor path.- Parameters:
factorWizardUI- (to use topia context)factorPath- factor path- Returns:
- component initialized
-
getTypeDiscreteComponent
protected JComponent getTypeDiscreteComponent(FactorWizardUI factorWizardUI, Class type, Object value) Get new special component for typed parameters.- Parameters:
factorWizardUI-type-- Returns:
- rule discrete component
-
getTypeContinousComponent
protected ContinuousPanel getTypeContinousComponent(FactorWizardUI factorWizardUI, Class type, Object value) Get new special component for typed parameters.- Parameters:
factorWizardUI-type- type to get component- Returns:
- rule discrete component
-
save
Save current factor.- Parameters:
factorWizardUI- factorWizardUI
-
saveContinue
protected void saveContinue(String name, String comment, String path, ContinuousPanel panel, boolean exist) Save a continous factor.- Parameters:
name- factor namecomment- commentpath- factor pathpanel- panelexist- exist
-
saveDiscret
protected void saveDiscret(String name, String comment, String path, Component[] components, boolean exist) Save a discret factor.- Parameters:
name-comment-path-components-exist-
-
remove
Remove current factor.- Parameters:
factorWizardUI- factorWizardUI
-
addFactor
-
addContinuousFactor
public void addContinuousFactor(String name, String comment, String path, ContinuousDomain domain, boolean exist) Ajout d'un facteur continue de type (min/max).- Parameters:
name-comment-path-domain-exist-
-
addDiscreteFactor
-
addDiscreteRuleFactor
-
addDiscreteEquationFactor
-
addDiscreteFactor
-
addContinuousEquationFactor
-
removeFactor
Remove factor in factor group tree by path.- Parameters:
factorPath- factor path to remove
-
removeFactor
Recursive remove for factor in factor group by path.- Parameters:
factorGroup- factor group to search tofactorPath- factor path to remove
-
getFactorGroup
-
getParameters
-
panelChanged
public void panelChanged()- Specified by:
panelChangedin interfaceContinuousPanelListener
-