Class FactorWizardHandler

java.lang.Object
fr.ifremer.isisfish.ui.sensitivity.wizard.FactorWizardHandler
All Implemented Interfaces:
ContinuousPanelListener

public class FactorWizardHandler extends Object implements ContinuousPanelListener
Handler for all class in wizard packages.
Version:
$Revision$ Last update : $Date$ By : $Author$
Author:
chatellier
  • Field Details

  • Constructor Details

    • FactorWizardHandler

      public FactorWizardHandler(FactorWizardUI factorWizardUI)
  • 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
      Use region storage here.
      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 - factorWizardUI
      bean - bean in current ui
      property - bean property to edit
    • initExistingFactor

      public void initExistingFactor(FactorWizardUI factorWizardUI, Factor factor)
      Appelé suite a un double clic sur l'arbre des facteurs pour modifier un facteur.
      Parameters:
      factorWizardUI - view to init
      factor - 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 editor
      factor - factor for path value
      domain - 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

      public void addTabs(FactorWizardUI factorWizardUI)
      Rafraichit l'assistant de facteur pour modifier le nombre de valeurs (onglet) d'un composant discret.
      Parameters:
      factorWizardUI - factorWizardUI
    • getNewDiscreteComponent

      protected JComponent getNewDiscreteComponent(FactorWizardUI factorWizardUI)
      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

      public void save(FactorWizardUI factorWizardUI)
      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 name
      comment - comment
      path - factor path
      panel - panel
      exist - 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

      public void remove(FactorWizardUI factorWizardUI)
      Remove current factor.
      Parameters:
      factorWizardUI - factorWizardUI
    • addFactor

      protected void addFactor(Factor f)
    • 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

      public void addDiscreteFactor(String name, String comment, String path, List<Object> values, boolean exist)
    • addDiscreteRuleFactor

      public void addDiscreteRuleFactor(String name, String comment, String path, List<Object> values, boolean exist)
    • addDiscreteEquationFactor

      public void addDiscreteEquationFactor(String name, String comment, String path, List<Object> values, boolean exist)
    • addDiscreteFactor

      protected void addDiscreteFactor(DiscreteDomain domain, String name, String comment, String path, List<Object> values, boolean exist)
    • addContinuousEquationFactor

      public void addContinuousEquationFactor(Factor f, boolean exist)
    • removeFactor

      public void removeFactor(String factorPath)
      Remove factor in factor group tree by path.
      Parameters:
      factorPath - factor path to remove
    • removeFactor

      protected void removeFactor(FactorGroup factorGroup, String factorPath)
      Recursive remove for factor in factor group by path.
      Parameters:
      factorGroup - factor group to search to
      factorPath - factor path to remove
    • getFactorGroup

      protected FactorGroup getFactorGroup()
    • getParameters

      protected SimulationParameter getParameters()
    • panelChanged

      public void panelChanged()
      Specified by:
      panelChanged in interface ContinuousPanelListener