KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > tax > beans > customizer > TreeAttlistDeclAttributeDefCustomizer


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xml.tax.beans.customizer;
20
21 import java.beans.PropertyChangeEvent JavaDoc;
22
23 import org.netbeans.tax.TreeException;
24 import org.netbeans.tax.TreeAttlistDeclAttributeDef;
25
26 import org.netbeans.modules.xml.tax.util.TAXUtil;
27
28 /**
29  *
30  * @author Libor Kramolis
31  * @version 0.1
32  */

33 public class TreeAttlistDeclAttributeDefCustomizer extends AbstractTreeCustomizer {
34
35     /** Serial Version UID */
36     private static final long serialVersionUID =2877621716093964464L;
37
38
39     //
40
// init
41
//
42

43     /** */
44     public TreeAttlistDeclAttributeDefCustomizer () {
45         super ();
46         
47         initComponents ();
48         
49         elementNameLabel.setDisplayedMnemonic (Util.THIS.getChar ("TreeAttributeDeclCustomizer.elemNameLabel.mne")); // NOI18N
50
nameLabel.setDisplayedMnemonic (Util.THIS.getChar ("MNE_xmlName")); // NOI18N
51
typeLabel.setDisplayedMnemonic (Util.THIS.getChar ("MNE_dtdAttDefType")); // NOI18N
52
enumeratedLabel.setDisplayedMnemonic (Util.THIS.getChar ("DTDAttDefNode.enumeratedLabel.mne")); // NOI18N
53
defaultTypeLabel.setDisplayedMnemonic (Util.THIS.getChar ("DTDAttDefNode.defaultTypeLabel.mne")); // NOI18N
54
defaultValueLabel.setDisplayedMnemonic (Util.THIS.getChar ("DTDAttDefNode.defaultValueLabel.mne")); // NOI18N
55

56         initAccessibility ();
57     }
58     
59     //
60
// itself
61
//
62

63     /**
64      */

65     protected final TreeAttlistDeclAttributeDef getAttributeDef () {
66         return (TreeAttlistDeclAttributeDef)getTreeObject ();
67     }
68     
69     /**
70      */

71     protected final void safePropertyChange (PropertyChangeEvent JavaDoc pche) {
72         super.safePropertyChange (pche);
73         
74         if (pche.getPropertyName ().equals (TreeAttlistDeclAttributeDef.PROP_NAME)) {
75             updateNameComponent ();
76         } else if (pche.getPropertyName ().equals (TreeAttlistDeclAttributeDef.PROP_TYPE)) {
77             updateTypeComponent ();
78         } else if (pche.getPropertyName ().equals (TreeAttlistDeclAttributeDef.PROP_ENUMERATED_TYPE)) {
79             updateEnumeratedTypeComponent ();
80         } else if (pche.getPropertyName ().equals (TreeAttlistDeclAttributeDef.PROP_DEFAULT_TYPE)) {
81             updateDefaultTypeComponent ();
82         } else if (pche.getPropertyName ().equals (TreeAttlistDeclAttributeDef.PROP_DEFAULT_VALUE)) {
83             updateDefaultValueComponent ();
84         }
85     }
86     
87     
88     /**
89      */

90     protected final void updateElementNameComponent () {
91         elementNameField.setText (getAttributeDef ().getElementName ());
92     }
93     
94     /**
95      */

96     protected final void updateNameComponent () {
97         nameField.setText (getAttributeDef ().getName ());
98     }
99     
100     /**
101      */

102     protected final void updateAttributeDefName () {
103         try {
104             getAttributeDef ().setName (nameField.getText ());
105         } catch (TreeException exc) {
106             updateNameComponent ();
107             TAXUtil.notifyTreeException (exc);
108         }
109     }
110     
111     /**
112      */

113     protected final void updateTypeComponent () {
114         typeField.setText (getAttributeDef ().getTypeName ());
115     }
116     
117     /**
118      */

119     protected final void updateAttributeDefType () {
120         try {
121             getAttributeDef ().setType
122                 (TreeAttlistDeclAttributeDef.findType (text2null (typeField.getText ())),
123                  getAttributeDef ().getEnumeratedType ());
124         } catch (TreeException exc) {
125             updateTypeComponent ();
126             TAXUtil.notifyTreeException (exc);
127         }
128     }
129     
130     /**
131      */

132     protected final void updateEnumeratedTypeComponent () {
133         enumeratedField.setText (null2text (getAttributeDef ().getEnumeratedTypeString ()));
134     }
135     
136     /**
137      */

138     protected final void updateAttributeDefEnumeratedType () {
139         try {
140             getAttributeDef ().setType
141                 (getAttributeDef ().getType (),
142                  TreeAttlistDeclAttributeDef.createEnumeratedType (text2null (enumeratedField.getText ())));
143         } catch (TreeException exc) {
144             updateEnumeratedTypeComponent ();
145             TAXUtil.notifyTreeException (exc);
146         }
147     }
148     
149     /**
150      */

151     protected final void updateDefaultTypeComponent () {
152         defaultTypeField.setText (null2text (getAttributeDef ().getDefaultTypeName ()));
153     }
154     
155     /**
156      */

157     protected final void updateAttributeDefDefaultType () {
158         try {
159             getAttributeDef ().setDefaultType
160                 (TreeAttlistDeclAttributeDef.findDefaultType (text2null (defaultTypeField.getText ())),
161                  getAttributeDef ().getDefaultValue ());
162         } catch (TreeException exc) {
163             updateDefaultTypeComponent ();
164             TAXUtil.notifyTreeException (exc);
165         }
166     }
167     
168     /**
169      */

170     protected final void updateDefaultValueComponent () {
171         defaultValueField.setText (null2text (getAttributeDef ().getDefaultValue ()));
172     }
173     
174     /**
175      */

176     protected final void updateAttributeDefDefaultValue () {
177         try {
178             short defaultType = getAttributeDef ().getDefaultType ();
179             String JavaDoc defaultValue = text2null (defaultValueField.getText ());
180             if ( defaultValue == null ) {
181                 if ( ( defaultType == TreeAttlistDeclAttributeDef.DEFAULT_TYPE_NULL ) ||
182                      ( defaultType == TreeAttlistDeclAttributeDef.DEFAULT_TYPE_FIXED ) ) {
183                     defaultValue = "";
184                 }
185             }
186             getAttributeDef ().setDefaultType (defaultType, defaultValue);
187         } catch (TreeException exc) {
188             updateDefaultValueComponent ();
189             TAXUtil.notifyTreeException (exc);
190         }
191     }
192     
193     
194     /**
195      */

196     protected final void initComponentValues () {
197         updateElementNameComponent ();
198         updateNameComponent ();
199         updateTypeComponent ();
200         updateEnumeratedTypeComponent ();
201         updateDefaultTypeComponent ();
202         updateDefaultValueComponent ();
203     }
204     
205     
206     /**
207      */

208     protected final void updateReadOnlyStatus (boolean editable) {
209         nameField.setEditable (editable);
210         typeField.setEditable (editable);
211         enumeratedField.setEditable (editable);
212         defaultTypeField.setEditable (editable);
213         defaultValueField.setEditable (editable);
214     }
215     
216     
217     /** This method is called from within the constructor to
218      * initialize the form.
219      * WARNING: Do NOT modify this code. The content of this method is
220      * always regenerated by the FormEditor.
221      */

222     private void initComponents() {//GEN-BEGIN:initComponents
223
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
224
225         elementNameLabel = new javax.swing.JLabel JavaDoc();
226         elementNameField = new javax.swing.JTextField JavaDoc();
227         nameLabel = new javax.swing.JLabel JavaDoc();
228         nameField = new javax.swing.JTextField JavaDoc();
229         typeLabel = new javax.swing.JLabel JavaDoc();
230         typeField = new javax.swing.JTextField JavaDoc();
231         enumeratedLabel = new javax.swing.JLabel JavaDoc();
232         enumeratedField = new javax.swing.JTextField JavaDoc();
233         defaultTypeLabel = new javax.swing.JLabel JavaDoc();
234         defaultTypeField = new javax.swing.JTextField JavaDoc();
235         defaultValueLabel = new javax.swing.JLabel JavaDoc();
236         defaultValueField = new javax.swing.JTextField JavaDoc();
237         fillPanel = new javax.swing.JPanel JavaDoc();
238
239         setLayout(new java.awt.GridBagLayout JavaDoc());
240
241         elementNameLabel.setText(Util.THIS.getString ("TreeAttributeDeclCustomizer.elemNameLabel.text"));
242         elementNameLabel.setLabelFor(elementNameField);
243         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
244         gridBagConstraints.gridx = 0;
245         gridBagConstraints.gridy = 0;
246         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
247         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
248         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
249         add(elementNameLabel, gridBagConstraints);
250
251         elementNameField.setEditable(false);
252         elementNameField.setColumns(20);
253         elementNameField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
254             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
255                 elementNameFieldFocusGained(evt);
256             }
257         });
258
259         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
260         gridBagConstraints.gridx = 1;
261         gridBagConstraints.gridy = 0;
262         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
263         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
264         gridBagConstraints.weightx = 1.0;
265         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 11);
266         add(elementNameField, gridBagConstraints);
267
268         nameLabel.setText(Util.THIS.getString ("PROP_xmlName"));
269         nameLabel.setLabelFor(nameField);
270         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
271         gridBagConstraints.gridx = 0;
272         gridBagConstraints.gridy = 1;
273         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
274         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
275         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
276         add(nameLabel, gridBagConstraints);
277
278         nameField.setColumns(20);
279         nameField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
280             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
281                 nameFieldActionPerformed(evt);
282             }
283         });
284
285         nameField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
286             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
287                 nameFieldFocusGained(evt);
288             }
289             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
290                 nameFieldFocusLost(evt);
291             }
292         });
293
294         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
295         gridBagConstraints.gridx = 1;
296         gridBagConstraints.gridy = 1;
297         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
298         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
299         gridBagConstraints.weightx = 1.0;
300         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 11);
301         add(nameField, gridBagConstraints);
302
303         typeLabel.setText(Util.THIS.getString ("PROP_dtdAttDefType"));
304         typeLabel.setLabelFor(typeField);
305         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
306         gridBagConstraints.gridx = 0;
307         gridBagConstraints.gridy = 2;
308         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
309         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
310         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
311         add(typeLabel, gridBagConstraints);
312
313         typeField.setColumns(20);
314         typeField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
315             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
316                 typeFieldActionPerformed(evt);
317             }
318         });
319
320         typeField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
321             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
322                 typeFieldFocusGained(evt);
323             }
324             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
325                 typeFieldFocusLost(evt);
326             }
327         });
328
329         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
330         gridBagConstraints.gridx = 1;
331         gridBagConstraints.gridy = 2;
332         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
333         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
334         gridBagConstraints.weightx = 1.0;
335         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 11);
336         add(typeField, gridBagConstraints);
337
338         enumeratedLabel.setText(Util.THIS.getString ("DTDAttDefNode.enumeratedLabel.text"));
339         enumeratedLabel.setLabelFor(enumeratedField);
340         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
341         gridBagConstraints.gridx = 0;
342         gridBagConstraints.gridy = 3;
343         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
344         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
345         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
346         add(enumeratedLabel, gridBagConstraints);
347
348         enumeratedField.setColumns(20);
349         enumeratedField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
350             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
351                 enumeratedFieldActionPerformed(evt);
352             }
353         });
354
355         enumeratedField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
356             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
357                 enumeratedFieldFocusGained(evt);
358             }
359             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
360                 enumeratedFieldFocusLost(evt);
361             }
362         });
363
364         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
365         gridBagConstraints.gridx = 1;
366         gridBagConstraints.gridy = 3;
367         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
368         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
369         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 11);
370         add(enumeratedField, gridBagConstraints);
371
372         defaultTypeLabel.setText(Util.THIS.getString ("DTDAttDefNode.defaultTypeLabel.text"));
373         defaultTypeLabel.setLabelFor(defaultTypeField);
374         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
375         gridBagConstraints.gridx = 0;
376         gridBagConstraints.gridy = 4;
377         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
378         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
379         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
380         add(defaultTypeLabel, gridBagConstraints);
381
382         defaultTypeField.setColumns(20);
383         defaultTypeField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
384             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
385                 defaultTypeFieldActionPerformed(evt);
386             }
387         });
388
389         defaultTypeField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
390             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
391                 defaultTypeFieldFocusGained(evt);
392             }
393             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
394                 defaultTypeFieldFocusLost(evt);
395             }
396         });
397
398         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
399         gridBagConstraints.gridx = 1;
400         gridBagConstraints.gridy = 4;
401         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
402         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
403         gridBagConstraints.weightx = 1.0;
404         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 11);
405         add(defaultTypeField, gridBagConstraints);
406
407         defaultValueLabel.setText(Util.THIS.getString ("DTDAttDefNode.defaultValueLabel.text"));
408         defaultValueLabel.setLabelFor(defaultValueField);
409         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
410         gridBagConstraints.gridx = 0;
411         gridBagConstraints.gridy = 5;
412         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
413         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
414         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
415         add(defaultValueLabel, gridBagConstraints);
416
417         defaultValueField.setColumns(20);
418         defaultValueField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
419             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
420                 defaultValueFieldActionPerformed(evt);
421             }
422         });
423
424         defaultValueField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
425             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
426                 defaultValueFieldFocusGained(evt);
427             }
428             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
429                 defaultValueFieldFocusLost(evt);
430             }
431         });
432
433         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
434         gridBagConstraints.gridx = 1;
435         gridBagConstraints.gridy = 5;
436         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
437         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
438         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 11);
439         add(defaultValueField, gridBagConstraints);
440
441         fillPanel.setPreferredSize(new java.awt.Dimension JavaDoc(0, 0));
442         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
443         gridBagConstraints.gridx = 0;
444         gridBagConstraints.gridy = 6;
445         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
446         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
447         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
448         gridBagConstraints.weightx = 1.0;
449         gridBagConstraints.weighty = 1.0;
450         add(fillPanel, gridBagConstraints);
451
452     }//GEN-END:initComponents
453

