fr.ifremer.coser.ui.control
Class ControlHandler

java.lang.Object
  extended by fr.ifremer.coser.ui.common.CommonHandler
      extended by fr.ifremer.coser.ui.common.DataHandler
          extended by fr.ifremer.coser.ui.control.ControlHandler

public class ControlHandler
extends DataHandler

Control handler for control view.

Version:
$Revision: 671 $ Last update : $Date: 2011-02-04 12:21:33 +0100 (ven., 04 févr. 2011) $ By : $Author: chatellier $
Author:
chatellier

Field Summary
 
Fields inherited from class fr.ifremer.coser.ui.common.CommonHandler
fileChooserInstance
 
Constructor Summary
ControlHandler()
           
 
Method Summary
 void cancelDataModification(ControlView view)
          Annule les modifications en cours reset les données data, et reload le validator.
 void categoryChanged(ControlView controlView, ActionEvent event)
          Selection d'une nouvelle categories dans la liste des categories.
 void checkData(ControlView view)
          Check project.
protected  void clearAllSelection(ControlView controlView)
          Vide la selection des 4 tables pour que le bean en cours d'edition soit vidé et que le changement de categories n'arrive pas dans un etat de selection incoherent.
 void controlDataTableSelectionChanged(ControlView view)
          Called when selection change to display selected bean in edition panel.
 void deleteData(ControlView view)
          Supprime la ligne en cours d'edition (apres confirmation).
protected  void deletedSelectedDataLines(ControlView controlView)
          Delete selected line in data table (called from context menu).
protected  void disableValidAction(ControlView view)
          Desactive le bouton de validation du control.
 void displayCompareNumberCatchGraph(ControlView view)
          Display data graph, initialized with graph for first specy selected in specyComboModel.
 void displayCompareNumberCatchGraph(ControlView view, String selectedSpecies)
          Display data graph, initialized with graph for selected specy selected.
 void displayLengthStructureGraph(ControlView view)
          Display lengthStructure matrix in matrixviewerpanel.
 void displayLogReport(ControlView controlView)
          Genere le log des modifications faites lors du control en HTML et l'ouvre dans le navigateur systeme.
protected  void generateHTMLReport(ControlView controlView)
          Generate global error table model data as html report.
protected  JTable getControlDataTable(ControlView controlView)
          Return l'intance de la table qui est selectionnée.
 void globalErrorTableMouseCLicked(ControlView controlView, MouseEvent event)
          Affiche le menu contextuel de l'arbre qui contient les erreurs de validation globales ou les graphes de comparaison captures/taille dans le cas d'un double clic sur une DiffCatchLengthControlError.
 void performFindAndReplace(ControlFindReplaceDialog replaceView)
          Perform find and replace.
 void saveControl(ControlView view)
          Save project after control and display message.
protected  void saveProjectControl(ControlView view)
          Save project after control.
protected  void scrollToVisible(JTable table, int rowIndex, int vColIndex)
          Scroll le viewport de la table à la ligne demandée.
protected  void selectAllErrorGroupLines(ControlView controlView, CoserConstants.Category category, ControlErrorGroup validationGroup)
          Selectionne toutes les lignes associés au erreur d'un groupe d'erreur.
 void showDataTableContextMenu(ControlView controlView, MouseEvent event)
          Affiche le menu contextuel de la table qui contient les données.
 void showSelectedError(ControlView view, TreeSelectionEvent event)
          Selectionne, dans la table des données, la ligne correspondant a l'erreur selectionnée dans la table des erreurs.
 void updateCompareNumberCatchGraph(ControlGraphFrame view)
          Met a jour le graphique lorsque la selection de l'espece change.
protected  void updateEditionPanel(ControlView view, CoserConstants.Category category, String[] header, String[] line)
          Contruit le panel d'edition du bean.
 void validControl(ControlView view)
          Set validated control flag to true and save control.
 void validDataModification(ControlView view)
          Valide les modifications faites sur le bean actuellement edité.
 
Methods inherited from class fr.ifremer.coser.ui.common.DataHandler
displayLengthStructureGraph
 
Methods inherited from class fr.ifremer.coser.ui.common.CommonHandler
browseFile, getFileChooserInstance, setDefaultCursor, setWaitCursor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlHandler

public ControlHandler()
Method Detail

getControlDataTable

protected JTable getControlDataTable(ControlView controlView)
Return l'intance de la table qui est selectionnée. Les 4 tables sont dupliquées juste pour conserver l'etat des colonnes.

Parameters:
controlView - view
Returns:
la table affichée (suivante la categorie)

categoryChanged

public void categoryChanged(ControlView controlView,
                            ActionEvent event)
Selection d'une nouvelle categories dans la liste des categories.

Parameters:
controlView - controlView
event - event

