fr.ifremer.isisfish.ui.input
Class InputHandler

java.lang.Object
  extended by fr.ifremer.isisfish.ui.CommonHandler
      extended by fr.ifremer.isisfish.ui.input.InputHandler
Direct Known Subclasses:
SensitivityInputHandler

public class InputHandler
extends CommonHandler

Main handler for fishery edition action. Next, each ui as his own handler. In context :

Version:
$Revision: 3539 $ Last update : $Date: 2011-11-25 17:42:01 +0100 (Fri, 25 Nov 2011) $ By : $Author: echatellier $
Author:
chatellier

Field Summary
protected  Map<Class<?>,InputContentUI<?>> uiInstanceCache
          Cache pour n'instancier les ui qu'une seule fois et eviter que l'affichage saute pour l'utilsateur.
 
Constructor Summary
InputHandler()
           
 
Method Summary
 void accept(InputContentUI<?> inputContentUI, ActionEvent e)
          Action appelée lors du clic sur un layer (sensitivity).
 void commitRegionInCVS(InputUI inputUI)
          Commit region.
 void copyRegion(InputUI inputUI)
          Copy la region avec un autre nom.
 void createNewRegion(InputUI inputUI)
          Create new region (called if region name is not empty).
 void deleteTreeNode(InputUI inputUI, String topiaId)
          Delete tree node referenced by parent, and auto select parent node.
 void displayFactorWizard(InputContentUI<?> inputContentUI, Class<? extends org.nuiton.topia.persistence.TopiaEntityContextable> sensitivityBeanClass, String sensitivityBeanID, String sensitivityMethod)
           
 void exportRegion(InputUI inputUI)
          Exporter la region dans un zip Call only if region is loaded.
 void exportRegionSensitivityFactors(InputUI inputUI)
          Explore region and export any enabled sensitivity factor name with value.
 Species findSpecies(InputUI inputUI)
          Dans le cas d'une creation de population, on doit la creer dans une espèce.
protected  InputContentUI<?> getUIInstanceForBeanClass(Class<?> internalClass, NavigationUI navigationUI)
          Get ui that can display internalClass.
 void importRegion(InputUI inputUI)
          Exporter la region dans un zip.
 void importRegionAndRename(InputUI inputUI)
          Exporter la region dans un zip.
 void importRegionFromSimulation(InputUI inputUI)
          Extract from a simulation the region, and rename it with name given by user.
 void importV2Region(InputUI inputUI)
          Importer la region depuis un fichier XML de la version 2.
 void insertTreeNode(InputUI inputUI, Class nodeClass, org.nuiton.topia.persistence.TopiaEntityContextable topiaEntity)
          Insert new tree node and select it.
protected  void loadRegion(InputUI inputUI, String name)
          Load region by region name, set it into jaxx context and refresh ui.
 void nodeSelectionChanged(InputUI inputUI, TreeSelectionEvent event)
          Changement de selection dans l'arbre de la pecherie.
protected  void refreshRegionList(InputUI inputUI, String selectedItem)
          Rafraichit la liste des regions.
 void regionChange(InputUI inputUI, ItemEvent e)
          Main ui fishery region selection changed.
 void reloadFisheryTree(InputUI inputUI)
          Reload current loaded fishery tree.
 void removeRegion(InputUI inputUI, boolean vcsDelete)
          Remove region.
 void setTreeSelection(InputContentUI<?> inputUI, String nodeId)
          Change tree selection with new node id.
 void setTreeSelection(InputContentUI<?> inputUI, String parentNodeId, String nodeId)
          Change tree selection with new node id.
 void updateTreeNode(InputUI inputUI, String topiaId)
          Update tree node for topiaId.
 
Methods inherited from class fr.ifremer.isisfish.ui.CommonHandler
setStatusMessage, setStatusMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uiInstanceCache

protected Map<Class<?>,InputContentUI<?>> uiInstanceCache
Cache pour n'instancier les ui qu'une seule fois et eviter que l'affichage saute pour l'utilsateur.

Constructor Detail

InputHandler

public InputHandler()
Method Detail

loadRegion

protected void loadRegion(InputUI inputUI,
                          String name)
Load region by region name, set it into jaxx context and refresh ui. Before loading region, try to close old one.

Parameters:
inputUI - input ui
name - region name to load

reloadFisheryTree

public void reloadFisheryTree(InputUI inputUI)
Reload current loaded fishery tree.

Parameters:
inputUI - inputUI

regionChange

public void regionChange(InputUI inputUI,
                         ItemEvent e)
Main ui fishery region selection changed.