454     private void defaultValueFieldFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_defaultValueFieldFocusGained
455
// Accessibility:
456
defaultValueField.selectAll ();
457     }//GEN-LAST:event_defaultValueFieldFocusGained
458

459     private void defaultTypeFieldFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_defaultTypeFieldFocusGained
460
// Accessibility:
461
defaultTypeField.selectAll ();
462     }//GEN-LAST:event_defaultTypeFieldFocusGained
463

464     private void enumeratedFieldFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_enumeratedFieldFocusGained
465
// Accessibility:
466
enumeratedField.selectAll ();
467     }//GEN-LAST:event_enumeratedFieldFocusGained
468

469     private void typeFieldFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_typeFieldFocusGained
470
// Accessibility:
471
typeField.selectAll ();
472     }//GEN-LAST:event_typeFieldFocusGained
473

474     private void nameFieldFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_nameFieldFocusGained
475
// Accessibility:
476
nameField.selectAll ();
477     }//GEN-LAST:event_nameFieldFocusGained
478

479     private void elementNameFieldFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_elementNameFieldFocusGained
480
// Accessibility:
481
elementNameField.selectAll ();
482     }//GEN-LAST:event_elementNameFieldFocusGained
483

484     private void defaultValueFieldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_defaultValueFieldActionPerformed
485
// Add your handling code here:
486
updateAttributeDefDefaultValue ();
487     }//GEN-LAST:event_defaultValueFieldActionPerformed
488

