View Javadoc
1   package fr.ifremer.dali.ui.swing.content.manage.referential.samplingequipment.menu;
2   
3   import fr.ifremer.dali.dto.referential.SamplingEquipmentDTO;
4   import fr.ifremer.dali.dto.referential.UnitDTO;
5   import fr.ifremer.dali.ui.swing.DaliHelpBroker;
6   import fr.ifremer.dali.ui.swing.DaliUIContext;
7   import fr.ifremer.dali.ui.swing.content.manage.filter.element.menu.ApplyFilterUI;
8   import fr.ifremer.dali.ui.swing.content.manage.referential.menu.ReferentialMenuUI;
9   import fr.ifremer.dali.ui.swing.util.DaliUI;
10  import fr.ifremer.quadrige3.ui.core.dto.referential.StatusDTO;
11  import fr.ifremer.quadrige3.ui.swing.ApplicationUI;
12  import fr.ifremer.quadrige3.ui.swing.ApplicationUIUtil;
13  import fr.ifremer.quadrige3.ui.swing.component.bean.ExtendedComboBox;
14  import java.awt.BorderLayout;
15  import java.awt.Component;
16  import java.awt.Container;
17  import java.awt.GridBagConstraints;
18  import java.awt.GridLayout;
19  import java.awt.Insets;
20  import java.awt.LayoutManager;
21  import java.util.ArrayList;
22  import java.util.HashMap;
23  import java.util.List;
24  import java.util.Map;
25  import java.util.TreeMap;
26  import javax.swing.BorderFactory;
27  import javax.swing.Box;
28  import javax.swing.BoxLayout;
29  import javax.swing.JButton;
30  import javax.swing.JLabel;
31  import javax.swing.JPanel;
32  import javax.swing.SwingConstants;
33  import jaxx.runtime.JAXXBinding;
34  import jaxx.runtime.JAXXContext;
35  import jaxx.runtime.JAXXObject;
36  import jaxx.runtime.JAXXObjectDescriptor;
37  import jaxx.runtime.JAXXUtil;
38  import jaxx.runtime.SwingUtil;
39  import jaxx.runtime.binding.DefaultJAXXBinding;
40  import jaxx.runtime.context.DefaultJAXXContext;
41  import jaxx.runtime.swing.Table;
42  import jaxx.runtime.swing.help.JAXXHelpUI;
43  import org.apache.commons.logging.Log;
44  import org.apache.commons.logging.LogFactory;
45  import static org.nuiton.i18n.I18n.t;
46  
47  public class SamplingEquipmentsMenuUI extends JPanel implements JAXXHelpUI<DaliHelpBroker>, ReferentialMenuUI<SamplingEquipmentsMenuUIModel, SamplingEquipmentsMenuUIHandler>, JAXXObject {
48  
49      /*-----------------------------------------------------------------------*/
50      /*------------------ Constants for all public bindings ------------------*/
51      /*-----------------------------------------------------------------------*/
52  
53      public static final String BINDING_NAME_COMBO_SELECTED_ITEM = "nameCombo.selectedItem";
54      public static final String BINDING_STATUS_COMBO_SELECTED_ITEM = "statusCombo.selectedItem";
55  
56      /*-----------------------------------------------------------------------*/
57      /*------------------------- Other static fields -------------------------*/
58      /*-----------------------------------------------------------------------*/
59  
60      private static final String $jaxxObjectDescriptor = "H4sIAAAAAAAAAL1Wz28bRRSemPxynPRHkkZBDaVNK5EgGPNDHFCANkkT1VUCqEmliBxgvDt2pox3NzOzZK2oiP+AXrnBFXFBcOOEOHDmwAXxLyDEgSvivdn1rjfexC6RsOSJd+Z77/vem5lv880fZEQrcuMRiyKqQs+IFqf3V/f23qs/4o65y7WjRGB8ReLPUImU9knFTee1ITf3tzC8moRX1/1W4Hvc64pe2SIT2rQl1wecG0Oey0c4Wld30uWVKAhVJ2sqqijrl3/9WXrifvZViZAoAHUXoZTr/aKySoa3SEm4hkwD0yesKpnXBBlKeE3QO4Vz65Jp/S5r8UPyKRnbIqMBU5DMkMXBS7Y5bHwUGDJ+6/77zOPyFUOchqKioXiLK+oyKWgoqD4Cdur4noFktMU81uRU8QZHWsEk1awVSMDww1AELQviXkh3kumNzrTehumHtSCw1KOGjLR8l0tDDv4H1m2kyqhH68r/mCtDXjiV+y483YOYNYvMQsvIYxsG24Q7EiUBcRcRVU7BUywIZHtTSMPVw5ohtUFLbdgQyiXPalvtzoUE0ynPBQ1IxwjfS5TN585cTLHL6pLn4zp7/yo+z+IwnxXqwSnbYvXeQu0koq7mwXDm6r4hb3cVeRgyV4kmf7270uRk0jpnHt2IoG6XuzZ4zY/yeTsCXysQWNGGmVCnap7H4ebJZZsXpxbzy1fSlq2FxvieTrdvNt+jiiM5UzHIkJlcJ+JZBC6n+EkNcOcgW3o5WVfkam5XwGNo5jGZCQztkxEVwjRs436vLT2ApdiQ5k8YEia0q//Mzfz6w+/fb3ZcaBq4rxRCu0wU3CFQfgC3QiD1xdiCQiNkdZsFK/ukHHfMOuxCgbCdZBnEAd9lDKcYTu8xfQApRsZ++/GnuY9+eYaUNsmE9Jm7yRBfI2VzoKALvnSj4PYdq2jyaBzGS/AdNmQivg54fg08qxD+TAH+6C53fMUgB7hJg0kN82Wcf8A1mnoCHcaDZsjYsTWcxxG0bqGgdan+evnnv2d2vr3Tad8QlPPsqfCshSMfkFHhgf1wa+OJQxfadiXQPHT9zImLvJmAO186eT8SJ3rDjm/2dGsIzc1XLprb7eM1+ytuc5s6ijPDd4WR3I1XlszSovUhsJ+GaMY+YxCwuLwMjUKOddsB/LVBepwm6COnBFdY4gXdxD2qHKc28Rh3h0ewSdNWQHL02hQRRcSZHQ3AORmr5G7N8JYh1+Kdp01uel4QS8sgZbxDb8hlfRJxqhpbyNN1YOq4y5WyHszmexBjini7Pe/p+zDT1Qeb52Txo32ZB6oZruz0h/jqEw7Do7JqDwzyr6OXxo/UwaMO/BPMPtfwFQjO17m6tjHXbGNiAI2NlVo/pjJ+M1WM78tdEexa+MKpcCOCwqq6zP2/VjV7vGOZzipruCE8N61qvkBmYT1zBcBTKsm9dvqVgi4hWdsHMLnwlssMu14HgXDq3+nJPYTjTN+MOP05Dk+KMywMoGkcjXq3HfAz8tw4t5JbA2X44owMS+fW8OIA3ZiAvW966EB7Z2R6aSAtX5+RoTqAlmHhxP/MnEvFd31U/AvIc3dw/A0AAA==";
61      private static final Log log = LogFactory.getLog(SamplingEquipmentsMenuUI.class);
62      private static final long serialVersionUID = 1L;
63  
64      /*-----------------------------------------------------------------------*/
65      /*--------------------------- Internal states ---------------------------*/
66      /*-----------------------------------------------------------------------*/
67  
68      protected List<Object> $activeBindings = new ArrayList<Object>();
69      protected Map<String, Object> $bindingSources = new HashMap<String, Object>();
70      protected final Map<String, JAXXBinding> $bindings = new TreeMap<String, JAXXBinding>();
71      protected Map<String, Object> $objectMap = new HashMap<String, Object>();
72      protected Map<?, ?> $previousValues = new HashMap<Object, Object>();
73      private boolean allComponentsCreated;
74      protected final JAXXContext delegateContext = new DefaultJAXXContext();
75  
76      /*-----------------------------------------------------------------------*/
77      /*------------------------ Protected components  ------------------------*/
78      /*-----------------------------------------------------------------------*/
79  
80      protected ApplyFilterUI applyFilterUI;
81      protected DaliHelpBroker broker;
82      protected JButton clearButton;
83      protected final SamplingEquipmentsMenuUIHandler handler = createHandler();
84      protected JPanel menuPanel;
85      protected SamplingEquipmentsMenuUIModel model;
86      protected ExtendedComboBox<SamplingEquipmentDTO> nameCombo;
87      protected JLabel nameLabel;
88      protected JButton searchButton;
89      protected JPanel selectionButtonsPanel;
90      protected Table selectionPanel;
91      protected ExtendedComboBox<StatusDTO> statusCombo;
92      protected JLabel statusLabel;
93  
94      /*-----------------------------------------------------------------------*/
95      /*------------------------- Private components  -------------------------*/
96      /*-----------------------------------------------------------------------*/
97  
98      private SamplingEquipmentsMenuUI $JPanel0 = this;
99      private JPanel $JPanel1;
100     private JPanel $JPanel2;
101 
102     /*-----------------------------------------------------------------------*/
103     /*---------------------------- Constructors  ----------------------------*/
104     /*-----------------------------------------------------------------------*/
105 
106     public SamplingEquipmentsMenuUI(ApplicationUI parentUI) {
107         ApplicationUIUtil.setParentUI(this, parentUI);
108             $initialize();
109     }
110 
111     public SamplingEquipmentsMenuUI() {
112         $initialize();
113     }
114 
115     public SamplingEquipmentsMenuUI(JAXXContext parentContext) {
116         JAXXUtil.initContext(this, parentContext);
117         $initialize();
118     }
119 
120     public SamplingEquipmentsMenuUI(boolean param0) {
121         super(param0);
122         $initialize();
123     }
124 
125     public SamplingEquipmentsMenuUI(JAXXContext parentContext, boolean param1) {
126         super(param1);
127         JAXXUtil.initContext(this, parentContext);
128         $initialize();
129     }
130 
131     public SamplingEquipmentsMenuUI(LayoutManager param0) {
132         super(param0);
133         $initialize();
134     }
135 
136     public SamplingEquipmentsMenuUI(JAXXContext parentContext, LayoutManager param1) {
137         super(param1);
138         JAXXUtil.initContext(this, parentContext);
139         $initialize();
140     }
141 
142     public SamplingEquipmentsMenuUI(LayoutManager param0, boolean param1) {
143         super(param0 ,param1);
144         $initialize();
145     }
146 
147     public SamplingEquipmentsMenuUI(JAXXContext parentContext, LayoutManager param1, boolean param2) {
148         super(param1 ,param2);
149         JAXXUtil.initContext(this, parentContext);
150         $initialize();
151     }
152 
153     /*-----------------------------------------------------------------------*/
154     /*--------------------------- Statics methods ---------------------------*/
155     /*-----------------------------------------------------------------------*/
156 
157     public static JAXXObjectDescriptor $getJAXXObjectDescriptor() {
158         return JAXXUtil.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor);
159     }
160 
161     /*-----------------------------------------------------------------------*/
162     /*---------------------- JAXXObject implementation ----------------------*/
163     /*-----------------------------------------------------------------------*/
164 
165     @Override
166     public void applyDataBinding(String $binding) {
167         if (allComponentsCreated && $bindings.containsKey($binding)) {
168             getDataBinding($binding).applyDataBinding();
169         }
170         processDataBinding($binding);
171     }
172 
173     @Override
174     public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
175         super.firePropertyChange(propertyName, oldValue, newValue);
176     }
177 
178     @Override
179     public Map<String, Object> get$objectMap() {
180         return $objectMap;
181     }
182 
183     @Override
184     public JAXXBinding getDataBinding(String bindingId) {
185         return $bindings.get(bindingId);
186     }
187 
188     @Override
189     public JAXXBinding[] getDataBindings() {
190         return $bindings.values().toArray(new JAXXBinding[$bindings.size()]);
191     }
192 
193     @Override
194     public Object getObjectById(String id) {
195         return $objectMap.get(id);
196     }
197 
198     @Override
199     public void processDataBinding(String $binding, boolean $force) {
200         if (!$force && $activeBindings.contains($binding)) { 
201             return;
202         }
203         $activeBindings.add($binding);
204         try {
205             if (allComponentsCreated && $bindings.containsKey($binding)) {
206                 getDataBinding($binding).processDataBinding();
207             }
208         } finally {
209             $activeBindings.remove($binding);
210         }
211     }
212 
213     @Override
214     public void processDataBinding(String $binding) {
215         processDataBinding($binding, false);
216     }
217 
218     @Override
219     public void registerDataBinding(JAXXBinding binding) {
220         $bindings.put(binding.getId(), binding);
221     }
222 
223     @Override
224     public void removeDataBinding(String $binding) {
225         if (allComponentsCreated && $bindings.containsKey($binding)) {
226             getDataBinding($binding).removeDataBinding();
227         }
228     }
229 
230     /*-----------------------------------------------------------------------*/
231     /*--------------------- JAXXContext implementation  ---------------------*/
232     /*-----------------------------------------------------------------------*/
233 
234     @Override
235     public <T> T getContextValue(Class<T> clazz) {
236         return delegateContext.getContextValue(clazz, null);
237     }
238 
239     @Override
240     public <T> T getContextValue(Class<T> clazz, String name) {
241         return delegateContext.getContextValue(clazz, name);
242     }
243 
244     @Override
245     public JAXXContext getDelegateContext() {
246         return delegateContext;
247     }
248 
249     @Override
250     public <O extends Container> O getParentContainer(Class<O> clazz) {
251         return SwingUtil.getParentContainer(this, clazz);
252     }
253 
254     @Override
255     public <O extends Container> O getParentContainer(Object source, Class<O> clazz) {
256         return SwingUtil.getParentContainer(source, clazz);
257     }
258 
259     @Override
260     public <T> void removeContextValue(Class<T> clazz) {
261         delegateContext.removeContextValue(clazz, null);
262     }
263 
264     @Override
265     public <T> void removeContextValue(Class<T> clazz, String name) {
266         delegateContext.removeContextValue(clazz, name);
267     }
268 
269     @Override
270     public <T> void setContextValue(T o) {
271         delegateContext.setContextValue(o, null);
272     }
273 
274     @Override
275     public <T> void setContextValue(T o, String name) {
276         delegateContext.setContextValue(o, name);
277     }
278 
279     /*-----------------------------------------------------------------------*/
280     /*----------------------- Public acessor methods  -----------------------*/
281     /*-----------------------------------------------------------------------*/
282 
283     public ApplyFilterUI getApplyFilterUI() {
284         return applyFilterUI;
285     }
286 
287     public DaliHelpBroker getBroker() {
288         return broker;
289     }
290 
291     public JButton getClearButton() {
292         return clearButton;
293     }
294 
295     public SamplingEquipmentsMenuUIHandler getHandler() {
296         return handler;
297     }
298 
299     public JPanel getMenuPanel() {
300         return menuPanel;
301     }
302 
303     public SamplingEquipmentsMenuUIModel getModel() {
304         return model;
305     }
306 
307     public ExtendedComboBox<SamplingEquipmentDTO> getNameCombo() {
308         return nameCombo;
309     }
310 
311     public JLabel getNameLabel() {
312         return nameLabel;
313     }
314 
315     public JButton getSearchButton() {
316         return searchButton;
317     }
318 
319     public JPanel getSelectionButtonsPanel() {
320         return selectionButtonsPanel;
321     }
322 
323     public Table getSelectionPanel() {
324         return selectionPanel;
325     }
326 
327     public ExtendedComboBox<StatusDTO> getStatusCombo() {
328         return statusCombo;
329     }
330 
331     public JLabel getStatusLabel() {
332         return statusLabel;
333     }
334 
335     /*-----------------------------------------------------------------------*/
336     /*---------------------------- Other methods ----------------------------*/
337     /*-----------------------------------------------------------------------*/
338 
339     @Override
340     public void registerHelpId(DaliHelpBroker broker, Component component, String helpId) {
341         broker.installUI(component, helpId);
342     }
343 
344     @Override
345     public void showHelp(String helpId) {
346         getBroker().showHelp(this, helpId);
347     }
348 
349     /*-----------------------------------------------------------------------*/
350     /*--------------------- Protected acessors methods  ---------------------*/
351     /*-----------------------------------------------------------------------*/
352 
353     protected JPanel get$JPanel1() {
354         return $JPanel1;
355     }
356 
357     protected JPanel get$JPanel2() {
358         return $JPanel2;
359     }
360 
361     /*-----------------------------------------------------------------------*/
362     /*--------------------- Components creation methods ---------------------*/
363     /*-----------------------------------------------------------------------*/
364 
365     protected void addChildrenToMenuPanel() {
366         if (!allComponentsCreated) {
367             return;
368         }
369         menuPanel.add(applyFilterUI);
370         menuPanel.add(selectionPanel);
371         menuPanel.add(selectionButtonsPanel);
372     }
373 
374     protected void addChildrenToSelectionButtonsPanel() {
375         if (!allComponentsCreated) {
376             return;
377         }
378         selectionButtonsPanel.add(clearButton);
379         selectionButtonsPanel.add(searchButton);
380     }
381 
382     protected void addChildrenToSelectionPanel() {
383         if (!allComponentsCreated) {
384             return;
385         }
386         selectionPanel.add($JPanel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
387         selectionPanel.add($JPanel2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0));
388     }
389 
390     protected void createApplyFilterUI() {
391         $objectMap.put("applyFilterUI", applyFilterUI = new ApplyFilterUI(this));
392         
393         applyFilterUI.setName("applyFilterUI");
394     }
395 
396     protected void createBroker() {
397         $objectMap.put("broker", broker = new DaliHelpBroker("dali.home.help"));
398     }
399 
400     protected void createClearButton() {
401         $objectMap.put("clearButton", clearButton = new JButton());
402         
403         clearButton.setName("clearButton");
404         clearButton.setText(t("dali.action.search.clear.label"));
405         clearButton.setToolTipText(t("dali.action.search.clear.tip"));
406         clearButton.putClientProperty("applicationAction", ClearAction.class);
407     }
408 
409     protected SamplingEquipmentsMenuUIHandler createHandler() {
410         return new SamplingEquipmentsMenuUIHandler();
411     }
412 
413     protected void createMenuPanel() {
414         $objectMap.put("menuPanel", menuPanel = new JPanel());
415         
416         menuPanel.setName("menuPanel");
417         menuPanel.setLayout(new BoxLayout(menuPanel, BoxLayout.PAGE_AXIS));
418     }
419 
420     protected void createModel() {
421         $objectMap.put("model", model = getContextValue(SamplingEquipmentsMenuUIModel.class));
422     }
423 
424     protected void createNameCombo() {
425         $objectMap.put("nameCombo", nameCombo = new ExtendedComboBox<SamplingEquipmentDTO>(this));
426         
427         nameCombo.setName("nameCombo");
428         nameCombo.setFilterable(true);
429         nameCombo.setShowDecorator(false);
430         nameCombo.setProperty("samplingEquipment");
431         nameCombo.setShowReset(true);
432     }
433 
434     protected void createNameLabel() {
435         $objectMap.put("nameLabel", nameLabel = new JLabel());
436         
437         nameLabel.setName("nameLabel");
438         nameLabel.setText(t("dali.property.name"));
439     }
440 
441     protected void createSearchButton() {
442         $objectMap.put("searchButton", searchButton = new JButton());
443         
444         searchButton.setName("searchButton");
445         searchButton.setText(t("dali.action.search.label"));
446         searchButton.setToolTipText(t("dali.action.search.tip"));
447         searchButton.putClientProperty("applicationAction", SearchAction.class);
448     }
449 
450     protected void createSelectionButtonsPanel() {
451         $objectMap.put("selectionButtonsPanel", selectionButtonsPanel = new JPanel());
452         
453         selectionButtonsPanel.setName("selectionButtonsPanel");
454         selectionButtonsPanel.setLayout(new GridLayout(1,0));
455     }
456 
457     protected void createSelectionPanel() {
458         $objectMap.put("selectionPanel", selectionPanel = new Table());
459         
460         selectionPanel.setName("selectionPanel");
461     }
462 
463     protected void createStatusCombo() {
464         $objectMap.put("statusCombo", statusCombo = new ExtendedComboBox<StatusDTO>(this));
465         
466         statusCombo.setName("statusCombo");
467         statusCombo.setFilterable(true);
468         statusCombo.setShowDecorator(false);
469         statusCombo.setProperty("status");
470         statusCombo.setShowReset(true);
471     }
472 
473     protected void createStatusLabel() {
474         $objectMap.put("statusLabel", statusLabel = new JLabel());
475         
476         statusLabel.setName("statusLabel");
477         statusLabel.setText(t("dali.property.status"));
478     }
479 
480     /*-----------------------------------------------------------------------*/
481     /*------------------------ Internal jaxx methods ------------------------*/
482     /*-----------------------------------------------------------------------*/
483 
484     private void $completeSetup() {
485         allComponentsCreated = true;
486         if (log.isDebugEnabled()) {
487             log.debug(this);
488         }
489         // inline complete setup of $JPanel0
490         add(menuPanel);
491         addChildrenToMenuPanel();
492         addChildrenToSelectionPanel();
493         // inline complete setup of $JPanel1
494         $JPanel1.add(nameLabel, BorderLayout.PAGE_START);
495         $JPanel1.add(nameCombo, BorderLayout.CENTER);
496         // inline complete setup of $JPanel2
497         $JPanel2.add(statusLabel, BorderLayout.PAGE_START);
498         $JPanel2.add(statusCombo, BorderLayout.CENTER);
499         addChildrenToSelectionButtonsPanel();
500         
501         // apply 2 data bindings
502         JAXXUtil.applyDataBinding(this, $bindings.keySet());
503         
504         // apply 15 property setters
505         nameCombo.setBeanType(SamplingEquipmentDTO.class);
506         statusCombo.setBeanType(StatusDTO.class);
507         clearButton.setAlignmentX(Component.CENTER_ALIGNMENT);
508         searchButton.setAlignmentX(Component.CENTER_ALIGNMENT);
509         selectionPanel.setBorder(BorderFactory.createTitledBorder(t("dali.config.menu.title")));
510         nameLabel.setLabelFor(nameCombo);
511         nameCombo.setBean(model);
512         statusLabel.setLabelFor(statusCombo);
513         statusCombo.setBean(model);
514         clearButton.setIcon(SwingUtil.createActionIcon("reset"));
515         searchButton.setIcon(SwingUtil.createActionIcon("find"));
516     }
517 
518     private void $initialize() {
519         if (allComponentsCreated) {
520             return;
521         }
522         if (log.isDebugEnabled()) {
523             log.debug(this);
524         }
525         handler.beforeInit(this);
526         $objectMap.put("$JPanel0", $JPanel0);
527         createModel();
528         createBroker();
529         createMenuPanel();
530         createApplyFilterUI();
531         createSelectionPanel();
532         // inline creation of $JPanel1
533         $objectMap.put("$JPanel1", $JPanel1 = new JPanel());
534         
535         $JPanel1.setName("$JPanel1");
536         $JPanel1.setLayout(new BorderLayout());
537         createNameLabel();
538         createNameCombo();
539         // inline creation of $JPanel2
540         $objectMap.put("$JPanel2", $JPanel2 = new JPanel());
541         
542         $JPanel2.setName("$JPanel2");
543         $JPanel2.setLayout(new BorderLayout());
544         createStatusLabel();
545         createStatusCombo();
546         createSelectionButtonsPanel();
547         createClearButton();
548         createSearchButton();
549         // inline creation of $JPanel0
550         setName("$JPanel0");
551         
552         // registers 2 data bindings
553         $registerDefaultBindings();
554         $completeSetup();
555         handler.afterInit(this);
556     }
557 
558     private void $registerDefaultBindings() {
559         // register 2 data bindings
560         registerDataBinding(new DefaultJAXXBinding(this, BINDING_NAME_COMBO_SELECTED_ITEM, true) {
561         
562             @Override
563             public void applyDataBinding() {
564                 if (model != null) {
565                     model.addPropertyChangeListener("samplingEquipment", this);
566                 }
567             }
568         
569             @Override
570             public void processDataBinding() {
571                 if (model != null) {
572                     nameCombo.setSelectedItem(model.getSamplingEquipment());
573                 }
574             }
575         
576             @Override
577             public void removeDataBinding() {
578                 if (model != null) {
579                     model.removePropertyChangeListener("samplingEquipment", this);
580                 }
581             }
582         });
583         registerDataBinding(new DefaultJAXXBinding(this, BINDING_STATUS_COMBO_SELECTED_ITEM, true) {
584         
585             @Override
586             public void applyDataBinding() {
587                 if (model != null) {
588                     model.addPropertyChangeListener("status", this);
589                 }
590             }
591         
592             @Override
593             public void processDataBinding() {
594                 if (model != null) {
595                     statusCombo.setSelectedItem(model.getStatus());
596                 }
597             }
598         
599             @Override
600             public void removeDataBinding() {
601                 if (model != null) {
602                     model.removePropertyChangeListener("status", this);
603                 }
604             }
605         });
606     }
607 
608 }