1 package fr.ifremer.reefdb.ui.swing.content.observation.survey;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 import fr.ifremer.quadrige3.ui.swing.ApplicationUI;
28 import fr.ifremer.quadrige3.ui.swing.ApplicationUIUtil;
29 import fr.ifremer.quadrige3.ui.swing.component.bean.ExtendedBeanDoubleList;
30 import fr.ifremer.quadrige3.ui.swing.component.bean.ExtendedComboBox;
31 import fr.ifremer.quadrige3.ui.swing.component.coordinate.CoordinateEditor;
32 import fr.ifremer.quadrige3.ui.swing.component.coordinate.CoordinateEditor.CoordinateType;
33 import fr.ifremer.quadrige3.ui.swing.component.date.JDatePicker;
34 import fr.ifremer.quadrige3.ui.swing.component.date.JLocalDatePicker;
35 import fr.ifremer.quadrige3.ui.swing.component.number.NumberEditor;
36 import fr.ifremer.quadrige3.ui.swing.component.time.LocalTimeEditor;
37 import fr.ifremer.quadrige3.ui.swing.plaf.WaitBlockingLayerUI;
38 import fr.ifremer.reefdb.dto.configuration.programStrategy.ProgramDTO;
39 import fr.ifremer.reefdb.dto.data.survey.CampaignDTO;
40 import fr.ifremer.reefdb.dto.referential.DepthDTO;
41 import fr.ifremer.reefdb.dto.referential.LocationDTO;
42 import fr.ifremer.reefdb.dto.referential.PersonDTO;
43 import fr.ifremer.reefdb.dto.referential.PositioningSystemDTO;
44 import fr.ifremer.reefdb.ui.swing.ReefDbHelpBroker;
45 import fr.ifremer.reefdb.ui.swing.ReefDbUIContext;
46 import fr.ifremer.reefdb.ui.swing.util.ReefDbUI;
47 import java.awt.BorderLayout;
48 import java.awt.Component;
49 import java.awt.Container;
50 import java.awt.GridBagConstraints;
51 import java.awt.GridLayout;
52 import java.awt.Insets;
53 import java.awt.LayoutManager;
54 import java.awt.event.ActionEvent;
55 import java.awt.event.ActionListener;
56 import java.awt.event.FocusEvent;
57 import java.awt.event.FocusListener;
58 import java.awt.event.KeyEvent;
59 import java.awt.event.KeyListener;
60 import java.util.ArrayList;
61 import java.util.HashMap;
62 import java.util.List;
63 import java.util.Map;
64 import java.util.TreeMap;
65 import javax.swing.BorderFactory;
66 import javax.swing.BoxLayout;
67 import javax.swing.JLabel;
68 import javax.swing.JList;
69 import javax.swing.JPanel;
70 import javax.swing.JScrollPane;
71 import javax.swing.JTextArea;
72 import javax.swing.JTextField;
73 import jaxx.runtime.JAXXBinding;
74 import jaxx.runtime.JAXXContext;
75 import jaxx.runtime.JAXXObject;
76 import jaxx.runtime.JAXXObjectDescriptor;
77 import jaxx.runtime.JAXXUtil;
78 import jaxx.runtime.JAXXValidator;
79 import jaxx.runtime.SwingUtil;
80 import jaxx.runtime.binding.DefaultJAXXBinding;
81 import jaxx.runtime.binding.SimpleJAXXObjectBinding;
82 import jaxx.runtime.context.DefaultJAXXContext;
83 import jaxx.runtime.swing.CardLayout2Ext;
84 import jaxx.runtime.swing.Table;
85 import jaxx.runtime.swing.help.JAXXHelpUI;
86 import jaxx.runtime.validator.swing.SwingValidator;
87 import jaxx.runtime.validator.swing.SwingValidatorUtil;
88 import jaxx.runtime.validator.swing.meta.Validator;
89 import jaxx.runtime.validator.swing.meta.ValidatorField;
90 import jaxx.runtime.validator.swing.ui.ImageValidationUI;
91 import org.apache.commons.logging.Log;
92 import org.apache.commons.logging.LogFactory;
93 import static org.nuiton.i18n.I18n.t;
94
95 public class SurveyDetailsTabUI extends JPanel implements JAXXHelpUI<ReefDbHelpBroker>, ReefDbUI<SurveyDetailsTabUIModel, SurveyDetailsTabUIHandler>, JAXXObject, JAXXValidator {
96
97
98
99
100
101 public static final String BINDING_CAMPAIGN_COMBO_ENABLED = "campaignCombo.enabled";
102 public static final String BINDING_CAMPAIGN_COMBO_SELECTED_ITEM = "campaignCombo.selectedItem";
103 public static final String BINDING_COMMENTAIRE_GENERAL_ENABLED = "commentaireGeneral.enabled";
104 public static final String BINDING_COMMENTAIRE_GENERAL_TEXT = "commentaireGeneral.text";
105 public static final String BINDING_COMMENTAIRE_POSITIONNEMENT_ENABLED = "commentairePositionnement.enabled";
106 public static final String BINDING_COMMENTAIRE_POSITIONNEMENT_TEXT = "commentairePositionnement.text";
107 public static final String BINDING_COMMENTAIRE_VALIDATION_TEXT = "commentaireValidation.text";
108 public static final String BINDING_DATE_CONTROLE_EDITOR_DATE = "dateControleEditor.date";
109 public static final String BINDING_DATE_EDITOR_ENABLED = "dateEditor.enabled";
110 public static final String BINDING_DATE_EDITOR_LOCAL_DATE = "dateEditor.localDate";
111 public static final String BINDING_DATE_MODIF_EDITOR_DATE = "dateModifEditor.date";
112 public static final String BINDING_DATE_VALIDATION_EDITOR_DATE = "dateValidationEditor.date";
113 public static final String BINDING_LOCATION_COMBO_ENABLED = "locationCombo.enabled";
114 public static final String BINDING_LOCATION_COMBO_SELECTED_ITEM = "locationCombo.selectedItem";
115 public static final String BINDING_LOCATION_MAX_LATITUDE_EDITOR_NUMBER_VALUE = "locationMaxLatitudeEditor.numberValue";
116 public static final String BINDING_LOCATION_MAX_LONGITUDE_EDITOR_NUMBER_VALUE = "locationMaxLongitudeEditor.numberValue";
117 public static final String BINDING_LOCATION_MIN_LATITUDE_EDITOR_NUMBER_VALUE = "locationMinLatitudeEditor.numberValue";
118 public static final String BINDING_LOCATION_MIN_LONGITUDE_EDITOR_NUMBER_VALUE = "locationMinLongitudeEditor.numberValue";
119 public static final String BINDING_MNEMONIQUE_EDITOR_ENABLED = "mnemoniqueEditor.enabled";
120 public static final String BINDING_MNEMONIQUE_EDITOR_TEXT = "mnemoniqueEditor.text";
121 public static final String BINDING_OBSERVERS_DOUBLE_LIST_ENABLED = "observersDoubleList.enabled";
122 public static final String BINDING_PROFONDEUR_EDITOR_ENABLED = "profondeurEditor.enabled";
123 public static final String BINDING_PROFONDEUR_EDITOR_SELECTED_ITEM = "profondeurEditor.selectedItem";
124 public static final String BINDING_PROFONDEUR_PRECISE_EDITOR_ENABLED = "profondeurPreciseEditor.enabled";
125 public static final String BINDING_PROFONDEUR_PRECISE_EDITOR_NUMBER_PATTERN = "profondeurPreciseEditor.numberPattern";
126 public static final String BINDING_PROFONDEUR_PRECISE_EDITOR_NUMBER_VALUE = "profondeurPreciseEditor.numberValue";
127 public static final String BINDING_PROGRAM_COMBO_ENABLED = "programCombo.enabled";
128 public static final String BINDING_PROGRAM_COMBO_SELECTED_ITEM = "programCombo.selectedItem";
129 public static final String BINDING_SELECTION_POSITIONNEMENT_COMBO_ENABLED = "selectionPositionnementCombo.enabled";
130 public static final String BINDING_SELECTION_POSITIONNEMENT_COMBO_SELECTED_ITEM = "selectionPositionnementCombo.selectedItem";
131 public static final String BINDING_SURVEY_DETAILS_BLOCK_LAYER_BLOCK = "surveyDetailsBlockLayer.block";
132 public static final String BINDING_SURVEY_LATITUDE_EDITOR_ENABLED = "surveyLatitudeEditor.enabled";
133 public static final String BINDING_SURVEY_LATITUDE_EDITOR_NUMBER_VALUE = "surveyLatitudeEditor.numberValue";
134 public static final String BINDING_SURVEY_LONGITUDE_EDITOR_ENABLED = "surveyLongitudeEditor.enabled";
135 public static final String BINDING_SURVEY_LONGITUDE_EDITOR_NUMBER_VALUE = "surveyLongitudeEditor.numberValue";
136 public static final String BINDING_TIME_EDITOR_ENABLED = "timeEditor.enabled";
137 public static final String BINDING_TIME_EDITOR_TIME_IN_SECOND = "timeEditor.timeInSecond";
138
139
140
141
142
143 private static final String $jaxxObjectDescriptor = "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";
144 private static final Log log = LogFactory.getLog(SurveyDetailsTabUI.class);
145 private static final long serialVersionUID = 1L;
146
147
148
149
150
151 protected List<Object> $activeBindings = new ArrayList<Object>();
152 protected Map<String, Object> $bindingSources = new HashMap<String, Object>();
153 protected final Map<String, JAXXBinding> $bindings = new TreeMap<String, JAXXBinding>();
154 protected Map<String, Object> $objectMap = new HashMap<String, Object>();
155 protected Map<?, ?> $previousValues = new HashMap<Object, Object>();
156 private boolean allComponentsCreated;
157 protected final JAXXContext delegateContext = new DefaultJAXXContext();
158
159
160
161
162
163 protected JPanel bottomPanel;
164 protected ReefDbHelpBroker broker;
165 @ValidatorField( validatorId = "validator", propertyName = "campaign", editorName = "campaignCombo")
166 protected ExtendedComboBox<CampaignDTO> campaignCombo;
167 protected JLabel campaignLabel;
168 @ValidatorField( validatorId = "validator", propertyName = "comment", editorName = "commentScrollPane")
169 protected JScrollPane commentScrollPane;
170 protected JTextArea commentaireGeneral;
171 protected JLabel commentaireGeneralLabel;
172 protected JTextArea commentairePositionnement;
173 protected JLabel commentairePositionnementLabel;
174 @ValidatorField( validatorId = "validator", propertyName = "validationComment", editorName = "commentaireValidation")
175 protected JTextArea commentaireValidation;
176 protected JLabel commentaireValidationLabel;
177 protected Table cycleDeVie;
178 @ValidatorField( validatorId = "validator", propertyName = "controlDate", editorName = "dateControleEditor")
179 protected JDatePicker dateControleEditor;
180 protected JLabel dateControleObservationLabel;
181 @ValidatorField( validatorId = "validator", propertyName = "date", editorName = "dateEditor")
182 protected JLocalDatePicker dateEditor;
183 @ValidatorField( validatorId = "validator", propertyName = "updateDate", editorName = "dateModifEditor")
184 protected JDatePicker dateModifEditor;
185 protected JLabel dateModifObservationLabel;
186 @ValidatorField( validatorId = "validator", propertyName = "validationDate", editorName = "dateValidationEditor")
187 protected JDatePicker dateValidationEditor;
188 protected JLabel dateValidationObservationLabel;
189 protected JPanel detailsPanel;
190 protected final SurveyDetailsTabUIHandler handler = createHandler();
191 protected JTextField inputSaisisseur;
192 protected JLabel latitudeLabel;
193 protected JLabel latitudeMaxLabel;
194 protected JLabel latitudeMinLabel;
195 protected JLabel libellePositionnementLabel;
196 @ValidatorField( validatorId = "validator", propertyName = "location", editorName = "locationCombo")
197 protected ExtendedComboBox<LocationDTO> locationCombo;
198 protected Table locationCoordinatePanel;
199 protected JLabel locationLabel;
200 @ValidatorField( validatorId = "validator", propertyName = "locationMaxLatitude", editorName = "locationMaxLatitudeEditor")
201 protected CoordinateEditor locationMaxLatitudeEditor;
202 @ValidatorField( validatorId = "validator", propertyName = "locationMaxLongitude", editorName = "locationMaxLongitudeEditor")
203 protected CoordinateEditor locationMaxLongitudeEditor;
204 @ValidatorField( validatorId = "validator", propertyName = "locationMinLatitude", editorName = "locationMinLatitudeEditor")
205 protected CoordinateEditor locationMinLatitudeEditor;
206 @ValidatorField( validatorId = "validator", propertyName = "locationMinLongitude", editorName = "locationMinLongitudeEditor")
207 protected CoordinateEditor locationMinLongitudeEditor;
208 protected JLabel longitudeLabel;
209 protected JLabel longitudeMaxLabel;
210 protected JLabel longitudeMinLabel;
211 @ValidatorField( validatorId = "validator", propertyName = "name", editorName = "mnemoniqueEditor")
212 protected JTextField mnemoniqueEditor;
213 protected JLabel mnemoniqueLabel;
214 protected SurveyDetailsTabUIModel model;
215 protected ExtendedBeanDoubleList<PersonDTO> observersDoubleList;
216 protected JList<PersonDTO> observersList;
217 protected JPanel observersPanel;
218 protected CardLayout2Ext observersPanelLayout;
219 protected Table positionnementTable;
220 protected JLabel precisionPositionnementLabel;
221 protected ExtendedComboBox<DepthDTO> profondeurEditor;
222 @ValidatorField( validatorId = "validator", propertyName = "preciseDepth", editorName = "profondeurPreciseEditor")
223 protected NumberEditor profondeurPreciseEditor;
224 protected JLabel profondeurPreciseLabel;
225 @ValidatorField( validatorId = "validator", propertyName = "program", editorName = "programCombo")
226 protected ExtendedComboBox<ProgramDTO> programCombo;
227 protected JLabel programLabel;
228 protected JLabel saisisseurLabel;
229 protected JLabel selectionDateLabel;
230 @ValidatorField( validatorId = "validator", propertyName = "positioning", editorName = "selectionPositionnementCombo")
231 protected ExtendedComboBox<PositioningSystemDTO> selectionPositionnementCombo;
232 @ValidatorField( validatorId = "validator", propertyName = "positioningPrecision", editorName = "selectionPrecisionLabel")
233 protected JLabel selectionPrecisionLabel;
234 protected JLabel selectionProfondeurLabel;
235 protected Table surveyCoordinatePanel;
236 protected WaitBlockingLayerUI surveyDetailsBlockLayer;
237 protected SurveyDetailsTabUI surveyDetailsTabUI = this;
238 @ValidatorField( validatorId = "validator", propertyName = "latitude", editorName = "surveyLatitudeEditor")
239 protected CoordinateEditor surveyLatitudeEditor;
240 protected JLabel surveyLatitudeLabel;
241 @ValidatorField( validatorId = "validator", propertyName = "longitude", editorName = "surveyLongitudeEditor")
242 protected CoordinateEditor surveyLongitudeEditor;
243 protected JLabel surveyLongitudeLabel;
244 @ValidatorField( validatorId = "validator", propertyName = "time", editorName = "timeEditor")
245 protected LocalTimeEditor timeEditor;
246 @Validator( validatorId = "validator")
247 protected SwingValidator<SurveyDetailsTabUIModel> validator;
248 protected List<String> validatorIds = new ArrayList<String>();
249
250
251
252
253
254 private JPanel $JPanel0;
255 private JPanel $JPanel1;
256 private JScrollPane $JScrollPane0;
257 private JScrollPane $JScrollPane1;
258 private JScrollPane $JScrollPane2;
259 private Table $Table0;
260
261
262
263
264
265 public SurveyDetailsTabUI(ApplicationUI parentUI) {
266 ApplicationUIUtil.setParentUI(this, parentUI);
267 $initialize();
268 }
269
270 public SurveyDetailsTabUI(LayoutManager param0, boolean param1) {
271 super(param0 ,param1);
272 $initialize();
273 }
274
275 public SurveyDetailsTabUI(JAXXContext parentContext, LayoutManager param1, boolean param2) {
276 super(param1 ,param2);
277 JAXXUtil.initContext(this, parentContext);
278 $initialize();
279 }
280
281 public SurveyDetailsTabUI(boolean param0) {
282 super(param0);
283 $initialize();
284 }
285
286 public SurveyDetailsTabUI(JAXXContext parentContext, boolean param1) {
287 super(param1);
288 JAXXUtil.initContext(this, parentContext);
289 $initialize();
290 }
291
292 public SurveyDetailsTabUI() {
293 $initialize();
294 }
295
296 public SurveyDetailsTabUI(JAXXContext parentContext) {
297 JAXXUtil.initContext(this, parentContext);
298 $initialize();
299 }
300
301 public SurveyDetailsTabUI(LayoutManager param0) {
302 super(param0);
303 $initialize();
304 }
305
306 public SurveyDetailsTabUI(JAXXContext parentContext, LayoutManager param1) {
307 super(param1);
308 JAXXUtil.initContext(this, parentContext);
309 $initialize();
310 }
311
312
313
314
315
316 public static JAXXObjectDescriptor $getJAXXObjectDescriptor() {
317 return JAXXUtil.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor);
318 }
319
320
321
322
323
324 @Override
325 public void applyDataBinding(String $binding) {
326 if (allComponentsCreated && $bindings.containsKey($binding)) {
327 getDataBinding($binding).applyDataBinding();
328 }
329 processDataBinding($binding);
330 }
331
332 @Override
333 public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
334 super.firePropertyChange(propertyName, oldValue, newValue);
335 }
336
337 @Override
338 public Map<String, Object> get$objectMap() {
339 return $objectMap;
340 }
341
342 @Override
343 public JAXXBinding getDataBinding(String bindingId) {
344 return $bindings.get(bindingId);
345 }
346
347 @Override
348 public JAXXBinding[] getDataBindings() {
349 return $bindings.values().toArray(new JAXXBinding[$bindings.size()]);
350 }
351
352 @Override
353 public Object getObjectById(String id) {
354 return $objectMap.get(id);
355 }
356
357 @Override
358 public void processDataBinding(String $binding, boolean $force) {
359 if (!$force && $activeBindings.contains($binding)) {
360 return;
361 }
362 $activeBindings.add($binding);
363 try {
364 if (allComponentsCreated && $bindings.containsKey($binding)) {
365 getDataBinding($binding).processDataBinding();
366 }
367 } finally {
368 $activeBindings.remove($binding);
369 }
370 }
371
372 @Override
373 public void processDataBinding(String $binding) {
374 processDataBinding($binding, false);
375 }
376
377 @Override
378 public void registerDataBinding(JAXXBinding binding) {
379 $bindings.put(binding.getId(), binding);
380 }
381
382 @Override
383 public void removeDataBinding(String $binding) {
384 if (allComponentsCreated && $bindings.containsKey($binding)) {
385 getDataBinding($binding).removeDataBinding();
386 }
387 }
388
389
390
391
392
393 @Override
394 public <T> T getContextValue(Class<T> clazz) {
395 return delegateContext.getContextValue(clazz, null);
396 }
397
398 @Override
399 public <T> T getContextValue(Class<T> clazz, String name) {
400 return delegateContext.getContextValue(clazz, name);
401 }
402
403 @Override
404 public JAXXContext getDelegateContext() {
405 return delegateContext;
406 }
407
408 @Override
409 public <O extends Container> O getParentContainer(Class<O> clazz) {
410 return SwingUtil.getParentContainer(this, clazz);
411 }
412
413 @Override
414 public <O extends Container> O getParentContainer(Object source, Class<O> clazz) {
415 return SwingUtil.getParentContainer(source, clazz);
416 }
417
418 @Override
419 public <T> void removeContextValue(Class<T> clazz) {
420 delegateContext.removeContextValue(clazz, null);
421 }
422
423 @Override
424 public <T> void removeContextValue(Class<T> clazz, String name) {
425 delegateContext.removeContextValue(clazz, name);
426 }
427
428 @Override
429 public <T> void setContextValue(T o) {
430 delegateContext.setContextValue(o, null);
431 }
432
433 @Override
434 public <T> void setContextValue(T o, String name) {
435 delegateContext.setContextValue(o, name);
436 }
437
438
439
440
441
442 @Override
443 public SwingValidator<?> getValidator(String validatorId) {
444 return (SwingValidator<?>) (validatorIds.contains(validatorId) ? getObjectById(validatorId) : null);
445 }
446
447 @Override
448 public List<String> getValidatorIds() {
449 return validatorIds;
450 }
451
452 @Override
453 public void registerValidatorFields() {
454 SwingValidatorUtil.detectValidatorFields(this);
455 }
456
457
458
459
460
461 public void doActionPerformed__on__dateEditor(ActionEvent event) {
462 if (log.isDebugEnabled()) {
463 log.debug(event);
464 }
465 handler.setLocalDate(event, "date");
466 }
467
468 public void doActionPerformed__on__timeEditor(ActionEvent event) {
469 if (log.isDebugEnabled()) {
470 log.debug(event);
471 }
472 handler.setTimeInSecond(event, "time");
473 }
474
475 public void doFocusGained__on__$JScrollPane1(FocusEvent event) {
476 if (log.isDebugEnabled()) {
477 log.debug(event);
478 }
479 commentairePositionnement.requestFocus();
480 }
481
482 public void doFocusGained__on__commentScrollPane(FocusEvent event) {
483 if (log.isDebugEnabled()) {
484 log.debug(event);
485 }
486 commentaireGeneral.requestFocus();
487 }
488
489 public void doKeyReleased__on__commentaireGeneral(KeyEvent event) {
490 if (log.isDebugEnabled()) {
491 log.debug(event);
492 }
493 handler.setText(event, "comment");
494 }
495
496 public void doKeyReleased__on__commentairePositionnement(KeyEvent event) {
497 if (log.isDebugEnabled()) {
498 log.debug(event);
499 }
500 handler.setText(event, "positioningComment");
501 }
502
503 public void doKeyReleased__on__mnemoniqueEditor(KeyEvent event) {
504 if (log.isDebugEnabled()) {
505 log.debug(event);
506 }
507 handler.setText(event, "name");
508 }
509
510
511
512
513
514 public JPanel getBottomPanel() {
515 return bottomPanel;
516 }
517
518 public ReefDbHelpBroker getBroker() {
519 return broker;
520 }
521
522 public ExtendedComboBox<CampaignDTO> getCampaignCombo() {
523 return campaignCombo;
524 }
525
526 public JLabel getCampaignLabel() {
527 return campaignLabel;
528 }
529
530 public JScrollPane getCommentScrollPane() {
531 return commentScrollPane;
532 }
533
534 public JTextArea getCommentaireGeneral() {
535 return commentaireGeneral;
536 }
537
538 public JLabel getCommentaireGeneralLabel() {
539 return commentaireGeneralLabel;
540 }
541
542 public JTextArea getCommentairePositionnement() {
543 return commentairePositionnement;
544 }
545
546 public JLabel getCommentairePositionnementLabel() {
547 return commentairePositionnementLabel;
548 }
549
550 public JTextArea getCommentaireValidation() {
551 return commentaireValidation;
552 }
553
554 public JLabel getCommentaireValidationLabel() {
555 return commentaireValidationLabel;
556 }
557
558 public Table getCycleDeVie() {
559 return cycleDeVie;
560 }
561
562 public JDatePicker getDateControleEditor() {
563 return dateControleEditor;
564 }
565
566 public JLabel getDateControleObservationLabel() {
567 return dateControleObservationLabel;
568 }
569
570 public JLocalDatePicker getDateEditor() {
571 return dateEditor;
572 }
573
574 public JDatePicker getDateModifEditor() {
575 return dateModifEditor;
576 }
577
578 public JLabel getDateModifObservationLabel() {
579 return dateModifObservationLabel;
580 }
581
582 public JDatePicker getDateValidationEditor() {
583 return dateValidationEditor;
584 }
585
586 public JLabel getDateValidationObservationLabel() {
587 return dateValidationObservationLabel;
588 }
589
590 public JPanel getDetailsPanel() {
591 return detailsPanel;
592 }
593
594 public SurveyDetailsTabUIHandler getHandler() {
595 return handler;
596 }
597
598 public JTextField getInputSaisisseur() {
599 return inputSaisisseur;
600 }
601
602 public JLabel getLatitudeLabel() {
603 return latitudeLabel;
604 }
605
606 public JLabel getLatitudeMaxLabel() {
607 return latitudeMaxLabel;
608 }
609
610 public JLabel getLatitudeMinLabel() {
611 return latitudeMinLabel;
612 }
613
614 public JLabel getLibellePositionnementLabel() {
615 return libellePositionnementLabel;
616 }
617
618 public ExtendedComboBox<LocationDTO> getLocationCombo() {
619 return locationCombo;
620 }
621
622 public Table getLocationCoordinatePanel() {
623 return locationCoordinatePanel;
624 }
625
626 public JLabel getLocationLabel() {
627 return locationLabel;
628 }
629
630 public CoordinateEditor getLocationMaxLatitudeEditor() {
631 return locationMaxLatitudeEditor;
632 }
633
634 public CoordinateEditor getLocationMaxLongitudeEditor() {
635 return locationMaxLongitudeEditor;
636 }
637
638 public CoordinateEditor getLocationMinLatitudeEditor() {
639 return locationMinLatitudeEditor;
640 }
641
642 public CoordinateEditor getLocationMinLongitudeEditor() {
643 return locationMinLongitudeEditor;
644 }
645
646 public JLabel getLongitudeLabel() {
647 return longitudeLabel;
648 }
649
650 public JLabel getLongitudeMaxLabel() {
651 return longitudeMaxLabel;
652 }
653
654 public JLabel getLongitudeMinLabel() {
655 return longitudeMinLabel;
656 }
657
658 public JTextField getMnemoniqueEditor() {
659 return mnemoniqueEditor;
660 }
661
662 public JLabel getMnemoniqueLabel() {
663 return mnemoniqueLabel;
664 }
665
666 public SurveyDetailsTabUIModel getModel() {
667 return model;
668 }
669
670 public ExtendedBeanDoubleList<PersonDTO> getObserversDoubleList() {
671 return observersDoubleList;
672 }
673
674 public JList<PersonDTO> getObserversList() {
675 return observersList;
676 }
677
678 public JPanel getObserversPanel() {
679 return observersPanel;
680 }
681
682 public CardLayout2Ext getObserversPanelLayout() {
683 return observersPanelLayout;
684 }
685
686 public Table getPositionnementTable() {
687 return positionnementTable;
688 }
689
690 public JLabel getPrecisionPositionnementLabel() {
691 return precisionPositionnementLabel;
692 }
693
694 public ExtendedComboBox<DepthDTO> getProfondeurEditor() {
695 return profondeurEditor;
696 }
697
698 public NumberEditor getProfondeurPreciseEditor() {
699 return profondeurPreciseEditor;
700 }
701
702 public JLabel getProfondeurPreciseLabel() {
703 return profondeurPreciseLabel;
704 }
705
706 public ExtendedComboBox<ProgramDTO> getProgramCombo() {
707 return programCombo;
708 }
709
710 public JLabel getProgramLabel() {
711 return programLabel;
712 }
713
714 public JLabel getSaisisseurLabel() {
715 return saisisseurLabel;
716 }
717
718 public JLabel getSelectionDateLabel() {
719 return selectionDateLabel;
720 }
721
722 public ExtendedComboBox<PositioningSystemDTO> getSelectionPositionnementCombo() {
723 return selectionPositionnementCombo;
724 }
725
726 public JLabel getSelectionPrecisionLabel() {
727 return selectionPrecisionLabel;
728 }
729
730 public JLabel getSelectionProfondeurLabel() {
731 return selectionProfondeurLabel;
732 }
733
734 public Table getSurveyCoordinatePanel() {
735 return surveyCoordinatePanel;
736 }
737
738 public WaitBlockingLayerUI getSurveyDetailsBlockLayer() {
739 return surveyDetailsBlockLayer;
740 }
741
742 public CoordinateEditor getSurveyLatitudeEditor() {
743 return surveyLatitudeEditor;
744 }
745
746 public JLabel getSurveyLatitudeLabel() {
747 return surveyLatitudeLabel;
748 }
749
750 public CoordinateEditor getSurveyLongitudeEditor() {
751 return surveyLongitudeEditor;
752 }
753
754 public JLabel getSurveyLongitudeLabel() {
755 return surveyLongitudeLabel;
756 }
757
758 public LocalTimeEditor getTimeEditor() {
759 return timeEditor;
760 }
761
762 public SwingValidator<SurveyDetailsTabUIModel> getValidator() {
763 return validator;
764 }
765
766
767
768
769
770 @Override
771 public void registerHelpId(ReefDbHelpBroker broker, Component component, String helpId) {
772 broker.installUI(component, helpId);
773 }
774
775 @Override
776 public void showHelp(String helpId) {
777 getBroker().showHelp(this, helpId);
778 }
779
780
781
782
783
784 protected JPanel get$JPanel0() {
785 return $JPanel0;
786 }
787
788 protected JPanel get$JPanel1() {
789 return $JPanel1;
790 }
791
792 protected JScrollPane get$JScrollPane0() {
793 return $JScrollPane0;
794 }
795
796 protected JScrollPane get$JScrollPane1() {
797 return $JScrollPane1;
798 }
799
800 protected JScrollPane get$JScrollPane2() {
801 return $JScrollPane2;
802 }
803
804 protected Table get$Table0() {
805 return $Table0;
806 }
807
808
809
810
811
812 protected void addChildrenToBottomPanel() {
813 if (!allComponentsCreated) {
814 return;
815 }
816 bottomPanel.add($JPanel0);
817 bottomPanel.add($JPanel1);
818 }
819
820 protected void addChildrenToCommentScrollPane() {
821 if (!allComponentsCreated) {
822 return;
823 }
824 commentScrollPane.getViewport().add(commentaireGeneral);
825 }
826
827 protected void addChildrenToCycleDeVie() {
828 if (!allComponentsCreated) {
829 return;
830 }
831 cycleDeVie.add(saisisseurLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
832 cycleDeVie.add(inputSaisisseur, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
833 cycleDeVie.add(dateModifObservationLabel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
834 cycleDeVie.add(SwingUtil.boxComponentWithJxLayer(dateModifEditor), new GridBagConstraints(3, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
835 cycleDeVie.add(dateControleObservationLabel, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
836 cycleDeVie.add(SwingUtil.boxComponentWithJxLayer(dateControleEditor), new GridBagConstraints(5, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
837 cycleDeVie.add(dateValidationObservationLabel, new GridBagConstraints(6, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
838 cycleDeVie.add(SwingUtil.boxComponentWithJxLayer(dateValidationEditor), new GridBagConstraints(7, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
839 cycleDeVie.add(commentaireValidationLabel, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
840 cycleDeVie.add($JScrollPane2, new GridBagConstraints(2, 1, 6, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
841 }
842
843 protected void addChildrenToDetailsPanel() {
844 if (!allComponentsCreated) {
845 return;
846 }
847 detailsPanel.add($Table0);
848 detailsPanel.add(bottomPanel, BorderLayout.PAGE_END);
849 }
850
851 protected void addChildrenToLocationCoordinatePanel() {
852 if (!allComponentsCreated) {
853 return;
854 }
855 locationCoordinatePanel.add(latitudeLabel, new GridBagConstraints(0, 0, 1, 1, 0.1, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
856 locationCoordinatePanel.add(latitudeMinLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
857 locationCoordinatePanel.add(SwingUtil.boxComponentWithJxLayer(locationMinLatitudeEditor), new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
858 locationCoordinatePanel.add(latitudeMaxLabel, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
859 locationCoordinatePanel.add(SwingUtil.boxComponentWithJxLayer(locationMaxLatitudeEditor), new GridBagConstraints(4, 0, 1, 1, 1.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
860 locationCoordinatePanel.add(longitudeLabel, new GridBagConstraints(0, 1, 1, 1, 0.1, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
861 locationCoordinatePanel.add(longitudeMinLabel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
862 locationCoordinatePanel.add(SwingUtil.boxComponentWithJxLayer(locationMinLongitudeEditor), new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
863 locationCoordinatePanel.add(longitudeMaxLabel, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
864 locationCoordinatePanel.add(SwingUtil.boxComponentWithJxLayer(locationMaxLongitudeEditor), new GridBagConstraints(4, 1, 1, 1, 1.0, 0.0, 10, 2, new Insets(3, 3, 3, 3), 0, 0));
865 }
866
867 protected void addChildrenToObserversPanel() {
868 if (!allComponentsCreated) {
869 return;
870 }
871 observersPanel.add($JScrollPane0, SurveyDetailsTabUIHandler.OBSERVERS_LIST);
872 observersPanel.add(observersDoubleList, SurveyDetailsTabUIHandler.OBSERVERS_DOUBLE_LIST);
873 }
874
875 protected void addChildrenToPositionnementTable() {
876 if (!allComponentsCreated) {
877 return;
878 }
879 positionnementTable.add(libellePositionnementLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
880 positionnementTable.add(SwingUtil.boxComponentWithJxLayer(selectionPositionnementCombo), new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
881 positionnementTable.add(precisionPositionnementLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
882 positionnementTable.add(SwingUtil.boxComponentWithJxLayer(selectionPrecisionLabel), new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
883 positionnementTable.add(commentairePositionnementLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
884 positionnementTable.add($JScrollPane1, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
885 }
886
887 protected void addChildrenToSurveyCoordinatePanel() {
888 if (!allComponentsCreated) {
889 return;
890 }
891 surveyCoordinatePanel.add(surveyLatitudeLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
892 surveyCoordinatePanel.add(SwingUtil.boxComponentWithJxLayer(surveyLatitudeEditor), new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
893 surveyCoordinatePanel.add(surveyLongitudeLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
894 surveyCoordinatePanel.add(SwingUtil.boxComponentWithJxLayer(surveyLongitudeEditor), new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
895 }
896
897 protected void addChildrenToSurveyDetailsTabUI() {
898 if (!allComponentsCreated) {
899 return;
900 }
901 add(SwingUtil.boxComponentWithJxLayer(detailsPanel));
902 }
903
904 protected void addChildrenToValidator() {
905 if (!allComponentsCreated) {
906 return;
907 }
908 validator.setUiClass(ImageValidationUI.class);
909 validator.setBean(model);
910 }
911
912 protected void createBottomPanel() {
913 $objectMap.put("bottomPanel", bottomPanel = new JPanel());
914
915 bottomPanel.setName("bottomPanel");
916 bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.PAGE_AXIS));
917 }
918
919 protected void createBroker() {
920 $objectMap.put("broker", broker = new ReefDbHelpBroker("reefdb.home.help"));
921 }
922
923 protected void createCampaignCombo() {
924 $objectMap.put("campaignCombo", campaignCombo = new ExtendedComboBox<CampaignDTO>(this));
925
926 campaignCombo.setName("campaignCombo");
927 campaignCombo.setFilterable(true);
928 campaignCombo.setShowDecorator(false);
929 campaignCombo.setProperty("campaign");
930 campaignCombo.setActionToolTipI18n("reefdb.common.unfilter");
931 campaignCombo.setShowReset(true);
932 campaignCombo.setShowActionButton(true);
933 campaignCombo.putClientProperty("validatorLabel", t("reefdb.property.program"));
934 }
935
936 protected void createCampaignLabel() {
937 $objectMap.put("campaignLabel", campaignLabel = new JLabel());
938
939 campaignLabel.setName("campaignLabel");
940 campaignLabel.setText(t("reefdb.property.campaign"));
941 }
942
943 protected void createCommentScrollPane() {
944 $objectMap.put("commentScrollPane", commentScrollPane = new JScrollPane());
945
946 commentScrollPane.setName("commentScrollPane");
947 commentScrollPane.addFocusListener(JAXXUtil.getEventListener(FocusListener.class, "focusGained", this, "doFocusGained__on__commentScrollPane"));
948 }
949
950 protected void createCommentaireGeneral() {
951 $objectMap.put("commentaireGeneral", commentaireGeneral = new JTextArea());
952
953 commentaireGeneral.setName("commentaireGeneral");
954 commentaireGeneral.setColumns(15);
955 commentaireGeneral.setLineWrap(true);
956 commentaireGeneral.setWrapStyleWord(true);
957 commentaireGeneral.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__commentaireGeneral"));
958 }
959
960 protected void createCommentaireGeneralLabel() {
961 $objectMap.put("commentaireGeneralLabel", commentaireGeneralLabel = new JLabel());
962
963 commentaireGeneralLabel.setName("commentaireGeneralLabel");
964 commentaireGeneralLabel.setText(t("reefdb.property.comment"));
965 }
966
967 protected void createCommentairePositionnement() {
968 $objectMap.put("commentairePositionnement", commentairePositionnement = new JTextArea());
969
970 commentairePositionnement.setName("commentairePositionnement");
971 commentairePositionnement.setColumns(15);
972 commentairePositionnement.setLineWrap(true);
973 commentairePositionnement.setWrapStyleWord(true);
974 commentairePositionnement.setRows(2);
975 commentairePositionnement.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__commentairePositionnement"));
976 }
977
978 protected void createCommentairePositionnementLabel() {
979 $objectMap.put("commentairePositionnementLabel", commentairePositionnementLabel = new JLabel());
980
981 commentairePositionnementLabel.setName("commentairePositionnementLabel");
982 commentairePositionnementLabel.setText(t("reefdb.property.comment"));
983 }
984
985 protected void createCommentaireValidation() {
986 $objectMap.put("commentaireValidation", commentaireValidation = new JTextArea());
987
988 commentaireValidation.setName("commentaireValidation");
989 commentaireValidation.setColumns(15);
990 commentaireValidation.setLineWrap(true);
991 commentaireValidation.setWrapStyleWord(true);
992 commentaireValidation.setEnabled(false);
993 commentaireValidation.setRows(2);
994 }
995
996 protected void createCommentaireValidationLabel() {
997 $objectMap.put("commentaireValidationLabel", commentaireValidationLabel = new JLabel());
998
999 commentaireValidationLabel.setName("commentaireValidationLabel");
1000 commentaireValidationLabel.setText(t("reefdb.property.comment.validation"));
1001 }
1002
1003 protected void createCycleDeVie() {
1004 $objectMap.put("cycleDeVie", cycleDeVie = new Table());
1005
1006 cycleDeVie.setName("cycleDeVie");
1007 }
1008
1009 protected void createDateControleEditor() {
1010 $objectMap.put("dateControleEditor", dateControleEditor = new JDatePicker());
1011
1012 dateControleEditor.setName("dateControleEditor");
1013 dateControleEditor.setEnabled(false);
1014 dateControleEditor.putClientProperty("selectOnFocus", true);
1015 }
1016
1017 protected void createDateControleObservationLabel() {
1018 $objectMap.put("dateControleObservationLabel", dateControleObservationLabel = new JLabel());
1019
1020 dateControleObservationLabel.setName("dateControleObservationLabel");
1021 dateControleObservationLabel.setText(t("reefdb.property.date.control"));
1022 }
1023
1024 protected void createDateEditor() {
1025 $objectMap.put("dateEditor", dateEditor = new JLocalDatePicker());
1026
1027 dateEditor.setName("dateEditor");
1028 dateEditor.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__dateEditor"));
1029 dateEditor.putClientProperty("selectOnFocus", true);
1030 }
1031
1032 protected void createDateModifEditor() {
1033 $objectMap.put("dateModifEditor", dateModifEditor = new JDatePicker());
1034
1035 dateModifEditor.setName("dateModifEditor");
1036 dateModifEditor.setEnabled(false);
1037 dateModifEditor.putClientProperty("selectOnFocus", true);
1038 }
1039
1040 protected void createDateModifObservationLabel() {
1041 $objectMap.put("dateModifObservationLabel", dateModifObservationLabel = new JLabel());
1042
1043 dateModifObservationLabel.setName("dateModifObservationLabel");
1044 dateModifObservationLabel.setText(t("reefdb.property.date.modification"));
1045 }
1046
1047 protected void createDateValidationEditor() {
1048 $objectMap.put("dateValidationEditor", dateValidationEditor = new JDatePicker());
1049
1050 dateValidationEditor.setName("dateValidationEditor");
1051 dateValidationEditor.setEnabled(false);
1052 dateValidationEditor.putClientProperty("selectOnFocus", true);
1053 }
1054
1055 protected void createDateValidationObservationLabel() {
1056 $objectMap.put("dateValidationObservationLabel", dateValidationObservationLabel = new JLabel());
1057
1058 dateValidationObservationLabel.setName("dateValidationObservationLabel");
1059 dateValidationObservationLabel.setText(t("reefdb.property.date.validation"));
1060 }
1061
1062 protected void createDetailsPanel() {
1063 $objectMap.put("detailsPanel", detailsPanel = new JPanel());
1064
1065 detailsPanel.setName("detailsPanel");
1066 detailsPanel.setLayout(new BorderLayout());
1067 }
1068
1069 protected SurveyDetailsTabUIHandler createHandler() {
1070 return new SurveyDetailsTabUIHandler();
1071 }
1072
1073 protected void createInputSaisisseur() {
1074 $objectMap.put("inputSaisisseur", inputSaisisseur = new JTextField());
1075
1076 inputSaisisseur.setName("inputSaisisseur");
1077 inputSaisisseur.setColumns(15);
1078 inputSaisisseur.setEnabled(false);
1079 }
1080
1081 protected void createLatitudeLabel() {
1082 $objectMap.put("latitudeLabel", latitudeLabel = new JLabel());
1083
1084 latitudeLabel.setName("latitudeLabel");
1085 latitudeLabel.setText(t("reefdb.property.latitude"));
1086 }
1087
1088 protected void createLatitudeMaxLabel() {
1089 $objectMap.put("latitudeMaxLabel", latitudeMaxLabel = new JLabel());
1090
1091 latitudeMaxLabel.setName("latitudeMaxLabel");
1092 latitudeMaxLabel.setText(t("reefdb.property.max"));
1093 }
1094
1095 protected void createLatitudeMinLabel() {
1096 $objectMap.put("latitudeMinLabel", latitudeMinLabel = new JLabel());
1097
1098 latitudeMinLabel.setName("latitudeMinLabel");
1099 latitudeMinLabel.setText(t("reefdb.property.min"));
1100 }
1101
1102 protected void createLibellePositionnementLabel() {
1103 $objectMap.put("libellePositionnementLabel", libellePositionnementLabel = new JLabel());
1104
1105 libellePositionnementLabel.setName("libellePositionnementLabel");
1106 libellePositionnementLabel.setText(t("reefdb.property.name"));
1107 }
1108
1109 protected void createLocationCombo() {
1110 $objectMap.put("locationCombo", locationCombo = new ExtendedComboBox<LocationDTO>(this));
1111
1112 locationCombo.setName("locationCombo");
1113 locationCombo.setFilterable(true);
1114 locationCombo.setShowDecorator(false);
1115 locationCombo.setProperty("location");
1116 locationCombo.setActionToolTipI18n("reefdb.common.unfilter");
1117 locationCombo.setShowReset(true);
1118 locationCombo.setShowActionButton(true);
1119 locationCombo.putClientProperty("validatorLabel", t("reefdb.property.location"));
1120 }
1121
1122 protected void createLocationCoordinatePanel() {
1123 $objectMap.put("locationCoordinatePanel", locationCoordinatePanel = new Table());
1124
1125 locationCoordinatePanel.setName("locationCoordinatePanel");
1126 }
1127
1128 protected void createLocationLabel() {
1129 $objectMap.put("locationLabel", locationLabel = new JLabel());
1130
1131 locationLabel.setName("locationLabel");
1132 locationLabel.setText(t("reefdb.property.location"));
1133 }
1134
1135 protected void createLocationMaxLatitudeEditor() {
1136 $objectMap.put("locationMaxLatitudeEditor", locationMaxLatitudeEditor = new CoordinateEditor(this));
1137
1138 locationMaxLatitudeEditor.setName("locationMaxLatitudeEditor");
1139 locationMaxLatitudeEditor.setShowPopupButton(false);
1140 locationMaxLatitudeEditor.setProperty("locationMaxLatitude");
1141 locationMaxLatitudeEditor.setShowReset(false);
1142 locationMaxLatitudeEditor.setEnabled(false);
1143 locationMaxLatitudeEditor.putClientProperty("selectOnFocus", true);
1144 }
1145
1146 protected void createLocationMaxLongitudeEditor() {
1147 $objectMap.put("locationMaxLongitudeEditor", locationMaxLongitudeEditor = new CoordinateEditor(this));
1148
1149 locationMaxLongitudeEditor.setName("locationMaxLongitudeEditor");
1150 locationMaxLongitudeEditor.setShowPopupButton(false);
1151 locationMaxLongitudeEditor.setProperty("locationMaxLongitude");
1152 locationMaxLongitudeEditor.setShowReset(false);
1153 locationMaxLongitudeEditor.setEnabled(false);
1154 locationMaxLongitudeEditor.putClientProperty("selectOnFocus", true);
1155 }
1156
1157 protected void createLocationMinLatitudeEditor() {
1158 $objectMap.put("locationMinLatitudeEditor", locationMinLatitudeEditor = new CoordinateEditor(this));
1159
1160 locationMinLatitudeEditor.setName("locationMinLatitudeEditor");
1161 locationMinLatitudeEditor.setShowPopupButton(false);
1162 locationMinLatitudeEditor.setProperty("locationMinLatitude");
1163 locationMinLatitudeEditor.setShowReset(false);
1164 locationMinLatitudeEditor.setEnabled(false);
1165 locationMinLatitudeEditor.putClientProperty("selectOnFocus", true);
1166 }
1167
1168 protected void createLocationMinLongitudeEditor() {
1169 $objectMap.put("locationMinLongitudeEditor", locationMinLongitudeEditor = new CoordinateEditor(this));
1170
1171 locationMinLongitudeEditor.setName("locationMinLongitudeEditor");
1172 locationMinLongitudeEditor.setShowPopupButton(false);
1173 locationMinLongitudeEditor.setProperty("locationMinLongitude");
1174 locationMinLongitudeEditor.setShowReset(false);
1175 locationMinLongitudeEditor.setEnabled(false);
1176 locationMinLongitudeEditor.putClientProperty("selectOnFocus", true);
1177 }
1178
1179 protected void createLongitudeLabel() {
1180 $objectMap.put("longitudeLabel", longitudeLabel = new JLabel());
1181
1182 longitudeLabel.setName("longitudeLabel");
1183 longitudeLabel.setText(t("reefdb.property.longitude"));
1184 }
1185
1186 protected void createLongitudeMaxLabel() {
1187 $objectMap.put("longitudeMaxLabel", longitudeMaxLabel = new JLabel());
1188
1189 longitudeMaxLabel.setName("longitudeMaxLabel");
1190 longitudeMaxLabel.setText(t("reefdb.property.max"));
1191 }
1192
1193 protected void createLongitudeMinLabel() {
1194 $objectMap.put("longitudeMinLabel", longitudeMinLabel = new JLabel());
1195
1196 longitudeMinLabel.setName("longitudeMinLabel");
1197 longitudeMinLabel.setText(t("reefdb.property.min"));
1198 }
1199
1200 protected void createMnemoniqueEditor() {
1201 $objectMap.put("mnemoniqueEditor", mnemoniqueEditor = new JTextField());
1202
1203 mnemoniqueEditor.setName("mnemoniqueEditor");
1204 mnemoniqueEditor.setColumns(15);
1205 mnemoniqueEditor.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__mnemoniqueEditor"));
1206 }
1207
1208 protected void createMnemoniqueLabel() {
1209 $objectMap.put("mnemoniqueLabel", mnemoniqueLabel = new JLabel());
1210
1211 mnemoniqueLabel.setName("mnemoniqueLabel");
1212 mnemoniqueLabel.setText(t("reefdb.property.mnemonic"));
1213 }
1214
1215 protected void createModel() {
1216 $objectMap.put("model", model = getContextValue(SurveyDetailsTabUIModel.class));
1217 }
1218
1219 protected void createObserversDoubleList() {
1220 $objectMap.put("observersDoubleList", observersDoubleList = new ExtendedBeanDoubleList<PersonDTO>());
1221
1222 observersDoubleList.setName("observersDoubleList");
1223 observersDoubleList.setFilterable(true);
1224 observersDoubleList.setShowDecorator(false);
1225 observersDoubleList.setProperty("selectedObservers");
1226 }
1227
1228 protected void createObserversList() {
1229 $objectMap.put("observersList", observersList = new JList<PersonDTO>());
1230
1231 observersList.setName("observersList");
1232 observersList.setEnabled(false);
1233 }
1234
1235 protected void createObserversPanel() {
1236 $objectMap.put("observersPanel", observersPanel = new JPanel());
1237
1238 observersPanel.setName("observersPanel");
1239 observersPanel.setLayout(observersPanelLayout);
1240 }
1241
1242 protected void createObserversPanelLayout() {
1243 $objectMap.put("observersPanelLayout", observersPanelLayout = new CardLayout2Ext(this, "observersPanel"));
1244 }
1245
1246 protected void createPositionnementTable() {
1247 $objectMap.put("positionnementTable", positionnementTable = new Table());
1248
1249 positionnementTable.setName("positionnementTable");
1250 }
1251
1252 protected void createPrecisionPositionnementLabel() {
1253 $objectMap.put("precisionPositionnementLabel", precisionPositionnementLabel = new JLabel());
1254
1255 precisionPositionnementLabel.setName("precisionPositionnementLabel");
1256 precisionPositionnementLabel.setText(t("reefdb.property.precision"));
1257 }
1258
1259 protected void createProfondeurEditor() {
1260 $objectMap.put("profondeurEditor", profondeurEditor = new ExtendedComboBox<DepthDTO>(this));
1261
1262 profondeurEditor.setName("profondeurEditor");
1263 profondeurEditor.setFilterable(true);
1264 profondeurEditor.setShowDecorator(false);
1265 profondeurEditor.setProperty("depth");
1266 profondeurEditor.setShowReset(true);
1267 }
1268
1269 protected void createProfondeurPreciseEditor() {
1270 $objectMap.put("profondeurPreciseEditor", profondeurPreciseEditor = new NumberEditor(this));
1271
1272 profondeurPreciseEditor.setName("profondeurPreciseEditor");
1273 profondeurPreciseEditor.setProperty("preciseDepth");
1274 profondeurPreciseEditor.setShowReset(true);
1275 profondeurPreciseEditor.putClientProperty("selectOnFocus", true);
1276 }
1277
1278 protected void createProfondeurPreciseLabel() {
1279 $objectMap.put("profondeurPreciseLabel", profondeurPreciseLabel = new JLabel());
1280
1281 profondeurPreciseLabel.setName("profondeurPreciseLabel");
1282 profondeurPreciseLabel.setText(t("reefdb.property.depth.precise"));
1283 }
1284
1285 protected void createProgramCombo() {
1286 $objectMap.put("programCombo", programCombo = new ExtendedComboBox<ProgramDTO>(this));
1287
1288 programCombo.setName("programCombo");
1289 programCombo.setFilterable(true);
1290 programCombo.setShowDecorator(false);
1291 programCombo.setProperty("program");
1292 programCombo.setActionToolTipI18n("reefdb.common.unfilter");
1293 programCombo.setShowReset(true);
1294 programCombo.setShowActionButton(true);
1295 programCombo.putClientProperty("validatorLabel", t("reefdb.property.program"));
1296 }
1297
1298 protected void createProgramLabel() {
1299 $objectMap.put("programLabel", programLabel = new JLabel());
1300
1301 programLabel.setName("programLabel");
1302 programLabel.setText(t("reefdb.property.program"));
1303 }
1304
1305 protected void createSaisisseurLabel() {
1306 $objectMap.put("saisisseurLabel", saisisseurLabel = new JLabel());
1307
1308 saisisseurLabel.setName("saisisseurLabel");
1309 saisisseurLabel.setText(t("reefdb.property.department.recorder"));
1310 }
1311
1312 protected void createSelectionDateLabel() {
1313 $objectMap.put("selectionDateLabel", selectionDateLabel = new JLabel());
1314
1315 selectionDateLabel.setName("selectionDateLabel");
1316 selectionDateLabel.setText(t("reefdb.property.date"));
1317 }
1318
1319 protected void createSelectionPositionnementCombo() {
1320 $objectMap.put("selectionPositionnementCombo", selectionPositionnementCombo = new ExtendedComboBox<PositioningSystemDTO>(this));
1321
1322 selectionPositionnementCombo.setName("selectionPositionnementCombo");
1323 selectionPositionnementCombo.setFilterable(true);
1324 selectionPositionnementCombo.setShowDecorator(false);
1325 selectionPositionnementCombo.setProperty("positioning");
1326 selectionPositionnementCombo.setShowReset(true);
1327 }
1328
1329 protected void createSelectionPrecisionLabel() {
1330 $objectMap.put("selectionPrecisionLabel", selectionPrecisionLabel = new JLabel());
1331
1332 selectionPrecisionLabel.setName("selectionPrecisionLabel");
1333 }
1334
1335 protected void createSelectionProfondeurLabel() {
1336 $objectMap.put("selectionProfondeurLabel", selectionProfondeurLabel = new JLabel());
1337
1338 selectionProfondeurLabel.setName("selectionProfondeurLabel");
1339 selectionProfondeurLabel.setText(t("reefdb.property.depth"));
1340 }
1341
1342 protected void createSurveyCoordinatePanel() {
1343 $objectMap.put("surveyCoordinatePanel", surveyCoordinatePanel = new Table());
1344
1345 surveyCoordinatePanel.setName("surveyCoordinatePanel");
1346 }
1347
1348 protected void createSurveyDetailsBlockLayer() {
1349 $objectMap.put("surveyDetailsBlockLayer", surveyDetailsBlockLayer = new WaitBlockingLayerUI());
1350 }
1351
1352 protected void createSurveyLatitudeEditor() {
1353 $objectMap.put("surveyLatitudeEditor", surveyLatitudeEditor = new CoordinateEditor(this));
1354
1355 surveyLatitudeEditor.setName("surveyLatitudeEditor");
1356 surveyLatitudeEditor.setProperty("latitude");
1357 surveyLatitudeEditor.setShowReset(true);
1358 surveyLatitudeEditor.putClientProperty("selectOnFocus", true);
1359 }
1360
1361 protected void createSurveyLatitudeLabel() {
1362 $objectMap.put("surveyLatitudeLabel", surveyLatitudeLabel = new JLabel());
1363
1364 surveyLatitudeLabel.setName("surveyLatitudeLabel");
1365 surveyLatitudeLabel.setText(t("reefdb.survey.coordinates.latitude"));
1366 }
1367
1368 protected void createSurveyLongitudeEditor() {
1369 $objectMap.put("surveyLongitudeEditor", surveyLongitudeEditor = new CoordinateEditor(this));
1370
1371 surveyLongitudeEditor.setName("surveyLongitudeEditor");
1372 surveyLongitudeEditor.setProperty("longitude");
1373 surveyLongitudeEditor.setShowReset(true);
1374 surveyLongitudeEditor.putClientProperty("selectOnFocus", true);
1375 }
1376
1377 protected void createSurveyLongitudeLabel() {
1378 $objectMap.put("surveyLongitudeLabel", surveyLongitudeLabel = new JLabel());
1379
1380 surveyLongitudeLabel.setName("surveyLongitudeLabel");
1381 surveyLongitudeLabel.setText(t("reefdb.survey.coordinates.longitude"));
1382 }
1383
1384 protected void createTimeEditor() {
1385 $objectMap.put("timeEditor", timeEditor = new LocalTimeEditor());
1386
1387 timeEditor.setName("timeEditor");
1388 timeEditor.setColumns(15);
1389 timeEditor.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__timeEditor"));
1390 }
1391
1392 protected void createValidator() {
1393 $objectMap.put("validator", validator = SwingValidator.newValidator(SurveyDetailsTabUIModel.class, null));
1394 }
1395
1396
1397
1398
1399
1400 private void $completeSetup() {
1401 allComponentsCreated = true;
1402 if (log.isDebugEnabled()) {
1403 log.debug(this);
1404 }
1405 addChildrenToSurveyDetailsTabUI();
1406 addChildrenToValidator();
1407 addChildrenToDetailsPanel();
1408
1409 $Table0.add(locationLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1410 $Table0.add(SwingUtil.boxComponentWithJxLayer(locationCombo), new GridBagConstraints(1, 0, 3, 1, 0.5, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1411 $Table0.add(selectionDateLabel, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1412 $Table0.add(SwingUtil.boxComponentWithJxLayer(dateEditor), new GridBagConstraints(5, 0, 1, 1, 0.25, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1413 $Table0.add(SwingUtil.boxComponentWithJxLayer(timeEditor), new GridBagConstraints(6, 0, 1, 1, 0.25, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1414 $Table0.add(programLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1415 $Table0.add(SwingUtil.boxComponentWithJxLayer(programCombo), new GridBagConstraints(1, 1, 3, 1, 0.5, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1416 $Table0.add(mnemoniqueLabel, new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1417 $Table0.add(SwingUtil.boxComponentWithJxLayer(mnemoniqueEditor), new GridBagConstraints(5, 1, 2, 1, 0.5, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1418 $Table0.add(selectionProfondeurLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1419 $Table0.add(profondeurEditor, new GridBagConstraints(1, 2, 1, 1, 0.25, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1420 $Table0.add(profondeurPreciseLabel, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1421 $Table0.add(SwingUtil.boxComponentWithJxLayer(profondeurPreciseEditor), new GridBagConstraints(3, 2, 1, 1, 0.25, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1422 $Table0.add(observersPanel, new GridBagConstraints(4, 2, 3, 3, 0.5, 1.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1423 $Table0.add(campaignLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1424 $Table0.add(SwingUtil.boxComponentWithJxLayer(campaignCombo), new GridBagConstraints(1, 3, 3, 1, 0.5, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1425 $Table0.add(commentaireGeneralLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1426 $Table0.add(SwingUtil.boxComponentWithJxLayer(commentScrollPane), new GridBagConstraints(1, 4, 3, 1, 0.5, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
1427 addChildrenToObserversPanel();
1428
1429 $JScrollPane0.getViewport().add(observersList);
1430 addChildrenToCommentScrollPane();
1431 addChildrenToBottomPanel();
1432
1433 $JPanel0.add(locationCoordinatePanel);
1434 $JPanel0.add(surveyCoordinatePanel);
1435 $JPanel0.add(positionnementTable);
1436 addChildrenToLocationCoordinatePanel();
1437 addChildrenToSurveyCoordinatePanel();
1438 addChildrenToPositionnementTable();
1439
1440 $JScrollPane1.getViewport().add(commentairePositionnement);
1441
1442 $JPanel1.add(cycleDeVie);
1443 addChildrenToCycleDeVie();
1444
1445 $JScrollPane2.getViewport().add(SwingUtil.boxComponentWithJxLayer(commentaireValidation));
1446
1447
1448 JAXXUtil.applyDataBinding(this, $bindings.keySet());
1449
1450
1451 locationCombo.setBeanType(LocationDTO.class);
1452 programCombo.setBeanType(ProgramDTO.class);
1453 profondeurEditor.setBeanType(DepthDTO.class);
1454 $JScrollPane0.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
1455 observersDoubleList.setBeanType(PersonDTO.class);
1456 campaignCombo.setBeanType(CampaignDTO.class);
1457 selectionPositionnementCombo.setBeanType(PositioningSystemDTO.class);
1458 $JScrollPane1.setBorder(null);
1459 $JScrollPane2.setBorder(null);
1460 surveyDetailsBlockLayer.setBlockingColor(handler.getConfig().getColorBlockingLayer());
1461 locationLabel.setLabelFor(locationCombo);
1462 locationCombo.setIcon(SwingUtil.createActionIcon("unfilter"));
1463 locationCombo.setBean(model);
1464 selectionDateLabel.setLabelFor(dateEditor);
1465 programLabel.setLabelFor(programCombo);
1466 programCombo.setIcon(SwingUtil.createActionIcon("unfilter"));
1467 programCombo.setBean(model);
1468 mnemoniqueLabel.setLabelFor(mnemoniqueEditor);
1469 selectionProfondeurLabel.setLabelFor(profondeurEditor);
1470 profondeurEditor.setBean(model);
1471 profondeurPreciseLabel.setLabelFor(profondeurPreciseEditor);
1472 profondeurPreciseEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1473 profondeurPreciseEditor.setNumberType(Double.class);
1474 profondeurPreciseEditor.setShowPopupButton(handler.getConfig().isShowNumberEditorButton());
1475 profondeurPreciseEditor.setBean(model);
1476 observersPanel.setBorder(BorderFactory.createTitledBorder(t("reefdb.survey.observers.title")));
1477 observersDoubleList.setBean(model);
1478 campaignLabel.setLabelFor(campaignCombo);
1479 campaignCombo.setIcon(SwingUtil.createActionIcon("unfilter"));
1480 campaignCombo.setBean(model);
1481 commentaireGeneralLabel.setLabelFor(commentaireGeneral);
1482 locationCoordinatePanel.setBorder(BorderFactory.createTitledBorder(t("reefdb.survey.locationCoordinates.title")));
1483 latitudeMinLabel.setLabelFor(locationMinLatitudeEditor);
1484 locationMinLatitudeEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1485 locationMinLatitudeEditor.setCoordinateType(CoordinateType.LATITUDE_MIN);
1486 locationMinLatitudeEditor.setBean(model);
1487 latitudeMaxLabel.setLabelFor(locationMaxLatitudeEditor);
1488 locationMaxLatitudeEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1489 locationMaxLatitudeEditor.setCoordinateType(CoordinateType.LATITUDE_MAX);
1490 locationMaxLatitudeEditor.setBean(model);
1491 longitudeMinLabel.setLabelFor(locationMinLongitudeEditor);
1492 locationMinLongitudeEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1493 locationMinLongitudeEditor.setCoordinateType(CoordinateType.LONGITUDE_MIN);
1494 locationMinLongitudeEditor.setBean(model);
1495 longitudeMaxLabel.setLabelFor(locationMaxLongitudeEditor);
1496 locationMaxLongitudeEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1497 locationMaxLongitudeEditor.setCoordinateType(CoordinateType.LONGITUDE_MAX);
1498 locationMaxLongitudeEditor.setBean(model);
1499 surveyCoordinatePanel.setBorder(BorderFactory.createTitledBorder(t("reefdb.survey.coordinates.title")));
1500 surveyLatitudeLabel.setLabelFor(surveyLatitudeEditor);
1501 surveyLatitudeEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1502 surveyLatitudeEditor.setShowPopupButton(handler.getConfig().isShowNumberEditorButton());
1503 surveyLatitudeEditor.setCoordinateType(CoordinateType.LATITUDE_MIN);
1504 surveyLatitudeEditor.setBean(model);
1505 surveyLongitudeLabel.setLabelFor(surveyLongitudeEditor);
1506 surveyLongitudeEditor.setAutoPopup(handler.getConfig().isAutoPopupNumberEditor());
1507 surveyLongitudeEditor.setShowPopupButton(handler.getConfig().isShowNumberEditorButton());
1508 surveyLongitudeEditor.setCoordinateType(CoordinateType.LONGITUDE_MIN);
1509 surveyLongitudeEditor.setBean(model);
1510 positionnementTable.setBorder(BorderFactory.createTitledBorder(t("reefdb.survey.positioning.title")));
1511 libellePositionnementLabel.setLabelFor(selectionPositionnementCombo);
1512 selectionPositionnementCombo.setBean(model);
1513 precisionPositionnementLabel.setLabelFor(selectionPrecisionLabel);
1514 commentairePositionnementLabel.setLabelFor(commentairePositionnement);
1515 cycleDeVie.setBorder(BorderFactory.createTitledBorder(t("reefdb.survey.lifeCycle.title")));
1516 saisisseurLabel.setLabelFor(inputSaisisseur);
1517 dateModifObservationLabel.setLabelFor(dateModifEditor);
1518 dateControleObservationLabel.setLabelFor(dateControleEditor);
1519 dateValidationObservationLabel.setLabelFor(dateValidationEditor);
1520 commentaireValidationLabel.setLabelFor(commentaireValidation);
1521
1522
1523 validatorIds = SwingValidatorUtil.detectValidators(this);
1524 SwingValidatorUtil.installUI(this);
1525 }
1526
1527 private void $initialize() {
1528 if (allComponentsCreated) {
1529 return;
1530 }
1531 if (log.isDebugEnabled()) {
1532 log.debug(this);
1533 }
1534 handler.beforeInit(this);
1535 $objectMap.put("surveyDetailsTabUI", surveyDetailsTabUI);
1536 createModel();
1537 createBroker();
1538 createValidator();
1539 createObserversPanelLayout();
1540 createSurveyDetailsBlockLayer();
1541 createDetailsPanel();
1542
1543 $objectMap.put("$Table0", $Table0 = new Table());
1544
1545 $Table0.setName("$Table0");
1546 createLocationLabel();
1547 createLocationCombo();
1548 createSelectionDateLabel();
1549 createDateEditor();
1550 createTimeEditor();
1551 createProgramLabel();
1552 createProgramCombo();
1553 createMnemoniqueLabel();
1554 createMnemoniqueEditor();
1555 createSelectionProfondeurLabel();
1556 createProfondeurEditor();
1557 createProfondeurPreciseLabel();
1558 createProfondeurPreciseEditor();
1559 createObserversPanel();
1560
1561 $objectMap.put("$JScrollPane0", $JScrollPane0 = new JScrollPane());
1562
1563 $JScrollPane0.setName("$JScrollPane0");
1564 createObserversList();
1565 createObserversDoubleList();
1566 createCampaignLabel();
1567 createCampaignCombo();
1568 createCommentaireGeneralLabel();
1569 createCommentScrollPane();
1570 createCommentaireGeneral();
1571 createBottomPanel();
1572
1573 $objectMap.put("$JPanel0", $JPanel0 = new JPanel());
1574
1575 $JPanel0.setName("$JPanel0");
1576 $JPanel0.setLayout(new GridLayout(1,0));
1577 createLocationCoordinatePanel();
1578 createLatitudeLabel();
1579 createLatitudeMinLabel();
1580 createLocationMinLatitudeEditor();
1581 createLatitudeMaxLabel();
1582 createLocationMaxLatitudeEditor();
1583 createLongitudeLabel();
1584 createLongitudeMinLabel();
1585 createLocationMinLongitudeEditor();
1586 createLongitudeMaxLabel();
1587 createLocationMaxLongitudeEditor();
1588 createSurveyCoordinatePanel();
1589 createSurveyLatitudeLabel();
1590 createSurveyLatitudeEditor();
1591 createSurveyLongitudeLabel();
1592 createSurveyLongitudeEditor();
1593 createPositionnementTable();
1594 createLibellePositionnementLabel();
1595 createSelectionPositionnementCombo();
1596 createPrecisionPositionnementLabel();
1597 createSelectionPrecisionLabel();
1598 createCommentairePositionnementLabel();
1599
1600 $objectMap.put("$JScrollPane1", $JScrollPane1 = new JScrollPane());
1601
1602 $JScrollPane1.setName("$JScrollPane1");
1603 $JScrollPane1.addFocusListener(JAXXUtil.getEventListener(FocusListener.class, "focusGained", this, "doFocusGained__on__$JScrollPane1"));
1604 createCommentairePositionnement();
1605
1606 $objectMap.put("$JPanel1", $JPanel1 = new JPanel());
1607
1608 $JPanel1.setName("$JPanel1");
1609 $JPanel1.setLayout(new BorderLayout());
1610 createCycleDeVie();
1611 createSaisisseurLabel();
1612 createInputSaisisseur();
1613 createDateModifObservationLabel();
1614 createDateModifEditor();
1615 createDateControleObservationLabel();
1616 createDateControleEditor();
1617 createDateValidationObservationLabel();
1618 createDateValidationEditor();
1619 createCommentaireValidationLabel();
1620
1621 $objectMap.put("$JScrollPane2", $JScrollPane2 = new JScrollPane());
1622
1623 $JScrollPane2.setName("$JScrollPane2");
1624 createCommentaireValidation();
1625
1626 setName("surveyDetailsTabUI");
1627 setLayout(new BorderLayout());
1628 surveyDetailsTabUI.putClientProperty("panelType", ReefDbUI.EDITION_PANEL_TYPE);
1629
1630
1631 $registerDefaultBindings();
1632 $completeSetup();
1633 handler.afterInit(this);
1634 }
1635
1636 private void $registerDefaultBindings() {
1637
1638 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SURVEY_DETAILS_BLOCK_LAYER_BLOCK, true) {
1639
1640 @Override
1641 public void applyDataBinding() {
1642 if (model != null) {
1643 model.addPropertyChangeListener("loading", this);
1644 }
1645 }
1646
1647 @Override
1648 public void processDataBinding() {
1649 if (model != null) {
1650 surveyDetailsBlockLayer.setBlock(model.isLoading());
1651 }
1652 }
1653
1654 @Override
1655 public void removeDataBinding() {
1656 if (model != null) {
1657 model.removePropertyChangeListener("loading", this);
1658 }
1659 }
1660 });
1661 registerDataBinding(new DefaultJAXXBinding(this, BINDING_LOCATION_COMBO_SELECTED_ITEM, true) {
1662
1663 @Override
1664 public void applyDataBinding() {
1665 if (model != null) {
1666 model.addPropertyChangeListener("location", this);
1667 }
1668 }
1669
1670 @Override
1671 public void processDataBinding() {
1672 if (model != null) {
1673 locationCombo.setSelectedItem(model.getLocation());
1674 }
1675 }
1676
1677 @Override
1678 public void removeDataBinding() {
1679 if (model != null) {
1680 model.removePropertyChangeListener("location", this);
1681 }
1682 }
1683 });
1684 registerDataBinding(new DefaultJAXXBinding(this, BINDING_LOCATION_COMBO_ENABLED, true) {
1685
1686 @Override
1687 public void applyDataBinding() {
1688 if (model != null) {
1689 model.addPropertyChangeListener("editable", this);
1690 }
1691 }
1692
1693 @Override
1694 public void processDataBinding() {
1695 if (model != null) {
1696 locationCombo.setEnabled(model.isEditable());
1697 }
1698 }
1699
1700 @Override
1701 public void removeDataBinding() {
1702 if (model != null) {
1703 model.removePropertyChangeListener("editable", this);
1704 }
1705 }
1706 });
1707 registerDataBinding(new DefaultJAXXBinding(this, BINDING_DATE_EDITOR_LOCAL_DATE, true) {
1708
1709 @Override
1710 public void applyDataBinding() {
1711 if (model != null) {
1712 model.addPropertyChangeListener("date", this);
1713 }
1714 }
1715
1716 @Override
1717 public void processDataBinding() {
1718 if (model != null) {
1719 dateEditor.setLocalDate(model.getDate());
1720 }
1721 }
1722
1723 @Override
1724 public void removeDataBinding() {
1725 if (model != null) {
1726 model.removePropertyChangeListener("date", this);
1727 }
1728 }
1729 });
1730 registerDataBinding(new DefaultJAXXBinding(this, BINDING_DATE_EDITOR_ENABLED, true) {
1731
1732 @Override
1733 public void applyDataBinding() {
1734 if (model != null) {
1735 model.addPropertyChangeListener("editable", this);
1736 }
1737 }
1738
1739 @Override
1740 public void processDataBinding() {
1741 if (model != null) {
1742 dateEditor.setEnabled(model.isEditable());
1743 }
1744 }
1745
1746 @Override
1747 public void removeDataBinding() {
1748 if (model != null) {
1749 model.removePropertyChangeListener("editable", this);
1750 }
1751 }
1752 });
1753 registerDataBinding(new DefaultJAXXBinding(this, BINDING_TIME_EDITOR_TIME_IN_SECOND, true) {
1754
1755 @Override
1756 public void applyDataBinding() {
1757 if (model != null) {
1758 model.addPropertyChangeListener("time", this);
1759 }
1760 }
1761
1762 @Override
1763 public void processDataBinding() {
1764 if (model != null) {
1765 timeEditor.setTimeInSecond(model.getTime());
1766 }
1767 }
1768
1769 @Override
1770 public void removeDataBinding() {
1771 if (model != null) {
1772 model.removePropertyChangeListener("time", this);
1773 }
1774 }
1775 });
1776 registerDataBinding(new DefaultJAXXBinding(this, BINDING_TIME_EDITOR_ENABLED, true) {
1777
1778 @Override
1779 public void applyDataBinding() {
1780 if (model != null) {
1781 model.addPropertyChangeListener("editable", this);
1782 }
1783 }
1784
1785 @Override
1786 public void processDataBinding() {
1787 if (model != null) {
1788 timeEditor.setEnabled(model.isEditable());
1789 }
1790 }
1791
1792 @Override
1793 public void removeDataBinding() {
1794 if (model != null) {
1795 model.removePropertyChangeListener("editable", this);
1796 }
1797 }
1798 });
1799 registerDataBinding(new DefaultJAXXBinding(this, BINDING_PROGRAM_COMBO_SELECTED_ITEM, true) {
1800
1801 @Override
1802 public void applyDataBinding() {
1803 if (model != null) {
1804 model.addPropertyChangeListener("program", this);
1805 }
1806 }
1807
1808 @Override
1809 public void processDataBinding() {
1810 if (model != null) {
1811 programCombo.setSelectedItem(model.getProgram());
1812 }
1813 }
1814
1815 @Override
1816 public void removeDataBinding() {
1817 if (model != null) {
1818 model.removePropertyChangeListener("program", this);
1819 }
1820 }
1821 });
1822 registerDataBinding(new DefaultJAXXBinding(this, BINDING_PROGRAM_COMBO_ENABLED, true) {
1823
1824 @Override
1825 public void applyDataBinding() {
1826 if (model != null) {
1827 model.addPropertyChangeListener("editable", this);
1828 }
1829 }
1830
1831 @Override
1832 public void processDataBinding() {
1833 if (model != null) {
1834 programCombo.setEnabled(model.isEditable());
1835 }
1836 }
1837
1838 @Override
1839 public void removeDataBinding() {
1840 if (model != null) {
1841 model.removePropertyChangeListener("editable", this);
1842 }
1843 }
1844 });
1845 registerDataBinding(new DefaultJAXXBinding(this, BINDING_MNEMONIQUE_EDITOR_TEXT, true) {
1846
1847 @Override
1848 public void applyDataBinding() {
1849 if (model != null) {
1850 model.addPropertyChangeListener("name", this);
1851 }
1852 }
1853
1854 @Override
1855 public void processDataBinding() {
1856 if (model != null) {
1857 SwingUtil.setText(mnemoniqueEditor, model.getName());
1858 }
1859 }
1860
1861 @Override
1862 public void removeDataBinding() {
1863 if (model != null) {
1864 model.removePropertyChangeListener("name", this);
1865 }
1866 }
1867 });
1868 registerDataBinding(new DefaultJAXXBinding(this, BINDING_MNEMONIQUE_EDITOR_ENABLED, true) {
1869
1870 @Override
1871 public void applyDataBinding() {
1872 if (model != null) {
1873 model.addPropertyChangeListener("editable", this);
1874 }
1875 }
1876
1877 @Override
1878 public void processDataBinding() {
1879 if (model != null) {
1880 mnemoniqueEditor.setEnabled(model.isEditable());
1881 }
1882 }
1883
1884 @Override
1885 public void removeDataBinding() {
1886 if (model != null) {
1887 model.removePropertyChangeListener("editable", this);
1888 }
1889 }
1890 });
1891 registerDataBinding(new DefaultJAXXBinding(this, BINDING_PROFONDEUR_EDITOR_SELECTED_ITEM, true) {
1892
1893 @Override
1894 public void applyDataBinding() {
1895 if (model != null) {
1896 model.addPropertyChangeListener("depth", this);
1897 }
1898 }
1899
1900 @Override
1901 public void processDataBinding() {
1902 if (model != null) {
1903 profondeurEditor.setSelectedItem(model.getDepth());
1904 }
1905 }
1906
1907 @Override
1908 public void removeDataBinding() {
1909 if (model != null) {
1910 model.removePropertyChangeListener("depth", this);
1911 }
1912 }
1913 });
1914 registerDataBinding(new DefaultJAXXBinding(this, BINDING_PROFONDEUR_EDITOR_ENABLED, true) {
1915
1916 @Override
1917 public void applyDataBinding() {
1918 if (model != null) {
1919 model.addPropertyChangeListener("editable", this);
1920 }
1921 }
1922
1923 @Override
1924 public void processDataBinding() {
1925 if (model != null) {
1926 profondeurEditor.setEnabled(model.isEditable());
1927 }
1928 }
1929
1930 @Override
1931 public void removeDataBinding() {
1932 if (model != null) {
1933 model.removePropertyChangeListener("editable", this);
1934 }
1935 }
1936 });
1937 registerDataBinding(new SimpleJAXXObjectBinding(this, BINDING_PROFONDEUR_PRECISE_EDITOR_NUMBER_PATTERN, true ,"DECIMAL1_PATTERN") {
1938
1939 @Override
1940 public void processDataBinding() {
1941 profondeurPreciseEditor.setNumberPattern(DECIMAL1_PATTERN);
1942 }
1943 });
1944 registerDataBinding(new DefaultJAXXBinding(this, BINDING_PROFONDEUR_PRECISE_EDITOR_NUMBER_VALUE, true) {
1945
1946 @Override
1947 public void applyDataBinding() {
1948 if (model != null) {
1949 model.addPropertyChangeListener("preciseDepth", this);
1950 }
1951 }
1952
1953 @Override
1954 public void processDataBinding() {
1955 if (model != null) {
1956 profondeurPreciseEditor.setNumberValue(model.getPreciseDepth());
1957 }
1958 }
1959
1960 @Override
1961 public void removeDataBinding() {
1962 if (model != null) {
1963 model.removePropertyChangeListener("preciseDepth", this);
1964 }
1965 }
1966 });
1967 registerDataBinding(new DefaultJAXXBinding(this, BINDING_PROFONDEUR_PRECISE_EDITOR_ENABLED, true) {
1968
1969 @Override
1970 public void applyDataBinding() {
1971 if (model != null) {
1972 model.addPropertyChangeListener("editable", this);
1973 }
1974 }
1975
1976 @Override
1977 public void processDataBinding() {
1978 if (model != null) {
1979 profondeurPreciseEditor.setEnabled(model.isEditable());
1980 }
1981 }
1982
1983 @Override
1984 public void removeDataBinding() {
1985 if (model != null) {
1986 model.removePropertyChangeListener("editable", this);
1987 }
1988 }
1989 });
1990 registerDataBinding(new DefaultJAXXBinding(this, BINDING_OBSERVERS_DOUBLE_LIST_ENABLED, true) {
1991
1992 @Override
1993 public void applyDataBinding() {
1994 if (model != null) {
1995 model.addPropertyChangeListener("editable", this);
1996 }
1997 }
1998
1999 @Override
2000 public void processDataBinding() {
2001 if (model != null) {
2002 observersDoubleList.setEnabled(model.isEditable());
2003 }
2004 }
2005
2006 @Override
2007 public void removeDataBinding() {
2008 if (model != null) {
2009 model.removePropertyChangeListener("editable", this);
2010 }
2011 }
2012 });
2013 registerDataBinding(new DefaultJAXXBinding(this, BINDING_CAMPAIGN_COMBO_SELECTED_ITEM, true) {
2014
2015 @Override
2016 public void applyDataBinding() {
2017 if (model != null) {
2018 model.addPropertyChangeListener("campaign", this);
2019 }
2020 }
2021
2022 @Override
2023 public void processDataBinding() {
2024 if (model != null) {
2025 campaignCombo.setSelectedItem(model.getCampaign());
2026 }
2027 }
2028
2029 @Override
2030 public void removeDataBinding() {
2031 if (model != null) {
2032 model.removePropertyChangeListener("campaign", this);
2033 }
2034 }
2035 });
2036 registerDataBinding(new DefaultJAXXBinding(this, BINDING_CAMPAIGN_COMBO_ENABLED, true) {
2037
2038 @Override
2039 public void applyDataBinding() {
2040 if (model != null) {
2041 model.addPropertyChangeListener("editable", this);
2042 }
2043 }
2044
2045 @Override
2046 public void processDataBinding() {
2047 if (model != null) {
2048 campaignCombo.setEnabled(model.isEditable());
2049 }
2050 }
2051
2052 @Override
2053 public void removeDataBinding() {
2054 if (model != null) {
2055 model.removePropertyChangeListener("editable", this);
2056 }
2057 }
2058 });
2059 registerDataBinding(new DefaultJAXXBinding(this, BINDING_COMMENTAIRE_GENERAL_TEXT, true) {
2060
2061 @Override
2062 public void applyDataBinding() {
2063 if (model != null) {
2064 model.addPropertyChangeListener("comment", this);
2065 }
2066 }
2067
2068 @Override
2069 public void processDataBinding() {
2070 if (model != null) {
2071 SwingUtil.setText(commentaireGeneral, model.getComment());
2072 }
2073 }
2074
2075 @Override
2076 public void removeDataBinding() {
2077 if (model != null) {
2078 model.removePropertyChangeListener("comment", this);
2079 }
2080 }
2081 });
2082 registerDataBinding(new DefaultJAXXBinding(this, BINDING_COMMENTAIRE_GENERAL_ENABLED, true) {
2083
2084 @Override
2085 public void applyDataBinding() {
2086 if (model != null) {
2087 model.addPropertyChangeListener("editable", this);
2088 }
2089 }
2090
2091 @Override
2092 public void processDataBinding() {
2093 if (model != null) {
2094 commentaireGeneral.setEnabled(model.isEditable());
2095 }
2096 }
2097
2098 @Override
2099 public void removeDataBinding() {
2100 if (model != null) {
2101 model.removePropertyChangeListener("editable", this);
2102 }
2103 }
2104 });
2105 registerDataBinding(new DefaultJAXXBinding(this, BINDING_LOCATION_MIN_LATITUDE_EDITOR_NUMBER_VALUE, true) {
2106
2107 @Override
2108 public void applyDataBinding() {
2109 if (model != null) {
2110 model.addPropertyChangeListener("locationMinLatitude", this);
2111 }
2112 }
2113
2114 @Override
2115 public void processDataBinding() {
2116 if (model != null) {
2117 locationMinLatitudeEditor.setNumberValue(model.getLocationMinLatitude());
2118 }
2119 }
2120
2121 @Override
2122 public void removeDataBinding() {
2123 if (model != null) {
2124 model.removePropertyChangeListener("locationMinLatitude", this);
2125 }
2126 }
2127 });
2128 registerDataBinding(new DefaultJAXXBinding(this, BINDING_LOCATION_MAX_LATITUDE_EDITOR_NUMBER_VALUE, true) {
2129
2130 @Override
2131 public void applyDataBinding() {
2132 if (model != null) {
2133 model.addPropertyChangeListener("locationMaxLatitude", this);
2134 }
2135 }
2136
2137 @Override
2138 public void processDataBinding() {
2139 if (model != null) {
2140 locationMaxLatitudeEditor.setNumberValue(model.getLocationMaxLatitude());
2141 }
2142 }
2143
2144 @Override
2145 public void removeDataBinding() {
2146 if (model != null) {
2147 model.removePropertyChangeListener("locationMaxLatitude", this);
2148 }
2149 }
2150 });
2151 registerDataBinding(new DefaultJAXXBinding(this, BINDING_LOCATION_MIN_LONGITUDE_EDITOR_NUMBER_VALUE, true) {
2152
2153 @Override
2154 public void applyDataBinding() {
2155 if (model != null) {
2156 model.addPropertyChangeListener("locationMinLongitude", this);
2157 }
2158 }
2159
2160 @Override
2161 public void processDataBinding() {
2162 if (model != null) {
2163 locationMinLongitudeEditor.setNumberValue(model.getLocationMinLongitude());
2164 }
2165 }
2166
2167 @Override
2168 public void removeDataBinding() {
2169 if (model != null) {
2170 model.removePropertyChangeListener("locationMinLongitude", this);
2171 }
2172 }
2173 });
2174 registerDataBinding(new DefaultJAXXBinding(this, BINDING_LOCATION_MAX_LONGITUDE_EDITOR_NUMBER_VALUE, true) {
2175
2176 @Override
2177 public void applyDataBinding() {
2178 if (model != null) {
2179 model.addPropertyChangeListener("locationMaxLongitude", this);
2180 }
2181 }
2182
2183 @Override
2184 public void processDataBinding() {
2185 if (model != null) {
2186 locationMaxLongitudeEditor.setNumberValue(model.getLocationMaxLongitude());
2187 }
2188 }
2189
2190 @Override
2191 public void removeDataBinding() {
2192 if (model != null) {
2193 model.removePropertyChangeListener("locationMaxLongitude", this);
2194 }
2195 }
2196 });
2197 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SURVEY_LATITUDE_EDITOR_NUMBER_VALUE, true) {
2198
2199 @Override
2200 public void applyDataBinding() {
2201 if (model != null) {
2202 model.addPropertyChangeListener("latitude", this);
2203 }
2204 }
2205
2206 @Override
2207 public void processDataBinding() {
2208 if (model != null) {
2209 surveyLatitudeEditor.setNumberValue(model.getLatitude());
2210 }
2211 }
2212
2213 @Override
2214 public void removeDataBinding() {
2215 if (model != null) {
2216 model.removePropertyChangeListener("latitude", this);
2217 }
2218 }
2219 });
2220 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SURVEY_LATITUDE_EDITOR_ENABLED, true) {
2221
2222 @Override
2223 public void applyDataBinding() {
2224 if (model != null) {
2225 model.addPropertyChangeListener("editable", this);
2226 }
2227 }
2228
2229 @Override
2230 public void processDataBinding() {
2231 if (model != null) {
2232 surveyLatitudeEditor.setEnabled(model.isEditable());
2233 }
2234 }
2235
2236 @Override
2237 public void removeDataBinding() {
2238 if (model != null) {
2239 model.removePropertyChangeListener("editable", this);
2240 }
2241 }
2242 });
2243 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SURVEY_LONGITUDE_EDITOR_NUMBER_VALUE, true) {
2244
2245 @Override
2246 public void applyDataBinding() {
2247 if (model != null) {
2248 model.addPropertyChangeListener("longitude", this);
2249 }
2250 }
2251
2252 @Override
2253 public void processDataBinding() {
2254 if (model != null) {
2255 surveyLongitudeEditor.setNumberValue(model.getLongitude());
2256 }
2257 }
2258
2259 @Override
2260 public void removeDataBinding() {
2261 if (model != null) {
2262 model.removePropertyChangeListener("longitude", this);
2263 }
2264 }
2265 });
2266 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SURVEY_LONGITUDE_EDITOR_ENABLED, true) {
2267
2268 @Override
2269 public void applyDataBinding() {
2270 if (model != null) {
2271 model.addPropertyChangeListener("editable", this);
2272 }
2273 }
2274
2275 @Override
2276 public void processDataBinding() {
2277 if (model != null) {
2278 surveyLongitudeEditor.setEnabled(model.isEditable());
2279 }
2280 }
2281
2282 @Override
2283 public void removeDataBinding() {
2284 if (model != null) {
2285 model.removePropertyChangeListener("editable", this);
2286 }
2287 }
2288 });
2289 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SELECTION_POSITIONNEMENT_COMBO_SELECTED_ITEM, true) {
2290
2291 @Override
2292 public void applyDataBinding() {
2293 if (model != null) {
2294 model.addPropertyChangeListener("positioning", this);
2295 }
2296 }
2297
2298 @Override
2299 public void processDataBinding() {
2300 if (model != null) {
2301 selectionPositionnementCombo.setSelectedItem(model.getPositioning());
2302 }
2303 }
2304
2305 @Override
2306 public void removeDataBinding() {
2307 if (model != null) {
2308 model.removePropertyChangeListener("positioning", this);
2309 }
2310 }
2311 });
2312 registerDataBinding(new DefaultJAXXBinding(this, BINDING_SELECTION_POSITIONNEMENT_COMBO_ENABLED, true, true) {
2313
2314 @Override
2315 public void applyDataBinding() {
2316 if (model != null) {
2317 model.addPropertyChangeListener("editable", this);
2318 }
2319 if (model != null) {
2320 model.addPropertyChangeListener("latitude", this);
2321 }
2322 if (model != null) {
2323 model.addPropertyChangeListener("longitude", this);
2324 }
2325 }
2326
2327 @Override
2328 public void processDataBinding() {
2329 if (model != null) {
2330 selectionPositionnementCombo.setEnabled(model.isEditable() && model.getLatitude() != null && model.getLongitude() != null);
2331 }
2332 }
2333
2334 @Override
2335 public void removeDataBinding() {
2336 if (model != null) {
2337 model.removePropertyChangeListener("editable", this);
2338 }
2339 if (model != null) {
2340 model.removePropertyChangeListener("latitude", this);
2341 }
2342 if (model != null) {
2343 model.removePropertyChangeListener("longitude", this);
2344 }
2345 }
2346 });
2347 registerDataBinding(new DefaultJAXXBinding(this, BINDING_COMMENTAIRE_POSITIONNEMENT_TEXT, true) {
2348
2349 @Override
2350 public void applyDataBinding() {
2351 if (model != null) {
2352 model.addPropertyChangeListener("positioningComment", this);
2353 }
2354 }
2355
2356 @Override
2357 public void processDataBinding() {
2358 if (model != null) {
2359 SwingUtil.setText(commentairePositionnement, model.getPositioningComment());
2360 }
2361 }
2362
2363 @Override
2364 public void removeDataBinding() {
2365 if (model != null) {
2366 model.removePropertyChangeListener("positioningComment", this);
2367 }
2368 }
2369 });
2370 registerDataBinding(new DefaultJAXXBinding(this, BINDING_COMMENTAIRE_POSITIONNEMENT_ENABLED, true) {
2371
2372 @Override
2373 public void applyDataBinding() {
2374 if (model != null) {
2375 model.addPropertyChangeListener("editable", this);
2376 }
2377 }
2378
2379 @Override
2380 public void processDataBinding() {
2381 if (model != null) {
2382 commentairePositionnement.setEnabled(model.isEditable());
2383 }
2384 }
2385
2386 @Override
2387 public void removeDataBinding() {
2388 if (model != null) {
2389 model.removePropertyChangeListener("editable", this);
2390 }
2391 }
2392 });
2393 registerDataBinding(new DefaultJAXXBinding(this, BINDING_DATE_MODIF_EDITOR_DATE, true) {
2394
2395 @Override
2396 public void applyDataBinding() {
2397 if (model != null) {
2398 model.addPropertyChangeListener("updateDate", this);
2399 }
2400 }
2401
2402 @Override
2403 public void processDataBinding() {
2404 if (model != null) {
2405 dateModifEditor.setDate(model.getUpdateDate());
2406 }
2407 }
2408
2409 @Override
2410 public void removeDataBinding() {
2411 if (model != null) {
2412 model.removePropertyChangeListener("updateDate", this);
2413 }
2414 }
2415 });
2416 registerDataBinding(new DefaultJAXXBinding(this, BINDING_DATE_CONTROLE_EDITOR_DATE, true) {
2417
2418 @Override
2419 public void applyDataBinding() {
2420 if (model != null) {
2421 model.addPropertyChangeListener("controlDate", this);
2422 }
2423 }
2424
2425 @Override
2426 public void processDataBinding() {
2427 if (model != null) {
2428 dateControleEditor.setDate(model.getControlDate());
2429 }
2430 }
2431
2432 @Override
2433 public void removeDataBinding() {
2434 if (model != null) {
2435 model.removePropertyChangeListener("controlDate", this);
2436 }
2437 }
2438 });
2439 registerDataBinding(new DefaultJAXXBinding(this, BINDING_DATE_VALIDATION_EDITOR_DATE, true) {
2440
2441 @Override
2442 public void applyDataBinding() {
2443 if (model != null) {
2444 model.addPropertyChangeListener("validationDate", this);
2445 }
2446 }
2447
2448 @Override
2449 public void processDataBinding() {
2450 if (model != null) {
2451 dateValidationEditor.setDate(model.getValidationDate());
2452 }
2453 }
2454
2455 @Override
2456 public void removeDataBinding() {
2457 if (model != null) {
2458 model.removePropertyChangeListener("validationDate", this);
2459 }
2460 }
2461 });
2462 registerDataBinding(new DefaultJAXXBinding(this, BINDING_COMMENTAIRE_VALIDATION_TEXT, true) {
2463
2464 @Override
2465 public void applyDataBinding() {
2466 if (model != null) {
2467 model.addPropertyChangeListener("validationComment", this);
2468 }
2469 }
2470
2471 @Override
2472 public void processDataBinding() {
2473 if (model != null) {
2474 SwingUtil.setText(commentaireValidation, model.getValidationComment());
2475 }
2476 }
2477
2478 @Override
2479 public void removeDataBinding() {
2480 if (model != null) {
2481 model.removePropertyChangeListener("validationComment", this);
2482 }
2483 }
2484 });
2485 }
2486
2487 }