489     private void defaultValueFieldFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_defaultValueFieldFocusLost
490
// Add your handling code here:
491
updateAttributeDefDefaultValue ();
492     }//GEN-LAST:event_defaultValueFieldFocusLost
493

494     private void defaultTypeFieldFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_defaultTypeFieldFocusLost
495
// Add your handling code here:
496
updateAttributeDefDefaultType ();
497     }//GEN-LAST:event_defaultTypeFieldFocusLost
498

499     private void defaultTypeFieldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_defaultTypeFieldActionPerformed
500
// Add your handling code here:
501
updateAttributeDefDefaultType ();
502     }//GEN-LAST:event_defaultTypeFieldActionPerformed
503

504     private void enumeratedFieldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_enumeratedFieldActionPerformed
505
// Add your handling code here:
506
updateAttributeDefEnumeratedType ();
507     }//GEN-LAST:event_enumeratedFieldActionPerformed
508

509     private void enumeratedFieldFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_enumeratedFieldFocusLost
510
// Add your handling code here:
511
updateAttributeDefEnumeratedType ();
512     }//GEN-LAST:event_enumeratedFieldFocusLost
513

514     private void typeFieldFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_typeFieldFocusLost
515
// Add your handling code here:
516
updateAttributeDefType ();
517     }//GEN-LAST:event_typeFieldFocusLost
518

