View Javadoc
1   package fr.ifremer.tutti.ui.swing.content.protocol;
2   
3   /*
4    * #%L
5    * Tutti :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2012 - 2017 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU General Public License as
13   * published by the Free Software Foundation, either version 3 of the
14   * License, or (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU General Public
22   * License along with this program.  If not, see
23   * <http://www.gnu.org/licenses/gpl-3.0.html>.
24   * #L%
25   */
26  
27  import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
28  import fr.ifremer.tutti.persistence.entities.referential.Species;
29  import fr.ifremer.tutti.ui.swing.TuttiHelpBroker;
30  import fr.ifremer.tutti.ui.swing.content.protocol.calcifiedpiecessampling.CalcifiedPiecesSamplingEditorUI;
31  import fr.ifremer.tutti.ui.swing.content.protocol.rtp.RtpEditorUI;
32  import fr.ifremer.tutti.ui.swing.content.protocol.zones.ZoneEditorUI;
33  import fr.ifremer.tutti.ui.swing.util.TuttiUI;
34  import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
35  import java.awt.BorderLayout;
36  import java.awt.Color;
37  import java.awt.Component;
38  import java.awt.Container;
39  import java.awt.GridBagConstraints;
40  import java.awt.GridLayout;
41  import java.awt.Insets;
42  import java.awt.LayoutManager;
43  import java.awt.event.FocusEvent;
44  import java.awt.event.FocusListener;
45  import java.awt.event.ItemEvent;
46  import java.awt.event.ItemListener;
47  import java.awt.event.KeyEvent;
48  import java.awt.event.KeyListener;
49  import java.awt.event.MouseEvent;
50  import java.awt.event.MouseListener;
51  import java.util.ArrayList;
52  import java.util.HashMap;
53  import java.util.List;
54  import java.util.Map;
55  import java.util.TreeMap;
56  import javax.swing.BorderFactory;
57  import javax.swing.JButton;
58  import javax.swing.JCheckBox;
59  import javax.swing.JLabel;
60  import javax.swing.JMenuItem;
61  import javax.swing.JPanel;
62  import javax.swing.JPopupMenu;
63  import javax.swing.JScrollPane;
64  import javax.swing.JTabbedPane;
65  import javax.swing.JTextArea;
66  import javax.swing.JTextField;
67  import javax.swing.ListSelectionModel;
68  import javax.swing.border.TitledBorder;
69  import jaxx.runtime.JAXXBinding;
70  import jaxx.runtime.JAXXContext;
71  import jaxx.runtime.JAXXObject;
72  import jaxx.runtime.JAXXObjectDescriptor;
73  import jaxx.runtime.JAXXUtil;
74  import jaxx.runtime.JAXXValidator;
75  import jaxx.runtime.SwingUtil;
76  import jaxx.runtime.binding.DefaultJAXXBinding;
77  import jaxx.runtime.context.DefaultJAXXContext;
78  import jaxx.runtime.swing.TabInfo;
79  import jaxx.runtime.swing.TabInfoPropertyChangeListener;
80  import jaxx.runtime.swing.Table;
81  import jaxx.runtime.swing.editor.bean.BeanDoubleList;
82  import jaxx.runtime.swing.editor.bean.BeanFilterableComboBox;
83  import jaxx.runtime.swing.help.JAXXHelpUI;
84  import jaxx.runtime.validator.swing.SwingValidator;
85  import jaxx.runtime.validator.swing.SwingValidatorUtil;
86  import jaxx.runtime.validator.swing.meta.Validator;
87  import jaxx.runtime.validator.swing.meta.ValidatorField;
88  import jaxx.runtime.validator.swing.ui.ImageValidationUI;
89  import org.apache.commons.logging.Log;
90  import org.apache.commons.logging.LogFactory;
91  import org.jdesktop.swingx.JXTable;
92  import static jaxx.runtime.SwingUtil.getStringValue;
93  import static org.nuiton.i18n.I18n.t;
94  
95  public class EditProtocolUI extends JPanel implements JAXXHelpUI<TuttiHelpBroker>, TuttiUI<EditProtocolUIModel, EditProtocolUIHandler>, JAXXObject, JAXXValidator {
96  
97      /*-----------------------------------------------------------------------*/
98      /*------------------ Constants for all public bindings ------------------*/
99      /*-----------------------------------------------------------------------*/
100 
101     public static final String BINDING_ADD_BENTHOS_PROTOCOL_BUTTON_ENABLED = "addBenthosProtocolButton.enabled";
102     public static final String BINDING_ADD_CARACTERISTIC_MAPPING_BUTTON_ENABLED = "addCaracteristicMappingButton.enabled";
103     public static final String BINDING_ADD_SPECIES_PROTOCOL_BUTTON_ENABLED = "addSpeciesProtocolButton.enabled";
104     public static final String BINDING_BENTHOS_COMBO_BOX_ENABLED = "benthosComboBox.enabled";
105     public static final String BINDING_CARACTERISTIC_MAPPING_COMBO_BOX_ENABLED = "caracteristicMappingComboBox.enabled";
106     public static final String BINDING_COMMENT_FIELD_TEXT = "commentField.text";
107     public static final String BINDING_CPS_TABBED_PANE_VISIBLE = "cpsTabbedPane.visible";
108     public static final String BINDING_MOVE_DOWN_CARACTERISTIC_MAPPING_BUTTON_ENABLED = "moveDownCaracteristicMappingButton.enabled";
109     public static final String BINDING_MOVE_UP_CARACTERISTIC_MAPPING_BUTTON_ENABLED = "moveUpCaracteristicMappingButton.enabled";
110     public static final String BINDING_NAME_FIELD_TEXT = "nameField.text";
111     public static final String BINDING_REMOVE_BENTHOS_PROTOCOL_BUTTON_ENABLED = "removeBenthosProtocolButton.enabled";
112     public static final String BINDING_REMOVE_CARACTERISTIC_MAPPING_BUTTON_ENABLED = "removeCaracteristicMappingButton.enabled";
113     public static final String BINDING_REMOVE_SPECIES_PROTOCOL_BUTTON_ENABLED = "removeSpeciesProtocolButton.enabled";
114     public static final String BINDING_SAVE_BUTTON_ENABLED = "saveButton.enabled";
115     public static final String BINDING_SAVE_WARNING_CONTAINER_VISIBLE = "saveWarningContainer.visible";
116     public static final String BINDING_SPECIES_COMBO_BOX_ENABLED = "speciesComboBox.enabled";
117     public static final String BINDING_USE_CALCIFIED_PIECE_SAMPLING_SELECTED = "useCalcifiedPieceSampling.selected";
118 
119     /*-----------------------------------------------------------------------*/
120     /*------------------------- Other static fields -------------------------*/
121     /*-----------------------------------------------------------------------*/
122 
123     private static final String $jaxxObjectDescriptor = "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";
124     private static final Log log = LogFactory.getLog(EditProtocolUI.class);
125     private static final long serialVersionUID = 1L;
126 
127     /*-----------------------------------------------------------------------*/
128     /*--------------------------- Internal states ---------------------------*/
129     /*-----------------------------------------------------------------------*/
130 
131     protected List<Object> $activeBindings = new ArrayList<Object>();
132     protected Map<String, Object> $bindingSources = new HashMap<String, Object>();
133     protected final Map<String, JAXXBinding> $bindings = new TreeMap<String, JAXXBinding>();
134     protected Map<String, Object> $objectMap = new HashMap<String, Object>();
135     protected Map<?, ?> $previousValues = new HashMap<Object, Object>();
136     private boolean allComponentsCreated;
137     protected final JAXXContext delegateContext = new DefaultJAXXContext();
138 
139     /*-----------------------------------------------------------------------*/
140     /*------------------------ Protected components  ------------------------*/
141     /*-----------------------------------------------------------------------*/
142 
143     protected JButton addBenthosProtocolButton;
144     protected JButton addCaracteristicMappingButton;
145     protected JButton addSpeciesProtocolButton;
146     protected JPanel benthosActions;
147     protected BeanFilterableComboBox<Species> benthosComboBox;
148     protected JPanel benthosPanel;
149     protected JXTable benthosTable;
150     protected JPopupMenu benthosTablePopup;
151     protected TuttiHelpBroker broker;
152     protected CalcifiedPiecesSamplingEditorUI calcifiedPiecesSamplingEditorUI;
153     protected JPanel caracteristicActions;
154     protected BeanFilterableComboBox<Caracteristic> caracteristicMappingComboBox;
155     protected JPopupMenu caracteristicMappingTablePopup;
156     protected JTabbedPane caracteristicPane;
157     protected JPanel caracteristicPanel;
158     protected JXTable caracteristicsMappingTable;
159     protected JButton closeButton;
160     protected JTextArea commentField;
161     @ValidatorField( validatorId = "validator",  propertyName = "comment",  editorName = "commentPane")
162     protected JScrollPane commentPane;
163     protected JTabbedPane cpsTabbedPane;
164     protected JMenuItem editMaturityCaracteristicAction;
165     protected EditProtocolUI editProtocolTopPanel = this;
166     protected JButton exportAllCaracteristicButton;
167     protected JButton exportBenthosButton;
168     protected JButton exportCaracteristicButton;
169     protected JButton exportPupitriButton;
170     protected JButton exportSpeciesButton;
171     protected final EditProtocolUIHandler handler = createHandler();
172     protected JButton importBenthosButton;
173     protected JButton importCaracteristicButton;
174     protected JButton importColumnsButton;
175     protected JButton importSpeciesButton;
176     protected BeanDoubleList<Caracteristic> individualObservationList;
177     protected BeanDoubleList<Caracteristic> lengthClassesList;
178     @ValidatorField( validatorId = "validator",  propertyName = "maturityPmfmId",  editorName = "maturityList")
179     protected BeanDoubleList<Caracteristic> maturityList;
180     protected EditProtocolUIModel model;
181     protected JMenuItem moveDownCaracteristicMappingButton;
182     protected JMenuItem moveUpCaracteristicMappingButton;
183     @ValidatorField( validatorId = "validator",  propertyName = "name",  editorName = "nameField")
184     protected JTextField nameField;
185     protected JLabel nameLabel;
186     protected JXTable operationFieldsMappingTable;
187     protected Table protocolInfoForm;
188     protected JMenuItem removeBenthosProtocolButton;
189     protected JMenuItem removeCaracteristicMappingButton;
190     protected JMenuItem removeSpeciesProtocolButton;
191     protected RtpEditorUI rtpEditorUI;
192     protected JButton saveButton;
193     protected JLabel saveWarning;
194     protected JPanel saveWarningContainer;
195     protected JButton selectOtherBenthosButton;
196     protected JButton selectOtherSpeciesButton;
197     protected JPanel speciesActions;
198     protected BeanFilterableComboBox<Species> speciesComboBox;
199     protected JPanel speciesPanel;
200     protected JXTable speciesTable;
201     protected JPopupMenu speciesTablePopup;
202     protected JTabbedPane tabPanel;
203     protected JCheckBox useCalcifiedPieceSampling;
204     @Validator( validatorId = "validator")
205     protected SwingValidator<EditProtocolUIModel> validator;
206     protected List<String> validatorIds = new ArrayList<String>();
207     protected ZoneEditorUI zoneEditor;
208 
209     /*-----------------------------------------------------------------------*/
210     /*------------------------- Private components  -------------------------*/
211     /*-----------------------------------------------------------------------*/
212 
213     private JPanel $JPanel0;
214     private JPanel $JPanel1;
215     private JScrollPane $JScrollPane0;
216     private JScrollPane $JScrollPane1;
217     private JScrollPane $JScrollPane2;
218     private JScrollPane $JScrollPane3;
219     private TabInfo $TabInfo0;
220     private TabInfo $TabInfo1;
221     private TabInfo $TabInfo10;
222     private TabInfo $TabInfo2;
223     private TabInfo $TabInfo3;
224     private TabInfo $TabInfo4;
225     private TabInfo $TabInfo5;
226     private TabInfo $TabInfo6;
227     private TabInfo $TabInfo7;
228     private TabInfo $TabInfo8;
229     private TabInfo $TabInfo9;
230     private Table $Table0;
231     private Table $Table1;
232     private Table $Table2;
233 
234     /*-----------------------------------------------------------------------*/
235     /*---------------------------- Constructors  ----------------------------*/
236     /*-----------------------------------------------------------------------*/
237 
238     public EditProtocolUI(TuttiUI parentUI) {
239         TuttiUIUtil.setParentUI(this, parentUI);
240             $initialize();
241     }
242 
243     public EditProtocolUI(LayoutManager param0, boolean param1) {
244         super(param0 ,param1);
245         $initialize();
246     }
247 
248     public EditProtocolUI(JAXXContext parentContext, LayoutManager param1, boolean param2) {
249         super(param1 ,param2);
250         JAXXUtil.initContext(this, parentContext);
251         $initialize();
252     }
253 
254     public EditProtocolUI(LayoutManager param0) {
255         super(param0);
256         $initialize();
257     }
258 
259     public EditProtocolUI(JAXXContext parentContext, LayoutManager param1) {
260         super(param1);
261         JAXXUtil.initContext(this, parentContext);
262         $initialize();
263     }
264 
265     public EditProtocolUI() {
266         $initialize();
267     }
268 
269     public EditProtocolUI(JAXXContext parentContext) {
270         JAXXUtil.initContext(this, parentContext);
271         $initialize();
272     }
273 
274     public EditProtocolUI(boolean param0) {
275         super(param0);
276         $initialize();
277     }
278 
279     public EditProtocolUI(JAXXContext parentContext, boolean param1) {
280         super(param1);
281         JAXXUtil.initContext(this, parentContext);
282         $initialize();
283     }
284 
285     /*-----------------------------------------------------------------------*/
286     /*--------------------------- Statics methods ---------------------------*/
287     /*-----------------------------------------------------------------------*/
288 
289     public static JAXXObjectDescriptor $getJAXXObjectDescriptor() {
290         return JAXXUtil.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor);
291     }
292 
293     /*-----------------------------------------------------------------------*/
294     /*---------------------- JAXXObject implementation ----------------------*/
295     /*-----------------------------------------------------------------------*/
296 
297     @Override
298     public void applyDataBinding(String $binding) {
299         if (allComponentsCreated && $bindings.containsKey($binding)) {
300             getDataBinding($binding).applyDataBinding();
301         }
302         processDataBinding($binding);
303     }
304 
305     @Override
306     public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
307         super.firePropertyChange(propertyName, oldValue, newValue);
308     }
309 
310     @Override
311     public Map<String, Object> get$objectMap() {
312         return $objectMap;
313     }
314 
315     @Override
316     public JAXXBinding getDataBinding(String bindingId) {
317         return $bindings.get(bindingId);
318     }
319 
320     @Override
321     public JAXXBinding[] getDataBindings() {
322         return $bindings.values().toArray(new JAXXBinding[$bindings.size()]);
323     }
324 
325     @Override
326     public Object getObjectById(String id) {
327         return $objectMap.get(id);
328     }
329 
330     @Override
331     public void processDataBinding(String $binding, boolean $force) {
332         if (!$force && $activeBindings.contains($binding)) { 
333             return;
334         }
335         $activeBindings.add($binding);
336         try {
337             if (allComponentsCreated && $bindings.containsKey($binding)) {
338                 getDataBinding($binding).processDataBinding();
339             }
340         } finally {
341             $activeBindings.remove($binding);
342         }
343     }
344 
345     @Override
346     public void processDataBinding(String $binding) {
347         processDataBinding($binding, false);
348     }
349 
350     @Override
351     public void registerDataBinding(JAXXBinding binding) {
352         $bindings.put(binding.getId(), binding);
353     }
354 
355     @Override
356     public void removeDataBinding(String $binding) {
357         if (allComponentsCreated && $bindings.containsKey($binding)) {
358             getDataBinding($binding).removeDataBinding();
359         }
360     }
361 
362     /*-----------------------------------------------------------------------*/
363     /*--------------------- JAXXContext implementation  ---------------------*/
364     /*-----------------------------------------------------------------------*/
365 
366     @Override
367     public <T> T getContextValue(Class<T> clazz) {
368         return delegateContext.getContextValue(clazz, null);
369     }
370 
371     @Override
372     public <T> T getContextValue(Class<T> clazz, String name) {
373         return delegateContext.getContextValue(clazz, name);
374     }
375 
376     @Override
377     public JAXXContext getDelegateContext() {
378         return delegateContext;
379     }
380 
381     @Override
382     public <O extends Container> O getParentContainer(Class<O> clazz) {
383         return SwingUtil.getParentContainer(this, clazz);
384     }
385 
386     @Override
387     public <O extends Container> O getParentContainer(Object source, Class<O> clazz) {
388         return SwingUtil.getParentContainer(source, clazz);
389     }
390 
391     @Override
392     public <T> void removeContextValue(Class<T> clazz) {
393         delegateContext.removeContextValue(clazz, null);
394     }
395 
396     @Override
397     public <T> void removeContextValue(Class<T> clazz, String name) {
398         delegateContext.removeContextValue(clazz, name);
399     }
400 
401     @Override
402     public <T> void setContextValue(T o) {
403         delegateContext.setContextValue(o, null);
404     }
405 
406     @Override
407     public <T> void setContextValue(T o, String name) {
408         delegateContext.setContextValue(o, name);
409     }
410 
411     /*-----------------------------------------------------------------------*/
412     /*-------------------- JAXXValidator implementation  --------------------*/
413     /*-----------------------------------------------------------------------*/
414 
415     @Override
416     public SwingValidator<?> getValidator(String validatorId) {
417         return (SwingValidator<?>) (validatorIds.contains(validatorId) ? getObjectById(validatorId) : null);
418     }
419 
420     @Override
421     public List<String> getValidatorIds() {
422         return validatorIds;
423     }
424 
425     @Override
426     public void registerValidatorFields() {
427         SwingValidatorUtil.detectValidatorFields(this);
428     }
429 
430     /*-----------------------------------------------------------------------*/
431     /*---------------------------- Event methods ----------------------------*/
432     /*-----------------------------------------------------------------------*/
433 
434     public void doFocusGained__on__commentPane(FocusEvent event) {
435         if (log.isDebugEnabled()) {
436             log.debug(event);
437         }
438         commentField.requestFocus();
439     }
440 
441     public void doItemStateChanged__on__useCalcifiedPieceSampling(ItemEvent event) {
442         if (log.isDebugEnabled()) {
443             log.debug(event);
444         }
445         handler.setBoolean(event, "useCalcifiedPieceSampling");
446     }
447 
448     public void doKeyPressed__on__benthosTable(KeyEvent event) {
449         if (log.isDebugEnabled()) {
450             log.debug(event);
451         }
452         handler.openRowMenu(event, benthosTablePopup);
453     }
454 
455     public void doKeyPressed__on__caracteristicsMappingTable(KeyEvent event) {
456         if (log.isDebugEnabled()) {
457             log.debug(event);
458         }
459         handler.openRowMenu(event, caracteristicMappingTablePopup);
460     }
461 
462     public void doKeyPressed__on__speciesTable(KeyEvent event) {
463         if (log.isDebugEnabled()) {
464             log.debug(event);
465         }
466         handler.openRowMenu(event, speciesTablePopup);
467     }
468 
469     public void doKeyReleased__on__commentField(KeyEvent event) {
470         if (log.isDebugEnabled()) {
471             log.debug(event);
472         }
473         handler.setText(event, "comment");
474     }
475 
476     public void doKeyReleased__on__nameField(KeyEvent event) {
477         if (log.isDebugEnabled()) {
478             log.debug(event);
479         }
480         handler.setText(event, "name");
481     }
482 
483     public void doMouseClicked__on__benthosTable(MouseEvent event) {
484         if (log.isDebugEnabled()) {
485             log.debug(event);
486         }
487         handler.autoSelectRowInTable(event, benthosTablePopup);
488     }
489 
490     public void doMouseClicked__on__caracteristicsMappingTable(MouseEvent event) {
491         if (log.isDebugEnabled()) {
492             log.debug(event);
493         }
494         handler.autoSelectRowInTable(event, caracteristicMappingTablePopup);
495     }
496 
497     public void doMouseClicked__on__speciesTable(MouseEvent event) {
498         if (log.isDebugEnabled()) {
499             log.debug(event);
500         }
501         handler.autoSelectRowInTable(event, speciesTablePopup);
502     }
503 
504     /*-----------------------------------------------------------------------*/
505     /*----------------------- Public acessor methods  -----------------------*/
506     /*-----------------------------------------------------------------------*/
507 
508     public JButton getAddBenthosProtocolButton() {
509         return addBenthosProtocolButton;
510     }
511 
512     public JButton getAddCaracteristicMappingButton() {
513         return addCaracteristicMappingButton;
514     }
515 
516     public JButton getAddSpeciesProtocolButton() {
517         return addSpeciesProtocolButton;
518     }
519 
520     public JPanel getBenthosActions() {
521         return benthosActions;
522     }
523 
524     public BeanFilterableComboBox<Species> getBenthosComboBox() {
525         return benthosComboBox;
526     }
527 
528     public JPanel getBenthosPanel() {
529         return benthosPanel;
530     }
531 
532     public JXTable getBenthosTable() {
533         return benthosTable;
534     }
535 
536     public JPopupMenu getBenthosTablePopup() {
537         return benthosTablePopup;
538     }
539 
540     public TuttiHelpBroker getBroker() {
541         return broker;
542     }
543 
544     public CalcifiedPiecesSamplingEditorUI getCalcifiedPiecesSamplingEditorUI() {
545         return calcifiedPiecesSamplingEditorUI;
546     }
547 
548     public JPanel getCaracteristicActions() {
549         return caracteristicActions;
550     }
551 
552     public BeanFilterableComboBox<Caracteristic> getCaracteristicMappingComboBox() {
553         return caracteristicMappingComboBox;
554     }
555 
556     public JPopupMenu getCaracteristicMappingTablePopup() {
557         return caracteristicMappingTablePopup;
558     }
559 
560     public JTabbedPane getCaracteristicPane() {
561         return caracteristicPane;
562     }
563 
564     public JPanel getCaracteristicPanel() {
565         return caracteristicPanel;
566     }
567 
568     public JXTable getCaracteristicsMappingTable() {
569         return caracteristicsMappingTable;
570     }
571 
572     public JButton getCloseButton() {
573         return closeButton;
574     }
575 
576     public JTextArea getCommentField() {
577         return commentField;
578     }
579 
580     public JScrollPane getCommentPane() {
581         return commentPane;
582     }
583 
584     public JTabbedPane getCpsTabbedPane() {
585         return cpsTabbedPane;
586     }
587 
588     public JMenuItem getEditMaturityCaracteristicAction() {
589         return editMaturityCaracteristicAction;
590     }
591 
592     public JButton getExportAllCaracteristicButton() {
593         return exportAllCaracteristicButton;
594     }
595 
596     public JButton getExportBenthosButton() {
597         return exportBenthosButton;
598     }
599 
600     public JButton getExportCaracteristicButton() {
601         return exportCaracteristicButton;
602     }
603 
604     public JButton getExportPupitriButton() {
605         return exportPupitriButton;
606     }
607 
608     public JButton getExportSpeciesButton() {
609         return exportSpeciesButton;
610     }
611 
612     public EditProtocolUIHandler getHandler() {
613         return handler;
614     }
615 
616     public JButton getImportBenthosButton() {
617         return importBenthosButton;
618     }
619 
620     public JButton getImportCaracteristicButton() {
621         return importCaracteristicButton;
622     }
623 
624     public JButton getImportColumnsButton() {
625         return importColumnsButton;
626     }
627 
628     public JButton getImportSpeciesButton() {
629         return importSpeciesButton;
630     }
631 
632     public BeanDoubleList<Caracteristic> getIndividualObservationList() {
633         return individualObservationList;
634     }
635 
636     public BeanDoubleList<Caracteristic> getLengthClassesList() {
637         return lengthClassesList;
638     }
639 
640     public BeanDoubleList<Caracteristic> getMaturityList() {
641         return maturityList;
642     }
643 
644     public EditProtocolUIModel getModel() {
645         return model;
646     }
647 
648     public JMenuItem getMoveDownCaracteristicMappingButton() {
649         return moveDownCaracteristicMappingButton;
650     }
651 
652     public JMenuItem getMoveUpCaracteristicMappingButton() {
653         return moveUpCaracteristicMappingButton;
654     }
655 
656     public JTextField getNameField() {
657         return nameField;
658     }
659 
660     public JLabel getNameLabel() {
661         return nameLabel;
662     }
663 
664     public JXTable getOperationFieldsMappingTable() {
665         return operationFieldsMappingTable;
666     }
667 
668     public Table getProtocolInfoForm() {
669         return protocolInfoForm;
670     }
671 
672     public JMenuItem getRemoveBenthosProtocolButton() {
673         return removeBenthosProtocolButton;
674     }
675 
676     public JMenuItem getRemoveCaracteristicMappingButton() {
677         return removeCaracteristicMappingButton;
678     }
679 
680     public JMenuItem getRemoveSpeciesProtocolButton() {
681         return removeSpeciesProtocolButton;
682     }
683 
684     public RtpEditorUI getRtpEditorUI() {
685         return rtpEditorUI;
686     }
687 
688     public JButton getSaveButton() {
689         return saveButton;
690     }
691 
692     public JLabel getSaveWarning() {
693         return saveWarning;
694     }
695 
696     public JPanel getSaveWarningContainer() {
697         return saveWarningContainer;
698     }
699 
700     public JButton getSelectOtherBenthosButton() {
701         return selectOtherBenthosButton;
702     }
703 
704     public JButton getSelectOtherSpeciesButton() {
705         return selectOtherSpeciesButton;
706     }
707 
708     public JPanel getSpeciesActions() {
709         return speciesActions;
710     }
711 
712     public BeanFilterableComboBox<Species> getSpeciesComboBox() {
713         return speciesComboBox;
714     }
715 
716     public JPanel getSpeciesPanel() {
717         return speciesPanel;
718     }
719 
720     public JXTable getSpeciesTable() {
721         return speciesTable;
722     }
723 
724     public JPopupMenu getSpeciesTablePopup() {
725         return speciesTablePopup;
726     }
727 
728     public JTabbedPane getTabPanel() {
729         return tabPanel;
730     }
731 
732     public JCheckBox getUseCalcifiedPieceSampling() {
733         return useCalcifiedPieceSampling;
734     }
735 
736     public SwingValidator<EditProtocolUIModel> getValidator() {
737         return validator;
738     }
739 
740     public ZoneEditorUI getZoneEditor() {
741         return zoneEditor;
742     }
743 
744     /*-----------------------------------------------------------------------*/
745     /*---------------------------- Other methods ----------------------------*/
746     /*-----------------------------------------------------------------------*/
747 
748     @Override
749     public void registerHelpId(TuttiHelpBroker broker, Component component, String helpId) {
750         broker.installUI(component, helpId);
751     }
752 
753     @Override
754     public void showHelp(String helpId) {
755         getBroker().showHelp(this, helpId);
756     }
757 
758     /*-----------------------------------------------------------------------*/
759     /*--------------------- Protected acessors methods  ---------------------*/
760     /*-----------------------------------------------------------------------*/
761 
762     protected JPanel get$JPanel0() {
763         return $JPanel0;
764     }
765 
766     protected JPanel get$JPanel1() {
767         return $JPanel1;
768     }
769 
770     protected JScrollPane get$JScrollPane0() {
771         return $JScrollPane0;
772     }
773 
774     protected JScrollPane get$JScrollPane1() {
775         return $JScrollPane1;
776     }
777 
778     protected JScrollPane get$JScrollPane2() {
779         return $JScrollPane2;
780     }
781 
782     protected JScrollPane get$JScrollPane3() {
783         return $JScrollPane3;
784     }
785 
786     protected TabInfo get$TabInfo0() {
787         return $TabInfo0;
788     }
789 
790     protected TabInfo get$TabInfo1() {
791         return $TabInfo1;
792     }
793 
794     protected TabInfo get$TabInfo10() {
795         return $TabInfo10;
796     }
797 
798     protected TabInfo get$TabInfo2() {
799         return $TabInfo2;
800     }
801 
802     protected TabInfo get$TabInfo3() {
803         return $TabInfo3;
804     }
805 
806     protected TabInfo get$TabInfo4() {
807         return $TabInfo4;
808     }
809 
810     protected TabInfo get$TabInfo5() {
811         return $TabInfo5;
812     }
813 
814     protected TabInfo get$TabInfo6() {
815         return $TabInfo6;
816     }
817 
818     protected TabInfo get$TabInfo7() {
819         return $TabInfo7;
820     }
821 
822     protected TabInfo get$TabInfo8() {
823         return $TabInfo8;
824     }
825 
826     protected TabInfo get$TabInfo9() {
827         return $TabInfo9;
828     }
829 
830     protected Table get$Table0() {
831         return $Table0;
832     }
833 
834     protected Table get$Table1() {
835         return $Table1;
836     }
837 
838     protected Table get$Table2() {
839         return $Table2;
840     }
841 
842     /*-----------------------------------------------------------------------*/
843     /*--------------------- Components creation methods ---------------------*/
844     /*-----------------------------------------------------------------------*/
845 
846     protected void addChildrenToBenthosActions() {
847         if (!allComponentsCreated) {
848             return;
849         }
850         benthosActions.add(importBenthosButton);
851         benthosActions.add(exportBenthosButton);
852     }
853 
854     protected void addChildrenToBenthosPanel() {
855         if (!allComponentsCreated) {
856             return;
857         }
858         benthosPanel.add(benthosActions, BorderLayout.NORTH);
859         benthosPanel.add($Table2, BorderLayout.CENTER);
860     }
861 
862     protected void addChildrenToBenthosTablePopup() {
863         if (!allComponentsCreated) {
864             return;
865         }
866         benthosTablePopup.add(removeBenthosProtocolButton);
867     }
868 
869     protected void addChildrenToCaracteristicActions() {
870         if (!allComponentsCreated) {
871             return;
872         }
873         caracteristicActions.add(importCaracteristicButton);
874         caracteristicActions.add(exportCaracteristicButton);
875         caracteristicActions.add(exportAllCaracteristicButton);
876         caracteristicActions.add(importColumnsButton);
877     }
878 
879     protected void addChildrenToCaracteristicMappingTablePopup() {
880         if (!allComponentsCreated) {
881             return;
882         }
883         caracteristicMappingTablePopup.add(removeCaracteristicMappingButton);
884         caracteristicMappingTablePopup.add(moveUpCaracteristicMappingButton);
885         caracteristicMappingTablePopup.add(moveDownCaracteristicMappingButton);
886     }
887 
888     protected void addChildrenToCaracteristicPane() {
889         if (!allComponentsCreated) {
890             return;
891         }
892         caracteristicPane.add(lengthClassesList);
893         caracteristicPane.add(individualObservationList);
894         caracteristicPane.add(SwingUtil.boxComponentWithJxLayer(maturityList));
895         caracteristicPane.add($Table0);
896         $TabInfo2.addPropertyChangeListener(new TabInfoPropertyChangeListener(caracteristicPane, 0));
897         caracteristicPane.setTitleAt(0, t("tutti.editProtocol.tab.caracteristic.lengthClasses"));
898         $TabInfo3.addPropertyChangeListener(new TabInfoPropertyChangeListener(caracteristicPane, 1));
899         caracteristicPane.setTitleAt(1, t("tutti.editProtocol.tab.caracteristic.individualObservation"));
900         $TabInfo4.addPropertyChangeListener(new TabInfoPropertyChangeListener(caracteristicPane, 2));
901         caracteristicPane.setTitleAt(2, t("tutti.editProtocol.tab.caracteristic.maturity"));
902         $TabInfo5.addPropertyChangeListener(new TabInfoPropertyChangeListener(caracteristicPane, 3));
903         caracteristicPane.setTitleAt(3, t("tutti.editProtocol.tab.caracteristic.mapping"));
904     }
905 
906     protected void addChildrenToCaracteristicPanel() {
907         if (!allComponentsCreated) {
908             return;
909         }
910         caracteristicPanel.add(caracteristicActions, BorderLayout.NORTH);
911         caracteristicPanel.add(caracteristicPane, BorderLayout.CENTER);
912     }
913 
914     protected void addChildrenToCommentPane() {
915         if (!allComponentsCreated) {
916             return;
917         }
918         commentPane.getViewport().add(commentField);
919     }
920 
921     protected void addChildrenToCpsTabbedPane() {
922         if (!allComponentsCreated) {
923             return;
924         }
925         cpsTabbedPane.add(zoneEditor);
926         cpsTabbedPane.add(calcifiedPiecesSamplingEditorUI);
927         $TabInfo9.addPropertyChangeListener(new TabInfoPropertyChangeListener(cpsTabbedPane, 0));
928         cpsTabbedPane.setTitleAt(0, t("tutti.editProtocol.tab.zone"));
929         $TabInfo10.addPropertyChangeListener(new TabInfoPropertyChangeListener(cpsTabbedPane, 1));
930         cpsTabbedPane.setTitleAt(1, t("tutti.editProtocol.tab.algorithm"));
931     }
932 
933     protected void addChildrenToEditProtocolTopPanel() {
934         if (!allComponentsCreated) {
935             return;
936         }
937         add(editMaturityCaracteristicAction);
938         add(tabPanel, BorderLayout.CENTER);
939         add(saveWarningContainer, BorderLayout.NORTH);
940         add($JPanel1, BorderLayout.SOUTH);
941     }
942 
943     protected void addChildrenToProtocolInfoForm() {
944         if (!allComponentsCreated) {
945             return;
946         }
947         protocolInfoForm.add(nameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 17, 1, new Insets(3, 3, 3, 3), 0, 0));
948         protocolInfoForm.add(SwingUtil.boxComponentWithJxLayer(nameField), new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
949         protocolInfoForm.add(SwingUtil.boxComponentWithJxLayer(commentPane), new GridBagConstraints(0, 1, 2, 1, 0.0, 0.8, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
950     }
951 
952     protected void addChildrenToSaveWarningContainer() {
953         if (!allComponentsCreated) {
954             return;
955         }
956         saveWarningContainer.add(saveWarning, BorderLayout.CENTER);
957     }
958 
959     protected void addChildrenToSpeciesActions() {
960         if (!allComponentsCreated) {
961             return;
962         }
963         speciesActions.add(importSpeciesButton);
964         speciesActions.add(exportSpeciesButton);
965         speciesActions.add(exportPupitriButton);
966     }
967 
968     protected void addChildrenToSpeciesPanel() {
969         if (!allComponentsCreated) {
970             return;
971         }
972         speciesPanel.add(speciesActions, BorderLayout.NORTH);
973         speciesPanel.add($Table1, BorderLayout.CENTER);
974     }
975 
976     protected void addChildrenToSpeciesTablePopup() {
977         if (!allComponentsCreated) {
978             return;
979         }
980         speciesTablePopup.add(removeSpeciesProtocolButton);
981     }
982 
983     protected void addChildrenToTabPanel() {
984         if (!allComponentsCreated) {
985             return;
986         }
987         tabPanel.add(protocolInfoForm);
988         tabPanel.add(caracteristicPanel);
989         tabPanel.add(speciesPanel);
990         tabPanel.add(benthosPanel);
991         tabPanel.add($JPanel0);
992         $TabInfo0.addPropertyChangeListener(new TabInfoPropertyChangeListener(tabPanel, 0));
993         tabPanel.setTitleAt(0, t("tutti.editProtocol.tab.info"));
994         $TabInfo1.addPropertyChangeListener(new TabInfoPropertyChangeListener(tabPanel, 1));
995         tabPanel.setTitleAt(1, t("tutti.editProtocol.tab.caracteristic"));
996         $TabInfo6.addPropertyChangeListener(new TabInfoPropertyChangeListener(tabPanel, 2));
997         tabPanel.setTitleAt(2, t("tutti.editProtocol.tab.species"));
998         $TabInfo7.addPropertyChangeListener(new TabInfoPropertyChangeListener(tabPanel, 3));
999         tabPanel.setTitleAt(3, t("tutti.editProtocol.tab.benthos"));
1000         $TabInfo8.addPropertyChangeListener(new TabInfoPropertyChangeListener(tabPanel, 4));
1001         tabPanel.setTitleAt(4, t("tutti.editProtocol.tab.cps"));
1002     }
1003 
1004     protected void addChildrenToValidator() {
1005         if (!allComponentsCreated) {
1006             return;
1007         }
1008         validator.setUiClass(ImageValidationUI.class);
1009         validator.setBean(model);
1010     }
1011 
1012     protected void createAddBenthosProtocolButton() {
1013         $objectMap.put("addBenthosProtocolButton", addBenthosProtocolButton = new JButton());
1014         
1015         addBenthosProtocolButton.setName("addBenthosProtocolButton");
1016         addBenthosProtocolButton.setToolTipText(t("tutti.editProtocol.action.addBenthosProtocol.tip"));
1017         addBenthosProtocolButton.putClientProperty("help", "tutti.editProtocol.action.addBenthosProtocol.help");
1018         addBenthosProtocolButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.AddBenthosProtocolAction.class);
1019     }
1020 
1021     protected void createAddCaracteristicMappingButton() {
1022         $objectMap.put("addCaracteristicMappingButton", addCaracteristicMappingButton = new JButton());
1023         
1024         addCaracteristicMappingButton.setName("addCaracteristicMappingButton");
1025         addCaracteristicMappingButton.setToolTipText(t("tutti.editProtocol.action.addCaracteristicMapping.tip"));
1026         addCaracteristicMappingButton.putClientProperty("help", "tutti.editProtocol.action.addCaracteristicMapping.help");
1027         addCaracteristicMappingButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.AddCaracteristicMappingAction.class);
1028     }
1029 
1030     protected void createAddSpeciesProtocolButton() {
1031         $objectMap.put("addSpeciesProtocolButton", addSpeciesProtocolButton = new JButton());
1032         
1033         addSpeciesProtocolButton.setName("addSpeciesProtocolButton");
1034         addSpeciesProtocolButton.setToolTipText(t("tutti.editProtocol.action.addSpeciesProtocol.tip"));
1035         addSpeciesProtocolButton.putClientProperty("help", "tutti.editProtocol.action.addSpeciesProtocol.help");
1036         addSpeciesProtocolButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.AddSpeciesProtocolAction.class);
1037     }
1038 
1039     protected void createBenthosActions() {
1040         $objectMap.put("benthosActions", benthosActions = new JPanel());
1041         
1042         benthosActions.setName("benthosActions");
1043         benthosActions.setLayout(new GridLayout());
1044     }
1045 
1046     protected void createBenthosComboBox() {
1047         $objectMap.put("benthosComboBox", benthosComboBox = new BeanFilterableComboBox<Species>(this));
1048         
1049         benthosComboBox.setName("benthosComboBox");
1050         benthosComboBox.setShowReset(true);
1051         benthosComboBox.setToolTipText(t("tutti.editProtocol.field.benthos.tip"));
1052         benthosComboBox.putClientProperty("help", "tutti.editProtocol.field.benthos.help");
1053     }
1054 
1055     protected void createBenthosPanel() {
1056         $objectMap.put("benthosPanel", benthosPanel = new JPanel());
1057         
1058         benthosPanel.setName("benthosPanel");
1059         benthosPanel.setLayout(new BorderLayout());
1060     }
1061 
1062     protected void createBenthosTable() {
1063         $objectMap.put("benthosTable", benthosTable = new JXTable());
1064         
1065         benthosTable.setName("benthosTable");
1066         benthosTable.setSortable(true);
1067         benthosTable.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyPressed", this, "doKeyPressed__on__benthosTable"));
1068         benthosTable.addMouseListener(JAXXUtil.getEventListener(MouseListener.class, "mouseClicked", this, "doMouseClicked__on__benthosTable"));
1069         benthosTable.putClientProperty("help", "tutti.editProtocol.field.benthos.help");
1070     }
1071 
1072     protected void createBenthosTablePopup() {
1073         $objectMap.put("benthosTablePopup", benthosTablePopup = new JPopupMenu());
1074         
1075         benthosTablePopup.setName("benthosTablePopup");
1076         benthosTablePopup.setLabel("tutti.editProtocol.title.batchActions");
1077     }
1078 
1079     protected void createBroker() {
1080         $objectMap.put("broker", broker = new TuttiHelpBroker("tutti.editProtocol.help"));
1081     }
1082 
1083     protected void createCalcifiedPiecesSamplingEditorUI() {
1084         $objectMap.put("calcifiedPiecesSamplingEditorUI", calcifiedPiecesSamplingEditorUI = new CalcifiedPiecesSamplingEditorUI(this));
1085         
1086         calcifiedPiecesSamplingEditorUI.setName("calcifiedPiecesSamplingEditorUI");
1087     }
1088 
1089     protected void createCaracteristicActions() {
1090         $objectMap.put("caracteristicActions", caracteristicActions = new JPanel());
1091         
1092         caracteristicActions.setName("caracteristicActions");
1093         caracteristicActions.setLayout(new GridLayout());
1094     }
1095 
1096     protected void createCaracteristicMappingComboBox() {
1097         $objectMap.put("caracteristicMappingComboBox", caracteristicMappingComboBox = new BeanFilterableComboBox<Caracteristic>(this));
1098         
1099         caracteristicMappingComboBox.setName("caracteristicMappingComboBox");
1100         caracteristicMappingComboBox.setShowReset(true);
1101         caracteristicMappingComboBox.setToolTipText(t("tutti.editProtocol.field.caracteristicMapping.tip"));
1102         caracteristicMappingComboBox.putClientProperty("help", "tutti.editProtocol.field.caracteristicMapping.help");
1103     }
1104 
1105     protected void createCaracteristicMappingTablePopup() {
1106         $objectMap.put("caracteristicMappingTablePopup", caracteristicMappingTablePopup = new JPopupMenu());
1107         
1108         caracteristicMappingTablePopup.setName("caracteristicMappingTablePopup");
1109         caracteristicMappingTablePopup.setLabel("tutti.editProtocol.title.batchActions");
1110     }
1111 
1112     protected void createCaracteristicPane() {
1113         $objectMap.put("caracteristicPane", caracteristicPane = new JTabbedPane());
1114         
1115         caracteristicPane.setName("caracteristicPane");
1116         caracteristicPane.putClientProperty("help", "tutti.editProtocol.pane.caracteristic.help");
1117     }
1118 
1119     protected void createCaracteristicPanel() {
1120         $objectMap.put("caracteristicPanel", caracteristicPanel = new JPanel());
1121         
1122         caracteristicPanel.setName("caracteristicPanel");
1123         caracteristicPanel.setLayout(new BorderLayout());
1124     }
1125 
1126     protected void createCaracteristicsMappingTable() {
1127         $objectMap.put("caracteristicsMappingTable", caracteristicsMappingTable = new JXTable());
1128         
1129         caracteristicsMappingTable.setName("caracteristicsMappingTable");
1130         caracteristicsMappingTable.setSortable(false);
1131         caracteristicsMappingTable.setEnabled(true);
1132         caracteristicsMappingTable.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyPressed", this, "doKeyPressed__on__caracteristicsMappingTable"));
1133         caracteristicsMappingTable.addMouseListener(JAXXUtil.getEventListener(MouseListener.class, "mouseClicked", this, "doMouseClicked__on__caracteristicsMappingTable"));
1134     }
1135 
1136     protected void createCloseButton() {
1137         $objectMap.put("closeButton", closeButton = new JButton());
1138         
1139         closeButton.setName("closeButton");
1140         closeButton.setText(t("tutti.editProtocol.action.closeEditProtocol"));
1141         closeButton.setToolTipText(t("tutti.editProtocol.action.closeEditProtocol.tip"));
1142         closeButton.putClientProperty("help", "tutti.editProtocol.action.closeEditProtocol.help");
1143         closeButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.actions.OpenHomeScreenAction.class);
1144     }
1145 
1146     protected void createCommentField() {
1147         $objectMap.put("commentField", commentField = new JTextArea());
1148         
1149         commentField.setName("commentField");
1150         commentField.setColumns(15);
1151         commentField.setLineWrap(true);
1152         commentField.setWrapStyleWord(true);
1153         commentField.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__commentField"));
1154         commentField.putClientProperty("validatorLabel", t("tutti.editProtocol.field.comment"));
1155     }
1156 
1157     protected void createCommentPane() {
1158         $objectMap.put("commentPane", commentPane = new JScrollPane());
1159         
1160         commentPane.setName("commentPane");
1161         commentPane.setToolTipText(t("tutti.editProtocol.field.comment.tip"));
1162         commentPane.addFocusListener(JAXXUtil.getEventListener(FocusListener.class, "focusGained", this, "doFocusGained__on__commentPane"));
1163         commentPane.putClientProperty("help", "tutti.editProtocol.field.comment.help");
1164     }
1165 
1166     protected void createCpsTabbedPane() {
1167         $objectMap.put("cpsTabbedPane", cpsTabbedPane = new JTabbedPane());
1168         
1169         cpsTabbedPane.setName("cpsTabbedPane");
1170     }
1171 
1172     protected void createEditMaturityCaracteristicAction() {
1173         $objectMap.put("editMaturityCaracteristicAction", editMaturityCaracteristicAction = new JMenuItem());
1174         
1175         editMaturityCaracteristicAction.setName("editMaturityCaracteristicAction");
1176         editMaturityCaracteristicAction.setText(t("tutti.editProtocol.action.editMaturityCaracteristic"));
1177         editMaturityCaracteristicAction.setToolTipText(t("tutti.editProtocol.action.editMaturityCaracteristic.tip"));
1178         editMaturityCaracteristicAction.setEnabled(false);
1179         editMaturityCaracteristicAction.putClientProperty("help", "tutti.editProtocol.action.editMaturityCaracteristic.help");
1180         editMaturityCaracteristicAction.putClientProperty("simpleAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.EditMaturityCaracteristicAction.class);
1181     }
1182 
1183     protected void createExportAllCaracteristicButton() {
1184         $objectMap.put("exportAllCaracteristicButton", exportAllCaracteristicButton = new JButton());
1185         
1186         exportAllCaracteristicButton.setName("exportAllCaracteristicButton");
1187         exportAllCaracteristicButton.setText(t("tutti.editProtocol.action.exportProtocolAllCaracteristic"));
1188         exportAllCaracteristicButton.setToolTipText(t("tutti.editProtocol.action.exportProtocolAllCaracteristic.tip"));
1189         exportAllCaracteristicButton.putClientProperty("help", "tutti.editProtocol.action.exportProtocolAllCaracteristic.help");
1190         exportAllCaracteristicButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ExportAllCaracteristicAction.class);
1191     }
1192 
1193     protected void createExportBenthosButton() {
1194         $objectMap.put("exportBenthosButton", exportBenthosButton = new JButton());
1195         
1196         exportBenthosButton.setName("exportBenthosButton");
1197         exportBenthosButton.setText(t("tutti.editProtocol.action.exportProtocolBenthos"));
1198         exportBenthosButton.setToolTipText(t("tutti.editProtocol.action.exportProtocolBenthos.tip"));
1199         exportBenthosButton.putClientProperty("help", "tutti.editProtocol.action.exportProtocolBenthos.help");
1200         exportBenthosButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ExportProtocolBenthosAction.class);
1201     }
1202 
1203     protected void createExportCaracteristicButton() {
1204         $objectMap.put("exportCaracteristicButton", exportCaracteristicButton = new JButton());
1205         
1206         exportCaracteristicButton.setName("exportCaracteristicButton");
1207         exportCaracteristicButton.setText(t("tutti.editProtocol.action.exportProtocolCaracteristic"));
1208         exportCaracteristicButton.setToolTipText(t("tutti.editProtocol.action.exportProtocolCaracteristic.tip"));
1209         exportCaracteristicButton.putClientProperty("help", "tutti.editProtocol.action.exportProtocolCaracteristic.tip");
1210         exportCaracteristicButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ExportProtocolCaracteristicAction.class);
1211     }
1212 
1213     protected void createExportPupitriButton() {
1214         $objectMap.put("exportPupitriButton", exportPupitriButton = new JButton());
1215         
1216         exportPupitriButton.setName("exportPupitriButton");
1217         exportPupitriButton.setText(t("tutti.editProtocol.action.exportPupitri"));
1218         exportPupitriButton.setToolTipText(t("tutti.editProtocol.action.exportPupitri.tip"));
1219         exportPupitriButton.putClientProperty("help", "tutti.editProtocol.action.exportPupitri.help");
1220         exportPupitriButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ExportPupitriAction.class);
1221     }
1222 
1223     protected void createExportSpeciesButton() {
1224         $objectMap.put("exportSpeciesButton", exportSpeciesButton = new JButton());
1225         
1226         exportSpeciesButton.setName("exportSpeciesButton");
1227         exportSpeciesButton.setText(t("tutti.editProtocol.action.exportProtocolSpecies"));
1228         exportSpeciesButton.setToolTipText(t("tutti.editProtocol.action.exportProtocolSpecies.tip"));
1229         exportSpeciesButton.putClientProperty("help", "tutti.editProtocol.action.exportProtocolSpecies.help");
1230         exportSpeciesButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ExportProtocolSpeciesAction.class);
1231     }
1232 
1233     protected EditProtocolUIHandler createHandler() {
1234         return new EditProtocolUIHandler();
1235     }
1236 
1237     protected void createImportBenthosButton() {
1238         $objectMap.put("importBenthosButton", importBenthosButton = new JButton());
1239         
1240         importBenthosButton.setName("importBenthosButton");
1241         importBenthosButton.setText(t("tutti.editProtocol.action.importProtocolBenthos"));
1242         importBenthosButton.setToolTipText(t("tutti.editProtocol.action.importProtocolBenthos.tip"));
1243         importBenthosButton.putClientProperty("help", "tutti.editProtocol.action.importProtocolBenthos.help");
1244         importBenthosButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ImportProtocolBenthosAction.class);
1245     }
1246 
1247     protected void createImportCaracteristicButton() {
1248         $objectMap.put("importCaracteristicButton", importCaracteristicButton = new JButton());
1249         
1250         importCaracteristicButton.setName("importCaracteristicButton");
1251         importCaracteristicButton.setText(t("tutti.editProtocol.action.importProtocolCaracteristic"));
1252         importCaracteristicButton.setToolTipText(t("tutti.editProtocol.action.importProtocolCaracteristic.tip"));
1253         importCaracteristicButton.putClientProperty("help", "tutti.editProtocol.action.importProtocolCaracteristic.help");
1254         importCaracteristicButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ImportProtocolCaracteristicAction.class);
1255     }
1256 
1257     protected void createImportColumnsButton() {
1258         $objectMap.put("importColumnsButton", importColumnsButton = new JButton());
1259         
1260         importColumnsButton.setName("importColumnsButton");
1261         importColumnsButton.setText(t("tutti.editProtocol.action.importProtocolColumns"));
1262         importColumnsButton.setToolTipText(t("tutti.editProtocol.action.importProtocolColumns.tip"));
1263         importColumnsButton.putClientProperty("help", "tutti.editProtocol.action.importProtocolColumns.help");
1264         importColumnsButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.LoadProtocolImportColumnsAction.class);
1265     }
1266 
1267     protected void createImportSpeciesButton() {
1268         $objectMap.put("importSpeciesButton", importSpeciesButton = new JButton());
1269         
1270         importSpeciesButton.setName("importSpeciesButton");
1271         importSpeciesButton.setText(t("tutti.editProtocol.action.importProtocolSpecies"));
1272         importSpeciesButton.setToolTipText(t("tutti.editProtocol.action.importProtocolSpecies.tip"));
1273         importSpeciesButton.putClientProperty("help", "tutti.editProtocol.action.importProtocolSpecies.help");
1274         importSpeciesButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.ImportProtocolSpeciesAction.class);
1275     }
1276 
1277     protected void createIndividualObservationList() {
1278         $objectMap.put("individualObservationList", individualObservationList = new BeanDoubleList<Caracteristic>());
1279         
1280         individualObservationList.setName("individualObservationList");
1281         individualObservationList.setShowSelectPopupEnabled(true);
1282         individualObservationList.setProperty("individualObservationPmfm");
1283         individualObservationList.setShowReset(true);
1284         individualObservationList.putClientProperty("help", "tutti.editProtocol.field.individualObservation.help");
1285     }
1286 
1287     protected void createLengthClassesList() {
1288         $objectMap.put("lengthClassesList", lengthClassesList = new BeanDoubleList<Caracteristic>());
1289         
1290         lengthClassesList.setName("lengthClassesList");
1291         lengthClassesList.setShowSelectPopupEnabled(true);
1292         lengthClassesList.setProperty("lengthClassesPmfm");
1293         lengthClassesList.setShowReset(true);
1294         lengthClassesList.putClientProperty("help", "tutti.editProtocol.field.lengthClasses.help");
1295     }
1296 
1297     protected void createMaturityList() {
1298         $objectMap.put("maturityList", maturityList = new BeanDoubleList<Caracteristic>());
1299         
1300         maturityList.setName("maturityList");
1301         maturityList.setShowSelectPopupEnabled(true);
1302         maturityList.setProperty("maturityPmfm");
1303         maturityList.setShowReset(true);
1304         maturityList.putClientProperty("help", "tutti.editProtocol.field.maturity.help");
1305     }
1306 
1307     protected void createModel() {
1308         $objectMap.put("model", model = getContextValue(EditProtocolUIModel.class));
1309     }
1310 
1311     protected void createMoveDownCaracteristicMappingButton() {
1312         $objectMap.put("moveDownCaracteristicMappingButton", moveDownCaracteristicMappingButton = new JMenuItem());
1313         
1314         moveDownCaracteristicMappingButton.setName("moveDownCaracteristicMappingButton");
1315         moveDownCaracteristicMappingButton.setText(t("tutti.editProtocol.action.moveDownCaracteristicMapping"));
1316         moveDownCaracteristicMappingButton.setToolTipText(t("tutti.editProtocol.action.moveDownCaracteristicMapping.tip"));
1317         moveDownCaracteristicMappingButton.putClientProperty("help", "tutti.editProtocol.action.moveDownCaracteristicMapping.help");
1318         moveDownCaracteristicMappingButton.putClientProperty("simpleAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.MoveDownCaracteristicMappingAction.class);
1319     }
1320 
1321     protected void createMoveUpCaracteristicMappingButton() {
1322         $objectMap.put("moveUpCaracteristicMappingButton", moveUpCaracteristicMappingButton = new JMenuItem());
1323         
1324         moveUpCaracteristicMappingButton.setName("moveUpCaracteristicMappingButton");
1325         moveUpCaracteristicMappingButton.setText(t("tutti.editProtocol.action.moveUpCaracteristicMapping"));
1326         moveUpCaracteristicMappingButton.setToolTipText(t("tutti.editProtocol.action.moveUpCaracteristicMapping.tip"));
1327         moveUpCaracteristicMappingButton.putClientProperty("help", "tutti.editProtocol.action.moveUpEntry.help");
1328         moveUpCaracteristicMappingButton.putClientProperty("simpleAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.MoveUpCaracteristicMappingAction.class);
1329     }
1330 
1331     protected void createNameField() {
1332         $objectMap.put("nameField", nameField = new JTextField());
1333         
1334         nameField.setName("nameField");
1335         nameField.setColumns(15);
1336         nameField.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__nameField"));
1337         nameField.putClientProperty("help", "tutti.editProtocol.field.name.help");
1338         nameField.putClientProperty("selectOnFocus", true);
1339         nameField.putClientProperty("validatorLabel", t("tutti.editProtocol.field.protocol.name"));
1340     }
1341 
1342     protected void createNameLabel() {
1343         $objectMap.put("nameLabel", nameLabel = new JLabel());
1344         
1345         nameLabel.setName("nameLabel");
1346         nameLabel.setText(t("tutti.editProtocol.field.protocol.name"));
1347         nameLabel.setToolTipText(t("tutti.editProtocol.field.protocol.name.tip"));
1348         nameLabel.putClientProperty("help", "tutti.editProtocol.field.name.help");
1349     }
1350 
1351     protected void createOperationFieldsMappingTable() {
1352         $objectMap.put("operationFieldsMappingTable", operationFieldsMappingTable = new JXTable());
1353         
1354         operationFieldsMappingTable.setName("operationFieldsMappingTable");
1355         operationFieldsMappingTable.setSortable(false);
1356         operationFieldsMappingTable.setEnabled(true);
1357     }
1358 
1359     protected void createProtocolInfoForm() {
1360         $objectMap.put("protocolInfoForm", protocolInfoForm = new Table());
1361         
1362         protocolInfoForm.setName("protocolInfoForm");
1363     }
1364 
1365     protected void createRemoveBenthosProtocolButton() {
1366         $objectMap.put("removeBenthosProtocolButton", removeBenthosProtocolButton = new JMenuItem());
1367         
1368         removeBenthosProtocolButton.setName("removeBenthosProtocolButton");
1369         removeBenthosProtocolButton.setText(t("tutti.editProtocol.action.removeBenthosProtocol"));
1370         removeBenthosProtocolButton.setToolTipText(t("tutti.editProtocol.action.removeBenthosProtocol.tip"));
1371         removeBenthosProtocolButton.putClientProperty("help", "tutti.editProtocol.action.removeBenthosProtocol.help");
1372         removeBenthosProtocolButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.RemoveBenthosProtocolAction.class);
1373     }
1374 
1375     protected void createRemoveCaracteristicMappingButton() {
1376         $objectMap.put("removeCaracteristicMappingButton", removeCaracteristicMappingButton = new JMenuItem());
1377         
1378         removeCaracteristicMappingButton.setName("removeCaracteristicMappingButton");
1379         removeCaracteristicMappingButton.setText(t("tutti.editProtocol.action.removeCaracteristicMapping"));
1380         removeCaracteristicMappingButton.setToolTipText(t("tutti.editProtocol.action.removeCaracteristicMapping.tip"));
1381         removeCaracteristicMappingButton.putClientProperty("help", "tutti.editProtocol.action.removeCaracteristicMapping.help");
1382         removeCaracteristicMappingButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.RemoveCaracteristicMappingAction.class);
1383     }
1384 
1385     protected void createRemoveSpeciesProtocolButton() {
1386         $objectMap.put("removeSpeciesProtocolButton", removeSpeciesProtocolButton = new JMenuItem());
1387         
1388         removeSpeciesProtocolButton.setName("removeSpeciesProtocolButton");
1389         removeSpeciesProtocolButton.setText(t("tutti.editProtocol.action.removeSpeciesProtocol"));
1390         removeSpeciesProtocolButton.setToolTipText(t("tutti.editProtocol.action.removeSpeciesProtocol.tip"));
1391         removeSpeciesProtocolButton.putClientProperty("help", "tutti.editProtocol.action.removeSpeciesProtocol.help");
1392         removeSpeciesProtocolButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.RemoveSpeciesProtocolAction.class);
1393     }
1394 
1395     protected void createRtpEditorUI() {
1396         $objectMap.put("rtpEditorUI", rtpEditorUI = new RtpEditorUI(this));
1397         
1398         rtpEditorUI.setName("rtpEditorUI");
1399     }
1400 
1401     protected void createSaveButton() {
1402         $objectMap.put("saveButton", saveButton = new JButton());
1403         
1404         saveButton.setName("saveButton");
1405         saveButton.setText(t("tutti.editProtocol.action.saveProtocol"));
1406         saveButton.setToolTipText(t("tutti.editProtocol.action.saveProtocol.tip"));
1407         saveButton.putClientProperty("help", "tutti.editProtocol.action.saveProtocol.help");
1408         saveButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.SaveProtocolAction.class);
1409     }
1410 
1411     protected void createSaveWarning() {
1412         $objectMap.put("saveWarning", saveWarning = new JLabel());
1413         
1414         saveWarning.setName("saveWarning");
1415     }
1416 
1417     protected void createSaveWarningContainer() {
1418         $objectMap.put("saveWarningContainer", saveWarningContainer = new JPanel());
1419         
1420         saveWarningContainer.setName("saveWarningContainer");
1421         saveWarningContainer.setLayout(new BorderLayout(10, 10));
1422     }
1423 
1424     protected void createSelectOtherBenthosButton() {
1425         $objectMap.put("selectOtherBenthosButton", selectOtherBenthosButton = new JButton());
1426         
1427         selectOtherBenthosButton.setName("selectOtherBenthosButton");
1428         selectOtherBenthosButton.setText(t("tutti.editProtocol.action.selectOtherBenthos"));
1429         selectOtherBenthosButton.setToolTipText(t("tutti.editProtocol.action.selectOtherBenthos.tip"));
1430         selectOtherBenthosButton.putClientProperty("help", "tutti.editProtocol.action.selectOtherBenthos.help");
1431         selectOtherBenthosButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.SelectOtherBenthosAction.class);
1432     }
1433 
1434     protected void createSelectOtherSpeciesButton() {
1435         $objectMap.put("selectOtherSpeciesButton", selectOtherSpeciesButton = new JButton());
1436         
1437         selectOtherSpeciesButton.setName("selectOtherSpeciesButton");
1438         selectOtherSpeciesButton.setText(t("tutti.editProtocol.action.selectOtherSpecies"));
1439         selectOtherSpeciesButton.setToolTipText(t("tutti.editProtocol.action.selectOtherSpecies.tip"));
1440         selectOtherSpeciesButton.putClientProperty("help", "tutti.editProtocol.action.selectOtherSpecies.help");
1441         selectOtherSpeciesButton.putClientProperty("applicationAction", fr.ifremer.tutti.ui.swing.content.protocol.actions.SelectOtherSpeciesAction.class);
1442     }
1443 
1444     protected void createSpeciesActions() {
1445         $objectMap.put("speciesActions", speciesActions = new JPanel());
1446         
1447         speciesActions.setName("speciesActions");
1448         speciesActions.setLayout(new GridLayout());
1449     }
1450 
1451     protected void createSpeciesComboBox() {
1452         $objectMap.put("speciesComboBox", speciesComboBox = new BeanFilterableComboBox<Species>(this));
1453         
1454         speciesComboBox.setName("speciesComboBox");
1455         speciesComboBox.setShowReset(true);
1456         speciesComboBox.setToolTipText(t("tutti.editProtocol.field.species.tip"));
1457         speciesComboBox.putClientProperty("help", "tutti.editProtocol.field.species.help");
1458     }
1459 
1460     protected void createSpeciesPanel() {
1461         $objectMap.put("speciesPanel", speciesPanel = new JPanel());
1462         
1463         speciesPanel.setName("speciesPanel");
1464         speciesPanel.setLayout(new BorderLayout());
1465     }
1466 
1467     protected void createSpeciesTable() {
1468         $objectMap.put("speciesTable", speciesTable = new JXTable());
1469         
1470         speciesTable.setName("speciesTable");
1471         speciesTable.setSortable(true);
1472         speciesTable.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyPressed", this, "doKeyPressed__on__speciesTable"));
1473         speciesTable.addMouseListener(JAXXUtil.getEventListener(MouseListener.class, "mouseClicked", this, "doMouseClicked__on__speciesTable"));
1474         speciesTable.putClientProperty("help", "tutti.editProtocol.field.species.help");
1475     }
1476 
1477     protected void createSpeciesTablePopup() {
1478         $objectMap.put("speciesTablePopup", speciesTablePopup = new JPopupMenu());
1479         
1480         speciesTablePopup.setName("speciesTablePopup");
1481         speciesTablePopup.setLabel("tutti.editProtocol.title.batchActions");
1482     }
1483 
1484     protected void createTabPanel() {
1485         $objectMap.put("tabPanel", tabPanel = new JTabbedPane());
1486         
1487         tabPanel.setName("tabPanel");
1488     }
1489 
1490     protected void createUseCalcifiedPieceSampling() {
1491         $objectMap.put("useCalcifiedPieceSampling", useCalcifiedPieceSampling = new JCheckBox());
1492         
1493         useCalcifiedPieceSampling.setName("useCalcifiedPieceSampling");
1494         useCalcifiedPieceSampling.setText(t("tutti.editProtocol.field.useCalcifiedPieceSampling"));
1495         useCalcifiedPieceSampling.setToolTipText(t("tutti.editProtocol.field.useCalcifiedPieceSampling.tip"));
1496         useCalcifiedPieceSampling.addItemListener(JAXXUtil.getEventListener(ItemListener.class, "itemStateChanged", this, "doItemStateChanged__on__useCalcifiedPieceSampling"));
1497         useCalcifiedPieceSampling.putClientProperty("help", "tutti.editProtocol.field.useCalcifiedPieceSampling.help");
1498     }
1499 
1500     protected void createValidator() {
1501         $objectMap.put("validator", validator = SwingValidator.newValidator(EditProtocolUIModel.class, null));
1502     }
1503 
1504     protected void createZoneEditor() {
1505         $objectMap.put("zoneEditor", zoneEditor = new ZoneEditorUI(this));
1506         
1507         zoneEditor.setName("zoneEditor");
1508     }
1509 
1510     /*-----------------------------------------------------------------------*/
1511     /*------------------------ Internal jaxx methods ------------------------*/
1512     /*-----------------------------------------------------------------------*/
1513 
1514     private void $completeSetup() {
1515         allComponentsCreated = true;
1516         if (log.isDebugEnabled()) {
1517             log.debug(this);
1518         }
1519         addChildrenToEditProtocolTopPanel();
1520         addChildrenToValidator();
1521         addChildrenToSpeciesTablePopup();
1522         addChildrenToBenthosTablePopup();
1523         addChildrenToCaracteristicMappingTablePopup();
1524         addChildrenToTabPanel();
1525         addChildrenToProtocolInfoForm();
1526         addChildrenToCommentPane();
1527         addChildrenToCaracteristicPanel();
1528         addChildrenToCaracteristicActions();
1529         addChildrenToCaracteristicPane();
1530         // inline complete setup of $Table0
1531         $Table0.add(caracteristicMappingComboBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1532         $Table0.add(addCaracteristicMappingButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1533         $Table0.add($JScrollPane0, new GridBagConstraints(0, 1, 2, 1, 0.0, 1.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1534         $Table0.add($JScrollPane1, new GridBagConstraints(0, 2, 2, 1, 0.0, 1.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1535         // inline complete setup of $JScrollPane0
1536         $JScrollPane0.getViewport().add(caracteristicsMappingTable);
1537         // inline complete setup of $JScrollPane1
1538         $JScrollPane1.getViewport().add(operationFieldsMappingTable);
1539         addChildrenToSpeciesPanel();
1540         addChildrenToSpeciesActions();
1541         // inline complete setup of $Table1
1542         $Table1.add(speciesComboBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1543         $Table1.add(selectOtherSpeciesButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1544         $Table1.add(addSpeciesProtocolButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1545         $Table1.add($JScrollPane2, new GridBagConstraints(0, 1, 3, 1, 0.0, 1.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1546         // inline complete setup of $JScrollPane2
1547         $JScrollPane2.getViewport().add(speciesTable);
1548         addChildrenToBenthosPanel();
1549         addChildrenToBenthosActions();
1550         // inline complete setup of $Table2
1551         $Table2.add(benthosComboBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1552         $Table2.add(selectOtherBenthosButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1553         $Table2.add(addBenthosProtocolButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1554         $Table2.add($JScrollPane3, new GridBagConstraints(0, 1, 3, 1, 0.0, 1.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1555         // inline complete setup of $JScrollPane3
1556         $JScrollPane3.getViewport().add(benthosTable);
1557         // inline complete setup of $JPanel0
1558         $JPanel0.add(useCalcifiedPieceSampling, BorderLayout.NORTH);
1559         $JPanel0.add(cpsTabbedPane, BorderLayout.CENTER);
1560         addChildrenToCpsTabbedPane();
1561         addChildrenToSaveWarningContainer();
1562         // inline complete setup of $JPanel1
1563         $JPanel1.add(closeButton);
1564         $JPanel1.add(saveButton);
1565         
1566         // apply 17 data bindings
1567         JAXXUtil.applyDataBinding(this, $bindings.keySet());
1568         
1569         // apply 76 property setters
1570         lengthClassesList.setBeanType(Caracteristic.class);
1571         individualObservationList.setBeanType(Caracteristic.class);
1572         maturityList.setBeanType(Caracteristic.class);
1573         caracteristicMappingComboBox.setBeanType(Caracteristic.class);
1574         speciesComboBox.setBeanType(Species.class);
1575         benthosComboBox.setBeanType(Species.class);
1576         useCalcifiedPieceSampling.setBorder(new TitledBorder(null, null));
1577         editMaturityCaracteristicAction.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.editMaturityCaracteristic.mnemonic"),'Z'));
1578         editMaturityCaracteristicAction.setIcon(SwingUtil.createActionIcon("edit"));
1579         removeSpeciesProtocolButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.removeSpeciesProtocol.mnemonic"),'Z'));
1580         removeSpeciesProtocolButton.setIcon(SwingUtil.createActionIcon("batch-delete"));
1581         removeBenthosProtocolButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.removeBenthosProtocol.mnemonic"),'Z'));
1582         removeBenthosProtocolButton.setIcon(SwingUtil.createActionIcon("batch-delete"));
1583         removeCaracteristicMappingButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.removeCaracteristicMapping.mnemonic"),'Z'));
1584         removeCaracteristicMappingButton.setIcon(SwingUtil.createActionIcon("delete"));
1585         moveUpCaracteristicMappingButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.moveUpCaracteristicMapping.mnemonic"),'Z'));
1586         moveUpCaracteristicMappingButton.setIcon(SwingUtil.createActionIcon("up"));
1587         moveDownCaracteristicMappingButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.moveDownCaracteristicMapping.mnemonic"),'Z'));
1588         moveDownCaracteristicMappingButton.setIcon(SwingUtil.createActionIcon("down"));
1589         nameLabel.setLabelFor(nameField);
1590         commentPane.setBorder(BorderFactory.createTitledBorder(t("tutti.editProtocol.field.comment")));
1591         importCaracteristicButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.importProtocolCaracteristic.mnemonic"),'Z'));
1592         importCaracteristicButton.setIcon(SwingUtil.createActionIcon("import"));
1593         exportCaracteristicButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.exportProtocolCaracteristic.mnemonic"),'Z'));
1594         exportCaracteristicButton.setIcon(SwingUtil.createActionIcon("export"));
1595         exportAllCaracteristicButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.exportProtocolAllCaracteristic.mnemonic"),'Z'));
1596         exportAllCaracteristicButton.setIcon(SwingUtil.createActionIcon("export"));
1597         importColumnsButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.importProtocolColumns.mnemonic"),'Z'));
1598         importColumnsButton.setIcon(SwingUtil.createActionIcon("import"));
1599         caracteristicPane.setTabPlacement(JTabbedPane.LEFT);
1600         lengthClassesList.setBean(model);
1601         individualObservationList.setBean(model);
1602         maturityList.setBean(model);
1603         addCaracteristicMappingButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.addCaracteristicMapping.mnemonic"),'Z'));
1604         addCaracteristicMappingButton.setIcon(SwingUtil.createActionIcon("add"));
1605         caracteristicsMappingTable.setSelectionBackground(null);
1606         caracteristicsMappingTable.setSelectionForeground(Color.BLACK);
1607         caracteristicsMappingTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
1608         operationFieldsMappingTable.setSelectionBackground(null);
1609         operationFieldsMappingTable.setSelectionForeground(Color.BLACK);
1610         operationFieldsMappingTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
1611         importSpeciesButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.importProtocolSpecies.mnemonic"),'Z'));
1612         importSpeciesButton.setIcon(SwingUtil.createActionIcon("import"));
1613         exportSpeciesButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.exportProtocolSpecies.mnemonic"),'Z'));
1614         exportSpeciesButton.setIcon(SwingUtil.createActionIcon("export"));
1615         exportPupitriButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.exportPupitri.mnemonic"),'Z'));
1616         exportPupitriButton.setIcon(SwingUtil.createActionIcon("export"));
1617         selectOtherSpeciesButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.selectOtherSpecies.mnemonic"),'Z'));
1618         addSpeciesProtocolButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.addSpeciesProtocol.mnemonic"),'Z'));
1619         addSpeciesProtocolButton.setIcon(SwingUtil.createActionIcon("add"));
1620         speciesTable.setSelectionForeground(Color.BLACK);
1621         importBenthosButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.importProtocolBenthos.mnemonic"),'Z'));
1622         importBenthosButton.setIcon(SwingUtil.createActionIcon("import"));
1623         exportBenthosButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.exportProtocolBenthos.mnemonic"),'Z'));
1624         exportBenthosButton.setIcon(SwingUtil.createActionIcon("export"));
1625         selectOtherBenthosButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.selectOtherBenthos.mnemonic"),'Z'));
1626         addBenthosProtocolButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.addBenthosProtocol.mnemonic"),'Z'));
1627         addBenthosProtocolButton.setIcon(SwingUtil.createActionIcon("add"));
1628         benthosTable.setSelectionForeground(Color.BLACK);
1629         saveWarningContainer.setBackground(new java.awt.Color(245, 218, 88));
1630         saveWarning.setBorder(new javax.swing.border.EmptyBorder(5, 10, 5, 10));
1631         saveWarning.setIcon(SwingUtil.createActionIcon("warning"));
1632         closeButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.closeEditProtocol.mnemonic"),'Z'));
1633         closeButton.setIcon(SwingUtil.createActionIcon("cancel"));
1634         saveButton.setMnemonic(SwingUtil.getFirstCharAt(t("tutti.editProtocol.action.saveProtocol.mnemonic"),'Z'));
1635         saveButton.setIcon(SwingUtil.createActionIcon("save"));
1636         // late initializer
1637         rtpEditorUI.pack();
1638         // help broker setup
1639         TuttiHelpBroker _broker = getBroker();
1640         registerHelpId(_broker, editProtocolTopPanel, "tutti.editProtocol.help");
1641         registerHelpId(_broker, editMaturityCaracteristicAction, "tutti.editProtocol.action.editMaturityCaracteristic.help");
1642         registerHelpId(_broker, removeSpeciesProtocolButton, "tutti.editProtocol.action.removeSpeciesProtocol.help");
1643         registerHelpId(_broker, removeBenthosProtocolButton, "tutti.editProtocol.action.removeBenthosProtocol.help");
1644         registerHelpId(_broker, removeCaracteristicMappingButton, "tutti.editProtocol.action.removeCaracteristicMapping.help");
1645         registerHelpId(_broker, moveUpCaracteristicMappingButton, "tutti.editProtocol.action.moveUpEntry.help");
1646         registerHelpId(_broker, moveDownCaracteristicMappingButton, "tutti.editProtocol.action.moveDownCaracteristicMapping.help");
1647         registerHelpId(_broker, nameLabel, "tutti.editProtocol.field.name.help");
1648         registerHelpId(_broker, nameField, "tutti.editProtocol.field.name.help");
1649         registerHelpId(_broker, commentPane, "tutti.editProtocol.field.comment.help");
1650         registerHelpId(_broker, importCaracteristicButton, "tutti.editProtocol.action.importProtocolCaracteristic.help");
1651         registerHelpId(_broker, exportCaracteristicButton, "tutti.editProtocol.action.exportProtocolCaracteristic.tip");
1652         registerHelpId(_broker, exportAllCaracteristicButton, "tutti.editProtocol.action.exportProtocolAllCaracteristic.help");
1653         registerHelpId(_broker, importColumnsButton, "tutti.editProtocol.action.importProtocolColumns.help");
1654         registerHelpId(_broker, caracteristicPane, "tutti.editProtocol.pane.caracteristic.help");
1655         registerHelpId(_broker, lengthClassesList, "tutti.editProtocol.field.lengthClasses.help");
1656         registerHelpId(_broker, individualObservationList, "tutti.editProtocol.field.individualObservation.help");
1657         registerHelpId(_broker, maturityList, "tutti.editProtocol.field.maturity.help");
1658         registerHelpId(_broker, caracteristicMappingComboBox, "tutti.editProtocol.field.caracteristicMapping.help");
1659         registerHelpId(_broker, addCaracteristicMappingButton, "tutti.editProtocol.action.addCaracteristicMapping.help");
1660         registerHelpId(_broker, importSpeciesButton, "tutti.editProtocol.action.importProtocolSpecies.help");
1661         registerHelpId(_broker, exportSpeciesButton, "tutti.editProtocol.action.exportProtocolSpecies.help");
1662         registerHelpId(_broker, exportPupitriButton, "tutti.editProtocol.action.exportPupitri.help");
1663         registerHelpId(_broker, speciesComboBox, "tutti.editProtocol.field.species.help");
1664         registerHelpId(_broker, selectOtherSpeciesButton, "tutti.editProtocol.action.selectOtherSpecies.help");
1665         registerHelpId(_broker, addSpeciesProtocolButton, "tutti.editProtocol.action.addSpeciesProtocol.help");
1666         registerHelpId(_broker, speciesTable, "tutti.editProtocol.field.species.help");
1667         registerHelpId(_broker, importBenthosButton, "tutti.editProtocol.action.importProtocolBenthos.help");
1668         registerHelpId(_broker, exportBenthosButton, "tutti.editProtocol.action.exportProtocolBenthos.help");
1669         registerHelpId(_broker, benthosComboBox, "tutti.editProtocol.field.benthos.help");
1670         registerHelpId(_broker, selectOtherBenthosButton, "tutti.editProtocol.action.selectOtherBenthos.help");
1671         registerHelpId(_broker, addBenthosProtocolButton, "tutti.editProtocol.action.addBenthosProtocol.help");
1672         registerHelpId(_broker, benthosTable, "tutti.editProtocol.field.benthos.help");
1673         registerHelpId(_broker, useCalcifiedPieceSampling, "tutti.editProtocol.field.useCalcifiedPieceSampling.help");
1674         registerHelpId(_broker, closeButton, "tutti.editProtocol.action.closeEditProtocol.help");
1675         registerHelpId(_broker, saveButton, "tutti.editProtocol.action.saveProtocol.help");
1676         _broker.prepareUI(this);
1677         // register 1 validator(s)
1678         validatorIds = SwingValidatorUtil.detectValidators(this);
1679         SwingValidatorUtil.installUI(this);
1680     }
1681 
1682     private void $initialize() {
1683         if (allComponentsCreated) {
1684             return;
1685         }
1686         if (log.isDebugEnabled()) {
1687             log.debug(this);
1688         }
1689         handler.beforeInit(this);
1690         $objectMap.put("editProtocolTopPanel", editProtocolTopPanel);
1691         createModel();
1692         createBroker();
1693         createRtpEditorUI();
1694         createValidator();
1695         createEditMaturityCaracteristicAction();
1696         createSpeciesTablePopup();
1697         createRemoveSpeciesProtocolButton();
1698         createBenthosTablePopup();
1699         createRemoveBenthosProtocolButton();
1700         createCaracteristicMappingTablePopup();
1701         createRemoveCaracteristicMappingButton();
1702         createMoveUpCaracteristicMappingButton();
1703         createMoveDownCaracteristicMappingButton();
1704         createTabPanel();
1705         createProtocolInfoForm();
1706         createNameLabel();
1707         createNameField();
1708         createCommentPane();
1709         createCommentField();
1710         createCaracteristicPanel();
1711         createCaracteristicActions();
1712         createImportCaracteristicButton();
1713         createExportCaracteristicButton();
1714         createExportAllCaracteristicButton();
1715         createImportColumnsButton();
1716         createCaracteristicPane();
1717         createLengthClassesList();
1718         createIndividualObservationList();
1719         createMaturityList();
1720         // inline creation of $Table0
1721         $objectMap.put("$Table0", $Table0 = new Table());
1722         
1723         $Table0.setName("$Table0");
1724         createCaracteristicMappingComboBox();
1725         createAddCaracteristicMappingButton();
1726         // inline creation of $JScrollPane0
1727         $objectMap.put("$JScrollPane0", $JScrollPane0 = new JScrollPane());
1728         
1729         $JScrollPane0.setName("$JScrollPane0");
1730         createCaracteristicsMappingTable();
1731         // inline creation of $JScrollPane1
1732         $objectMap.put("$JScrollPane1", $JScrollPane1 = new JScrollPane());
1733         
1734         $JScrollPane1.setName("$JScrollPane1");
1735         createOperationFieldsMappingTable();
1736         createSpeciesPanel();
1737         createSpeciesActions();
1738         createImportSpeciesButton();
1739         createExportSpeciesButton();
1740         createExportPupitriButton();
1741         // inline creation of $Table1
1742         $objectMap.put("$Table1", $Table1 = new Table());
1743         
1744         $Table1.setName("$Table1");
1745         createSpeciesComboBox();
1746         createSelectOtherSpeciesButton();
1747         createAddSpeciesProtocolButton();
1748         // inline creation of $JScrollPane2
1749         $objectMap.put("$JScrollPane2", $JScrollPane2 = new JScrollPane());
1750         
1751         $JScrollPane2.setName("$JScrollPane2");
1752         createSpeciesTable();
1753         createBenthosPanel();
1754         createBenthosActions();
1755         createImportBenthosButton();
1756         createExportBenthosButton();
1757         // inline creation of $Table2
1758         $objectMap.put("$Table2", $Table2 = new Table());
1759         
1760         $Table2.setName("$Table2");
1761         createBenthosComboBox();
1762         createSelectOtherBenthosButton();
1763         createAddBenthosProtocolButton();
1764         // inline creation of $JScrollPane3
1765         $objectMap.put("$JScrollPane3", $JScrollPane3 = new JScrollPane());
1766         
1767         $JScrollPane3.setName("$JScrollPane3");
1768         createBenthosTable();
1769         // inline creation of $JPanel0
1770         $objectMap.put("$JPanel0", $JPanel0 = new JPanel());
1771         
1772         $JPanel0.setName("$JPanel0");
1773         $JPanel0.setLayout(new BorderLayout(10, 10));
1774         createUseCalcifiedPieceSampling();
1775         createCpsTabbedPane();
1776         createZoneEditor();
1777         createCalcifiedPiecesSamplingEditorUI();
1778         createSaveWarningContainer();
1779         createSaveWarning();
1780         // inline creation of $JPanel1
1781         $objectMap.put("$JPanel1", $JPanel1 = new JPanel());
1782         
1783         $JPanel1.setName("$JPanel1");
1784         $JPanel1.setLayout(new GridLayout(1, 0));
1785         SwingUtil.setComponentHeight($JPanel1,50);
1786         createCloseButton();
1787         createSaveButton();
1788         // inline creation of $TabInfo0
1789         $objectMap.put("$TabInfo0", $TabInfo0 = new TabInfo());
1790         
1791         $TabInfo0.setTitle(t("tutti.editProtocol.tab.info"));
1792         // inline creation of $TabInfo1
1793         $objectMap.put("$TabInfo1", $TabInfo1 = new TabInfo());
1794         
1795         $TabInfo1.setTitle(t("tutti.editProtocol.tab.caracteristic"));
1796         // inline creation of $TabInfo2
1797         $objectMap.put("$TabInfo2", $TabInfo2 = new TabInfo());
1798         
1799         $TabInfo2.setTitle(t("tutti.editProtocol.tab.caracteristic.lengthClasses"));
1800         // inline creation of $TabInfo3
1801         $objectMap.put("$TabInfo3", $TabInfo3 = new TabInfo());
1802         
1803         $TabInfo3.setTitle(t("tutti.editProtocol.tab.caracteristic.individualObservation"));
1804         // inline creation of $TabInfo4
1805         $objectMap.put("$TabInfo4", $TabInfo4 = new TabInfo());
1806         
1807         $TabInfo4.setTitle(t("tutti.editProtocol.tab.caracteristic.maturity"));
1808         // inline creation of $TabInfo5
1809         $objectMap.put("$TabInfo5", $TabInfo5 = new TabInfo());
1810         
1811         $TabInfo5.setTitle(t("tutti.editProtocol.tab.caracteristic.mapping"));
1812         // inline creation of $TabInfo6
1813         $objectMap.put("$TabInfo6", $TabInfo6 = new TabInfo());
1814         
1815         $TabInfo6.setTitle(t("tutti.editProtocol.tab.species"));
1816         // inline creation of $TabInfo7
1817         $objectMap.put("$TabInfo7", $TabInfo7 = new TabInfo());
1818         
1819         $TabInfo7.setTitle(t("tutti.editProtocol.tab.benthos"));
1820         // inline creation of $TabInfo8
1821         $objectMap.put("$TabInfo8", $TabInfo8 = new TabInfo());
1822         
1823         $TabInfo8.setTitle(t("tutti.editProtocol.tab.cps"));
1824         // inline creation of $TabInfo9
1825         $objectMap.put("$TabInfo9", $TabInfo9 = new TabInfo());
1826         
1827         $TabInfo9.setTitle(t("tutti.editProtocol.tab.zone"));
1828         // inline creation of $TabInfo10
1829         $objectMap.put("$TabInfo10", $TabInfo10 = new TabInfo());
1830         
1831         $TabInfo10.setTitle(t("tutti.editProtocol.tab.algorithm"));
1832         // inline creation of editProtocolTopPanel
1833         setName("editProtocolTopPanel");
1834         setLayout(new BorderLayout());
1835         editProtocolTopPanel.putClientProperty("help", "tutti.editProtocol.help");
1836         
1837         // registers 17 data bindings
1838         $registerDefaultBindings();
1839         $completeSetup();
1840         handler.afterInit(this);
1841     }
1842 
1843     private void $registerDefaultBindings() {
1844         // register 17 data bindings
1845         registerDataBinding(new DefaultJAXXBinding(this, BINDING_REMOVE_SPECIES_PROTOCOL_BUTTON_ENABLED, true) {
1846         
1847             @Override
1848             public void applyDataBinding() {
1849                 if (model != null) {
1850                     model.addPropertyChangeListener("removeSpeciesEnabled", this);
1851                 }
1852             }
1853         
1854             @Override
1855             public void processDataBinding() {
1856                 if (model != null) {
1857                     removeSpeciesProtocolButton.setEnabled(model.isRemoveSpeciesEnabled());
1858                 }
1859             }
1860         
1861             @Override
1862             public void removeDataBinding() {
1863                 if (model != null) {
1864                     model.removePropertyChangeListener("removeSpeciesEnabled", this);
1865                 }
1866             }
1867         });
1868         registerDataBinding(new DefaultJAXXBinding(this, BINDING_REMOVE_BENTHOS_PROTOCOL_BUTTON_ENABLED, true) {
1869         
1870             @Override
1871             public void applyDataBinding() {
1872                 if (model != null) {
1873                     model.addPropertyChangeListener("removeBenthosEnabled", this);
1874                 }
1875             }
1876         
1877             @Override
1878             public void processDataBinding() {
1879                 if (model != null) {
1880                     removeBenthosProtocolButton.setEnabled(model.isRemoveBenthosEnabled());
1881                 }
1882             }
1883         
1884             @Override
1885             public void removeDataBinding() {
1886                 if (model != null) {
1887                     model.removePropertyChangeListener("removeBenthosEnabled", this);
1888                 }
1889             }
1890         });
1891         registerDataBinding(new DefaultJAXXBinding(this, BINDING_REMOVE_CARACTERISTIC_MAPPING_BUTTON_ENABLED, true) {
1892         
1893             @Override
1894             public void applyDataBinding() {
1895                 if (model != null) {
1896                     model.addPropertyChangeListener("removeCaracteristicMappingEnabled", this);
1897                 }
1898             }
1899         
1900             @Override
1901             public void processDataBinding() {
1902                 if (model != null) {
1903                     removeCaracteristicMappingButton.setEnabled(model.isRemoveCaracteristicMappingEnabled());
1904                 }
1905             }
1906         
1907             @Override
1908             public void removeDataBinding() {
1909                 if (model != null) {
1910                     model.removePropertyChangeListener("removeCaracteristicMappingEnabled", this);
1911                 }
1912             }
1913         });
1914         registerDataBinding(new DefaultJAXXBinding(this, BINDING_MOVE_UP_CARACTERISTIC_MAPPING_BUTTON_ENABLED, true) {
1915         
1916             @Override
1917             public void applyDataBinding() {
1918                 if (model != null) {
1919                     model.addPropertyChangeListener("moveUpCaracteristicMappingEnabled", this);
1920                 }
1921             }
1922         
1923             @Override
1924             public void processDataBinding() {
1925                 if (model != null) {
1926                     moveUpCaracteristicMappingButton.setEnabled(model.isMoveUpCaracteristicMappingEnabled());
1927                 }
1928             }
1929         
1930             @Override
1931             public void removeDataBinding() {
1932                 if (model != null) {
1933                     model.removePropertyChangeListener("moveUpCaracteristicMappingEnabled", this);
1934                 }
1935             }
1936         });
1937         registerDataBinding(new DefaultJAXXBinding(this, BINDING_MOVE_DOWN_CARACTERISTIC_MAPPING_BUTTON_ENABLED, true) {
1938         
1939             @Override
1940             public void applyDataBinding() {
1941                 if (model != null) {
1942                     model.addPropertyChangeListener("moveDownCaracteristicMappingEnabled", this);
1943                 }
1944             }
1945         
1946             @Override
1947             public void processDataBinding() {
1948                 if (model != null) {
1949                     moveDownCaracteristicMappingButton.setEnabled(model.isMoveDownCaracteristicMappingEnabled());
1950                 }
1951             }
1952         
1953             @Override
1954             public void removeDataBinding() {
1955                 if (model != null) {
1956                     model.removePropertyChangeListener("moveDownCaracteristicMappingEnabled", this);
1957                 }
1958             }
1959         });
1960         registerDataBinding(new DefaultJAXXBinding(this, BINDING_NAME_FIELD_TEXT, true) {
1961         
1962             @Override
1963             public void applyDataBinding() {
1964                 if (model != null) {
1965                     model.addPropertyChangeListener("name", this);
1966                 }
1967             }
1968         
1969             @Override
1970             public void processDataBinding() {
1971                 if (model != null) {
1972                     SwingUtil.setText(nameField, model.getName());
1973                 }
1974             }
1975         
1976             @Override
1977             public void removeDataBinding() {
1978                 if (model != null) {
1979                     model.removePropertyChangeListener("name", this);
1980                 }
1981             }
1982         });
1983         registerDataBinding(new DefaultJAXXBinding(this, BINDING_COMMENT_FIELD_TEXT, true) {
1984         
1985             @Override
1986             public void applyDataBinding() {
1987                 if (model != null) {
1988                     model.addPropertyChangeListener("comment", this);
1989                 }
1990             }
1991         
1992             @Override
1993             public void processDataBinding() {
1994                 if (model != null) {
1995                     SwingUtil.setText(commentField, getStringValue(model.getComment()));
1996                 }
1997             }
1998         
1999             @Override
2000             public void removeDataBinding() {
2001                 if (model != null) {
2002                     model.removePropertyChangeListener("comment", this);
2003                 }
2004             }
2005         });
2006         registerDataBinding(new DefaultJAXXBinding(this, BINDING_CARACTERISTIC_MAPPING_COMBO_BOX_ENABLED, true) {
2007         
2008             @Override
2009             public void applyDataBinding() {
2010                 if (caracteristicMappingComboBox != null) {
2011                     caracteristicMappingComboBox.addPropertyChangeListener("empty", this);
2012                 }
2013             }
2014         
2015             @Override
2016             public void processDataBinding() {
2017                 if (caracteristicMappingComboBox != null) {
2018                     caracteristicMappingComboBox.setEnabled(!caracteristicMappingComboBox.isEmpty());
2019                 }
2020             }
2021         
2022             @Override
2023             public void removeDataBinding() {
2024                 if (caracteristicMappingComboBox != null) {
2025                     caracteristicMappingComboBox.removePropertyChangeListener("empty", this);
2026                 }
2027             }
2028         });
2029         registerDataBinding(new DefaultJAXXBinding(this, BINDING_ADD_CARACTERISTIC_MAPPING_BUTTON_ENABLED, true) {
2030         
2031             @Override
2032             public void applyDataBinding() {
2033                 if (caracteristicMappingComboBox != null) {
2034                     caracteristicMappingComboBox.addPropertyChangeListener("selectedItem", this);
2035                 }
2036             }
2037         
2038             @Override
2039             public void processDataBinding() {
2040                 if (caracteristicMappingComboBox != null) {
2041                     addCaracteristicMappingButton.setEnabled( caracteristicMappingComboBox.getSelectedItem() != null );
2042                 }
2043             }
2044         
2045             @Override
2046             public void removeDataBinding() {
2047                 if (caracteristicMappingComboBox != null) {
2048                     caracteristicMappingComboBox.removePropertyChangeListener("selectedItem", this);
2049                 }
2050             }
2051         });
2052         registerDataBinding(new DefaultJAXXBinding(this, BINDING_SPECIES_COMBO_BOX_ENABLED, true) {
2053         
2054             @Override
2055             public void applyDataBinding() {
2056                 if (speciesComboBox != null) {
2057                     speciesComboBox.addPropertyChangeListener("empty", this);
2058                 }
2059             }
2060         
2061             @Override
2062             public void processDataBinding() {
2063                 if (speciesComboBox != null) {
2064                     speciesComboBox.setEnabled(!speciesComboBox.isEmpty());
2065                 }
2066             }
2067         
2068             @Override
2069             public void removeDataBinding() {
2070                 if (speciesComboBox != null) {
2071                     speciesComboBox.removePropertyChangeListener("empty", this);
2072                 }
2073             }
2074         });
2075         registerDataBinding(new DefaultJAXXBinding(this, BINDING_ADD_SPECIES_PROTOCOL_BUTTON_ENABLED, true) {
2076         
2077             @Override
2078             public void applyDataBinding() {
2079                 if (speciesComboBox != null) {
2080                     speciesComboBox.addPropertyChangeListener("selectedItem", this);
2081                 }
2082             }
2083         
2084             @Override
2085             public void processDataBinding() {
2086                 if (speciesComboBox != null) {
2087                     addSpeciesProtocolButton.setEnabled(handler.isSpeciesSelected(speciesComboBox.getSelectedItem()));
2088                 }
2089             }
2090         
2091             @Override
2092             public void removeDataBinding() {
2093                 if (speciesComboBox != null) {
2094                     speciesComboBox.removePropertyChangeListener("selectedItem", this);
2095                 }
2096             }
2097         });
2098         registerDataBinding(new DefaultJAXXBinding(this, BINDING_BENTHOS_COMBO_BOX_ENABLED, true) {
2099         
2100             @Override
2101             public void applyDataBinding() {
2102                 if (benthosComboBox != null) {
2103                     benthosComboBox.addPropertyChangeListener("empty", this);
2104                 }
2105             }
2106         
2107             @Override
2108             public void processDataBinding() {
2109                 if (benthosComboBox != null) {
2110                     benthosComboBox.setEnabled(!benthosComboBox.isEmpty());
2111                 }
2112             }
2113         
2114             @Override
2115             public void removeDataBinding() {
2116                 if (benthosComboBox != null) {
2117                     benthosComboBox.removePropertyChangeListener("empty", this);
2118                 }
2119             }
2120         });
2121         registerDataBinding(new DefaultJAXXBinding(this, BINDING_ADD_BENTHOS_PROTOCOL_BUTTON_ENABLED, true) {
2122         
2123             @Override
2124             public void applyDataBinding() {
2125                 if (benthosComboBox != null) {
2126                     benthosComboBox.addPropertyChangeListener("selectedItem", this);
2127                 }
2128             }
2129         
2130             @Override
2131             public void processDataBinding() {
2132                 if (benthosComboBox != null) {
2133                     addBenthosProtocolButton.setEnabled(handler.isSpeciesSelected(benthosComboBox.getSelectedItem()));
2134                 }
2135             }
2136         
2137             @Override
2138             public void removeDataBinding() {
2139                 if (benthosComboBox != null) {
2140                     benthosComboBox.removePropertyChangeListener("selectedItem", this);
2141                 }
2142             }
2143         });
2144         registerDataBinding(new DefaultJAXXBinding(this, BINDING_USE_CALCIFIED_PIECE_SAMPLING_SELECTED, true) {
2145         
2146             @Override
2147             public void applyDataBinding() {
2148                 if (model != null) {
2149                     model.addPropertyChangeListener("useCalcifiedPieceSampling", this);
2150                 }
2151             }
2152         
2153             @Override
2154             public void processDataBinding() {
2155                 if (model != null) {
2156                     useCalcifiedPieceSampling.setSelected(model.isUseCalcifiedPieceSampling());
2157                 }
2158             }
2159         
2160             @Override
2161             public void removeDataBinding() {
2162                 if (model != null) {
2163                     model.removePropertyChangeListener("useCalcifiedPieceSampling", this);
2164                 }
2165             }
2166         });
2167         registerDataBinding(new DefaultJAXXBinding(this, BINDING_CPS_TABBED_PANE_VISIBLE, true) {
2168         
2169             @Override
2170             public void applyDataBinding() {
2171                 if (model != null) {
2172                     model.addPropertyChangeListener("useCalcifiedPieceSampling", this);
2173                 }
2174             }
2175         
2176             @Override
2177             public void processDataBinding() {
2178                 if (model != null) {
2179                     cpsTabbedPane.setVisible(model.isUseCalcifiedPieceSampling());
2180                 }
2181             }
2182         
2183             @Override
2184             public void removeDataBinding() {
2185                 if (model != null) {
2186                     model.removePropertyChangeListener("useCalcifiedPieceSampling", this);
2187                 }
2188             }
2189         });
2190         registerDataBinding(new DefaultJAXXBinding(this, BINDING_SAVE_WARNING_CONTAINER_VISIBLE, true, true) {
2191         
2192             @Override
2193             public void applyDataBinding() {
2194                 if (model != null) {
2195                     model.addPropertyChangeListener("imported", this);
2196                 }
2197                 if (model != null) {
2198                     model.addPropertyChangeListener("cloned", this);
2199                 }
2200                 if (model != null) {
2201                     model.addPropertyChangeListener("cleaned", this);
2202                 }
2203             }
2204         
2205             @Override
2206             public void processDataBinding() {
2207                 if (model != null) {
2208                     saveWarningContainer.setVisible(model.isImported() || model.isCloned() || model.isCleaned());
2209                 }
2210             }
2211         
2212             @Override
2213             public void removeDataBinding() {
2214                 if (model != null) {
2215                     model.removePropertyChangeListener("imported", this);
2216                 }
2217                 if (model != null) {
2218                     model.removePropertyChangeListener("cloned", this);
2219                 }
2220                 if (model != null) {
2221                     model.removePropertyChangeListener("cleaned", this);
2222                 }
2223             }
2224         });
2225         registerDataBinding(new DefaultJAXXBinding(this, BINDING_SAVE_BUTTON_ENABLED, true, true) {
2226         
2227             @Override
2228             public void applyDataBinding() {
2229                 if (model != null) {
2230                     model.addPropertyChangeListener("modify", this);
2231                 }
2232                 if (model != null) {
2233                     model.addPropertyChangeListener("valid", this);
2234                 }
2235             }
2236         
2237             @Override
2238             public void processDataBinding() {
2239                 if (model != null) {
2240                     saveButton.setEnabled(model.isModify() && model.isValid());
2241                 }
2242             }
2243         
2244             @Override
2245             public void removeDataBinding() {
2246                 if (model != null) {
2247                     model.removePropertyChangeListener("modify", this);
2248                 }
2249                 if (model != null) {
2250                     model.removePropertyChangeListener("valid", this);
2251                 }
2252             }
2253         });
2254     }
2255 
2256 }