clearAllSelection

protected void clearAllSelection(ControlView controlView)
Vide la selection des 4 tables pour que le bean en cours d'edition soit vidé et que le changement de categories n'arrive pas dans un etat de selection incoherent.

Parameters:
controlView - controlView

showDataTableContextMenu

public void showDataTableContextMenu(ControlView controlView,
                                     MouseEvent event)
Affiche le menu contextuel de la table qui contient les données.

Parameters:
controlView - view
event - mouse event

deletedSelectedDataLines

protected void deletedSelectedDataLines(ControlView controlView)
Delete selected line in data table (called from context menu).

Parameters:
controlView - view

performFindAndReplace

public void performFindAndReplace(ControlFindReplaceDialog replaceView)
Perform find and replace.

Parameters:
replaceView - view

checkData

public void checkData(ControlView view)
Check project.

Parameters:
view - view

controlDataTableSelectionChanged

public void controlDataTableSelectionChanged(ControlView view)
Called when selection change to display selected bean in edition panel.

Parameters:
view - view

showSelectedError

public void showSelectedError(ControlView view,
                              TreeSelectionEvent event)
Selectionne, dans la table des données, la ligne correspondant a l'erreur selectionnée dans la table des erreurs.

Parameters:
view - view
event - selection event

globalErrorTableMouseCLicked

public void globalErrorTableMouseCLicked(ControlView controlView,
                                         MouseEvent event)
Affiche le menu contextuel de l'arbre qui contient les erreurs de validation globales ou les graphes de comparaison captures/taille dans le cas d'un double clic sur une DiffCatchLengthControlError.

Parameters:
controlView - view
event - mouse event
See Also:
DiffCatchLengthControlError

selectAllErrorGroupLines

protected void selectAllErrorGroupLines(ControlView controlView,
                                        CoserConstants.Category category,
                                        ControlErrorGroup validationGroup)
Selectionne toutes les lignes associés au erreur d'un groupe d'erreur.

Parameters:
controlView - controlView
validationGroup - validationGroup

scrollToVisible

protected void scrollToVisible(JTable table,
                               int rowIndex,
                               int vColIndex)
Scroll le viewport de la table à la ligne demandée.

Parameters:
table - table
rowIndex - ligne
vColIndex - colonne

generateHTMLReport

protected void generateHTMLReport(ControlView controlView)
Generate global error table model data as html report.

Parameters:
controlView -

updateEditionPanel

protected void updateEditionPanel(ControlView view,
                                  CoserConstants.Category category,
                                  String[] header,
                                  String[] line)
Contruit le panel d'edition du bean. Vide le panel si line est null.

Parameters:
view - view
category - category
header - header
line - line to edit

saveControl

public void saveControl(ControlView view)
Save project after control and display message. Can't save if : - validation contains error - validation contains non checked warning

Parameters:
view - view

saveProjectControl

protected void saveProjectControl(ControlView view)
Save project after control.

Parameters:
view - view

displayCompareNumberCatchGraph

public void displayCompareNumberCatchGraph(ControlView view)
Display data graph, initialized with graph for first specy selected in specyComboModel.

Parameters:
view - view

displayCompareNumberCatchGraph

public void displayCompareNumberCatchGraph(ControlView view,
                                           String selectedSpecies)
Display data graph, initialized with graph for selected specy selected.

Parameters:
view - view
selectedSpecies - if not null (auto select species in combo box)

displayLengthStructureGraph

public void displayLengthStructureGraph(ControlView view)
Display lengthStructure matrix in matrixviewerpanel.

Parameters:
view - view

updateCompareNumberCatchGraph

public void updateCompareNumberCatchGraph(ControlGraphFrame view)
Met a jour le graphique lorsque la selection de l'espece change.

Parameters:
view - view

validDataModification

public void validDataModification(ControlView view)
Valide les modifications faites sur le bean actuellement edité.

Parameters:
view - view

cancelDataModification

public void cancelDataModification(ControlView view)
Annule les modifications en cours reset les données data, et reload le validator.

Parameters:
view - view

deleteData

public void deleteData(ControlView view)
Supprime la ligne en cours d'edition (apres confirmation).

Parameters:
view - view

disableValidAction

protected void disableValidAction(ControlView view)
Desactive le bouton de validation du control. Positionne également le flag "validated" du control a false, pour cohérence, binding et en cas de sauvegarde par l'utilisateur.


validControl

public void validControl(ControlView view)
Set validated control flag to true and save control.

Parameters:
view - view

displayLogReport

public void displayLogReport(ControlView controlView)
Genere le log des modifications faites lors du control en HTML et l'ouvre dans le navigateur systeme.

Parameters:
controlView -


Copyright © 2010-2011 Ifremer. All Rights Reserved.