Parameters:
inputUI - inputUI
e - event

createNewRegion

public void createNewRegion(InputUI inputUI)
Create new region (called if region name is not empty).

Parameters:
inputUI - inputUI

refreshRegionList

protected void refreshRegionList(InputUI inputUI,
                                 String selectedItem)
Rafraichit la liste des regions.

Parameters:
inputUI - inputUI
selectedItem - region to select

importRegion

public void importRegion(InputUI inputUI)
Exporter la region dans un zip.

Parameters:
inputUI - inputUI

importRegionAndRename

public void importRegionAndRename(InputUI inputUI)
Exporter la region dans un zip.

Parameters:
inputUI - inputUI

importV2Region

public void importV2Region(InputUI inputUI)
Importer la region depuis un fichier XML de la version 2.

Parameters:
inputUI - inputUI

importRegionFromSimulation

public void importRegionFromSimulation(InputUI inputUI)
Extract from a simulation the region, and rename it with name given by user.

Parameters:
inputUI - inputUI

exportRegion

public void exportRegion(InputUI inputUI)
Exporter la region dans un zip Call only if region is loaded.

Parameters:
inputUI - inputUI

removeRegion

public void removeRegion(InputUI inputUI,
                         boolean vcsDelete)
Remove region.

Parameters:
inputUI - input ui
vcsDelete - if true delete region in CVS too

copyRegion

public void copyRegion(InputUI inputUI)
Copy la region avec un autre nom.

Parameters:
inputUI - input ui

commitRegionInCVS

public void commitRegionInCVS(InputUI inputUI)
Commit region.

Parameters:
inputUI - input ui

exportRegionSensitivityFactors

public void exportRegionSensitivityFactors(InputUI inputUI)
Explore region and export any enabled sensitivity factor name with value.

Parameters:
inputUI - input ui

nodeSelectionChanged

public void nodeSelectionChanged(InputUI inputUI,
                                 TreeSelectionEvent event)
Changement de selection dans l'arbre de la pecherie.

Parameters:
inputUI -
event -

getUIInstanceForBeanClass

protected InputContentUI<?> getUIInstanceForBeanClass(Class<?> internalClass,
                                                      NavigationUI navigationUI)
                                               throws Exception
Get ui that can display internalClass.

Parameters:
internalClass - internal class to get ui
topiaEntity - topia entity to set into ui
Returns:
ui for class
Throws:
Exception

setTreeSelection

public void setTreeSelection(InputContentUI<?> inputUI,
                             String nodeId)
Change tree selection with new node id. Called by specific UI (CellUI to change node).

Parameters:
inputUI - context ui (to get context value tree helper...)
nodeId - node id to select

setTreeSelection

public void setTreeSelection(InputContentUI<?> inputUI,
                             String parentNodeId,
                             String nodeId)
Change tree selection with new node id. Called by specific UI (CellUI to change node).

Parameters:
inputUI - context ui (to get context value tree helper...)
parentNodeId - find node to select from this node
nodeId - node id to select

deleteTreeNode

public void deleteTreeNode(InputUI inputUI,
                           String topiaId)
Delete tree node referenced by parent, and auto select parent node.

Parameters:
inputUI - ui containing tree
topiaId - node id to delete

insertTreeNode

public void insertTreeNode(InputUI inputUI,
                           Class nodeClass,
                           org.nuiton.topia.persistence.TopiaEntityContextable topiaEntity)
Insert new tree node and select it.

Parameters:
inputUI - ui containing tree
nodeClass - node type to create
topiaEntity - node to insert

updateTreeNode

public void updateTreeNode(InputUI inputUI,
                           String topiaId)
Update tree node for topiaId.

Parameters:
inputUI - ui containing tree
topiaId - node id to update

accept

public void accept(InputContentUI<?> inputContentUI,
                   ActionEvent e)
Action appelée lors du clic sur un layer (sensitivity).

Parameters:
inputContentUI - inputContentUI
e - l'event initial intersepté par le layer

displayFactorWizard

public void displayFactorWizard(InputContentUI<?> inputContentUI,
                                Class<? extends org.nuiton.topia.persistence.TopiaEntityContextable> sensitivityBeanClass,
                                String sensitivityBeanID,
                                String sensitivityMethod)

findSpecies

public Species findSpecies(InputUI inputUI)
Dans le cas d'une creation de population, on doit la creer dans une espèce. On doit rechercher celle qui est sélectionnée dans l'arbre.

Parameters:
inputUI - input ui
Returns:
selected species


Copyright © 1999-2012 CodeLutin. All Rights Reserved.