519     private void typeFieldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_typeFieldActionPerformed
520
// Add your handling code here:
521
updateAttributeDefType ();
522     }//GEN-LAST:event_typeFieldActionPerformed
523

524     private void nameFieldFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_nameFieldFocusLost
525
// Add your handling code here:
526
updateAttributeDefName ();
527     }//GEN-LAST:event_nameFieldFocusLost
528

529     private void nameFieldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_nameFieldActionPerformed
530
// Add your handling code here:
531
updateAttributeDefName ();
532     }//GEN-LAST:event_nameFieldActionPerformed
533

534     // Variables declaration - do not modify//GEN-BEGIN:variables
535
private javax.swing.JLabel JavaDoc nameLabel;
536     private javax.swing.JLabel JavaDoc enumeratedLabel;
537     private javax.swing.JTextField JavaDoc nameField;
538     private javax.swing.JLabel JavaDoc defaultTypeLabel;
539     private javax.swing.JTextField JavaDoc enumeratedField;
540     private javax.swing.JLabel JavaDoc typeLabel;
541     private javax.swing.JTextField JavaDoc defaultTypeField;
542     private javax.swing.JTextField JavaDoc typeField;
543     private javax.swing.JLabel JavaDoc defaultValueLabel;
544     private javax.swing.JTextField JavaDoc defaultValueField;
545     private javax.swing.JLabel JavaDoc elementNameLabel;
546     private javax.swing.JTextField JavaDoc elementNameField;
547     private javax.swing.JPanel JavaDoc fillPanel;
548     // End of variables declaration//GEN-END:variables
549

550     
551     /** Initialize accesibility
552      */

553     public void initAccessibility (){
554         
555         elementNameField.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_elementNameField"));
556         elementNameField.selectAll ();
557         
558         nameField.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_nameField1"));
559         nameField.selectAll ();
560         
561         typeField.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_typeField"));
562         typeField.selectAll ();
563         
564         enumeratedField.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_enumeratedField"));
565         enumeratedField.selectAll ();
566         
567         defaultTypeField.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_defaultTypeField"));
568         defaultTypeField.selectAll ();
569         
570         defaultValueField.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_defaultValueField"));
571         defaultValueField.selectAll ();
572         
573         this.getAccessibleContext ().setAccessibleDescription (Util.THIS.getString ("ACSD_TreeAttlistDeclAttributeDefCustomizer"));
574     }
575 }
576
Popular Tags