KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > css > visual > ui > PositionStyleEditor


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-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * PositionStyleEditor.java
22  *
23  * Created on October 13, 2004, 12:23 PM
24  */

25
26 package org.netbeans.modules.css.visual.ui;
27
28 import org.netbeans.modules.css.visual.model.ClipData;
29 import org.netbeans.modules.css.visual.model.ClipModel;
30 import org.netbeans.modules.css.visual.model.CssProperties;
31 import org.netbeans.modules.css.visual.model.CssStyleData;
32 import org.netbeans.modules.css.visual.model.PositionData;
33 import org.netbeans.modules.css.visual.model.PositionModel;
34 import org.netbeans.modules.css.visual.model.PropertyData;
35 import org.netbeans.modules.css.visual.model.PropertyWithUnitData;
36 import org.netbeans.modules.css.visual.model.PropertyData;
37 import javax.swing.DefaultComboBoxModel JavaDoc;
38 import javax.swing.JTextField JavaDoc;
39 import javax.swing.SwingUtilities JavaDoc;
40 import org.netbeans.modules.css.visual.model.Utils;
41 import org.openide.util.NbBundle;
42
43 /**
44  * Position Style editor.
45  * @author Winston Prakash
46  * @version 1.0
47  */

48 public class PositionStyleEditor extends StyleEditor {
49
50     DefaultComboBoxModel JavaDoc positionModeList;
51     PositionData positionData = new PositionData();
52     ClipData clipData = new ClipData();
53
54     /** Creates new form FontStyleEditor */
55     public PositionStyleEditor() {
56         setName("positionStyleEditor"); //NOI18N
57
setDisplayName(NbBundle.getMessage(PositionStyleEditor.class, "POSITION_EDITOR_DISPNAME"));
58         initComponents();
59         initialize();
60
61         // Add editor listeners to the width & height combobox
62
final JTextField JavaDoc widthComboBoxEditor = (JTextField JavaDoc) widthComboBox.getEditor().getEditorComponent();
63         widthComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
64             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
65                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
66                     public void run(){
67                         widthUnitComboBox.setEnabled(Utils.isInteger(widthComboBoxEditor.getText()));
68                     }
69                 });
70             }
71         });
72         final JTextField JavaDoc heightComboBoxEditor = (JTextField JavaDoc) heightComboBox.getEditor().getEditorComponent();
73         heightComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
74             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
75                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
76                     public void run(){
77                         heightUnitComboBox.setEnabled(Utils.isInteger(heightComboBoxEditor.getText()));
78                     }
79                 });
80             }
81         });
82
83         // Add editor listeners to the top, right, bottom & left combobox
84

85         final JTextField JavaDoc posTopComboBoxEditor = (JTextField JavaDoc) posTopComboBox.getEditor().getEditorComponent();
86         posTopComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
87             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
88                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
89                     public void run(){
90                          posTopUnitComboBox.setEnabled(Utils.isInteger(posTopComboBoxEditor.getText()));
91                     }
92                 });
93             }
94         });
95         final JTextField JavaDoc posRightComboBoxEditor = (JTextField JavaDoc) posRightComboBox.getEditor().getEditorComponent();
96         posRightComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
97             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
98                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
99                     public void run(){
100                          posRightUnitComboBox.setEnabled(Utils.isInteger(posRightComboBoxEditor.getText()));
101                     }
102                 });
103             }
104         });
105         final JTextField JavaDoc posBottomComboBoxEditor = (JTextField JavaDoc) posBottomComboBox.getEditor().getEditorComponent();
106         posBottomComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
107             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
108                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
109                     public void run(){
110                          posBottomUnitComboBox.setEnabled(Utils.isInteger(posBottomComboBoxEditor.getText()));
111                     }
112                 });
113             }
114         });
115         final JTextField JavaDoc posLeftComboBoxEditor = (JTextField JavaDoc) posLeftComboBox.getEditor().getEditorComponent();
116         posLeftComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
117             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
118                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
119                     public void run(){
120                          posLeftUnitComboBox.setEnabled(Utils.isInteger(posLeftComboBoxEditor.getText()));
121                     }
122                 });
123                  
124             }
125         });
126         
127         // Add editor listeners to the top, right, bottom & left Clip combobox
128

129         final JTextField JavaDoc clipTopComboBoxEditor = (JTextField JavaDoc) clipTopComboBox.getEditor().getEditorComponent();
130         clipTopComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
131             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
132                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
133                     public void run(){
134                         clipTopUnitComboBox.setEnabled(Utils.isInteger(clipTopComboBoxEditor.getText()));
135                     }
136                 });
137             }
138         });
139         final JTextField JavaDoc clipRightComboBoxEditor = (JTextField JavaDoc) clipRightComboBox.getEditor().getEditorComponent();
140         clipRightComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
141             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
142                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
143                     public void run(){
144                         clipRightUnitComboBox.setEnabled(Utils.isInteger(clipRightComboBoxEditor.getText()));
145                     }
146                 });
147             }
148         });
149         final JTextField JavaDoc clipBottomComboBoxEditor = (JTextField JavaDoc) clipBottomComboBox.getEditor().getEditorComponent();
150         clipBottomComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
151             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
152                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
153                     public void run(){
154                         clipBottomUnitComboBox.setEnabled(Utils.isInteger(clipBottomComboBoxEditor.getText()));
155                     }
156                 });
157             }
158         });
159         final JTextField JavaDoc clipLeftComboBoxEditor = (JTextField JavaDoc) clipLeftComboBox.getEditor().getEditorComponent();
160         clipLeftComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
161             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
162                 SwingUtilities.invokeLater(new Runnable JavaDoc(){
163                     public void run(){
164                         clipLeftComboBoxEditor.setEnabled(Utils.isInteger(clipLeftComboBoxEditor.getText()));
165                     }
166                 });
167             }
168         });
169     }
170     
171     /**
172      * Set the CSS Properties Values from the CssStyleData data structure
173      * to the GUI components.
174      */

175     protected void setCssPropertyValues(CssStyleData cssStyleData){
176         removeCssPropertyChangeListener();
177         String JavaDoc positionMode = cssStyleData.getProperty(CssProperties.POSITION);
178         if(positionMode != null){
179             positionModeCombo.setSelectedItem(positionMode);
180         }else{
181             positionModeCombo.setSelectedIndex(0);
182         }
183         String JavaDoc posTop = cssStyleData.getProperty(CssProperties.TOP);
184         if(posTop != null){
185             positionData.setTop(posTop);
186             posTopComboBox.setSelectedItem(positionData.getTopValue());
187             posTopUnitComboBox.setSelectedItem(positionData.getTopUnit());
188         }else{
189             posTopComboBox.setSelectedIndex(0);
190             posTopUnitComboBox.setSelectedItem("px"); //NOI18N
191
}
192         
193         String JavaDoc posBottom = cssStyleData.getProperty(CssProperties.BOTTOM);
194         if(posBottom != null){
195             positionData.setBottom(posBottom);
196             posBottomComboBox.setSelectedItem(positionData.getBottomValue());
197             posBottomUnitComboBox.setSelectedItem(positionData.getBottomUnit());
198         }else{
199             posBottomComboBox.setSelectedIndex(0);
200             posBottomUnitComboBox.setSelectedItem("px"); //NOI18N
201
}
202         
203         String JavaDoc posLeft = cssStyleData.getProperty(CssProperties.LEFT);
204         if(posLeft != null){
205             positionData.setLeft(posLeft);
206             posLeftComboBox.setSelectedItem(positionData.getLeftValue());
207             posLeftUnitComboBox.setSelectedItem(positionData.getLeftUnit());
208         }else{
209             posLeftComboBox.setSelectedIndex(0);
210             posLeftUnitComboBox.setSelectedItem("px"); //NOI18N
211
}
212         
213         String JavaDoc width = cssStyleData.getProperty(CssProperties.WIDTH);
214         if(width != null){
215             positionData.setWidth(width);
216             widthComboBox.setSelectedItem(positionData.getWidthValue());
217             widthUnitComboBox.setSelectedItem(positionData.getWidthUnit());
218         }else{
219             widthComboBox.setSelectedIndex(0);
220             widthUnitComboBox.setSelectedItem("px"); //NOI18N
221
}
222         
223         String JavaDoc height = cssStyleData.getProperty(CssProperties.HEIGHT);
224         if(height != null){
225             positionData.setHeight(height);
226             heightComboBox.setSelectedItem(positionData.getHeightValue());
227             heightUnitComboBox.setSelectedItem(positionData.getHeightUnit());
228         }else{
229             heightComboBox.setSelectedIndex(0);
230             heightUnitComboBox.setSelectedItem("px"); //NOI18N
231
}
232         
233         String JavaDoc visibility = cssStyleData.getProperty(CssProperties.VISIBILITY);
234         if(visibility != null){
235             visibleComboBox.setSelectedItem(visibility);
236         }else{
237             visibleComboBox.setSelectedIndex(0);
238         }
239         
240         String JavaDoc zindex = cssStyleData.getProperty(CssProperties.Z_INDEX);
241         if(zindex != null){
242             zindexComboBox.setSelectedItem(zindex);
243         }else{
244             zindexComboBox.setSelectedIndex(0);
245         }
246         
247         String JavaDoc posRight = cssStyleData.getProperty(CssProperties.RIGHT);
248         if(posRight != null){
249             positionData.setRight(posRight);
250             posRightComboBox.setSelectedItem(positionData.getRightValue());
251             posRightUnitComboBox.setSelectedItem(positionData.getRightUnit());
252         }else{
253             posRightComboBox.setSelectedIndex(0);
254             posRightUnitComboBox.setSelectedItem("px"); //NOI18N
255
}
256         
257         String JavaDoc clip = cssStyleData.getProperty(CssProperties.CLIP);
258         clipData.setClip(clip);
259         clipTopComboBox.setSelectedItem(clipData.getTopValue());
260         clipTopUnitComboBox.setSelectedItem(clipData.getTopUnit());
261         clipBottomComboBox.setSelectedItem(clipData.getBottomValue());
262         clipBottomUnitComboBox.setSelectedItem(clipData.getBottomUnit());
263         clipLeftComboBox.setSelectedItem(clipData.getLeftValue());
264         clipLeftUnitComboBox.setSelectedItem(clipData.getLeftUnit());
265         clipRightComboBox.setSelectedItem(clipData.getRightValue());
266         clipRightUnitComboBox.setSelectedItem(clipData.getRightUnit());
267         
268         setCssPropertyChangeListener(cssStyleData);
269     }
270     
271     public void initialize(){
272         PositionModel positionModel = new PositionModel();
273         
274         // Set the Position Mode to the GUI
275
positionModeList = positionModel.getModeList();
276         positionModeCombo.setModel(positionModeList);
277         
278         // Set the Position Top to the GUI
279
DefaultComboBoxModel JavaDoc posTopList = positionModel.getPositionList();
280         posTopComboBox.setModel(posTopList);
281         posTopUnitComboBox.setModel(positionModel.getPositionUnitList());
282
283         // Set the Position Bottom to the GUI
284
DefaultComboBoxModel JavaDoc posBottomList = positionModel.getPositionList();
285         posBottomComboBox.setModel(posBottomList);
286         posBottomUnitComboBox.setModel(positionModel.getPositionUnitList());
287
288         // Set the Position Left to the GUI
289
DefaultComboBoxModel JavaDoc posLeftList = positionModel.getPositionList();
290         posLeftComboBox.setModel(posLeftList);
291         posLeftUnitComboBox.setModel(positionModel.getPositionUnitList());
292
293         // Set the Width to the GUI
294
DefaultComboBoxModel JavaDoc widthList = positionModel.getSizeList();
295         widthComboBox.setModel(widthList);
296         widthUnitComboBox.setModel(positionModel.getPositionUnitList());
297
298         // Set the Height to the GUI
299
DefaultComboBoxModel JavaDoc heightList = positionModel.getSizeList();
300         heightComboBox.setModel(heightList);
301         heightUnitComboBox.setModel(positionModel.getPositionUnitList());
302  
303         // Set the Visibility to the GUI
304
DefaultComboBoxModel JavaDoc visibilityList = positionModel.getVisibilityList();
305         visibleComboBox.setModel(visibilityList);
306
307         // Set the Visibility to the GUI
308
DefaultComboBoxModel JavaDoc zindexList = positionModel.getZIndexList();
309         zindexComboBox.setModel(zindexList);
310
311         // Set the Position Left to the GUI
312
DefaultComboBoxModel JavaDoc posRightList = positionModel.getPositionList();
313         posRightComboBox.setModel(posRightList);
314         posRightUnitComboBox.setModel(positionModel.getPositionUnitList());
315
316         ClipModel clipModel = new ClipModel();
317         
318         // Set the Position Top to the GUI
319
clipTopComboBox.setModel(clipModel.getClipList());
320         clipTopUnitComboBox.setModel(clipModel.getClipUnitList());
321         clipBottomComboBox.setModel(clipModel.getClipList());
322         clipBottomUnitComboBox.setModel(clipModel.getClipUnitList());
323         clipLeftComboBox.setModel(clipModel.getClipList());
324         clipLeftUnitComboBox.setModel(clipModel.getClipUnitList());
325         clipRightComboBox.setModel(clipModel.getClipList());
326         clipRightUnitComboBox.setModel(clipModel.getClipUnitList());
327         
328     }
329     
330     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
331
private void initComponents() {
332         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
333
334         mainPositionPanel = new javax.swing.JPanel JavaDoc();
335         positionPanel = new javax.swing.JPanel JavaDoc();
336         positionModePanel = new javax.swing.JPanel JavaDoc();
337         containerPanel = new javax.swing.JPanel JavaDoc();
338         positionModeLabel = new javax.swing.JLabel JavaDoc();
339         positionModeCombo = new javax.swing.JComboBox JavaDoc();
340         fillPanel = new javax.swing.JPanel JavaDoc();
341         positionContainerPanel = new javax.swing.JPanel JavaDoc();
342         posTopLabel = new javax.swing.JLabel JavaDoc();
343         posTopComboBox = new javax.swing.JComboBox JavaDoc();
344         posTopUnitComboBox = new javax.swing.JComboBox JavaDoc();
345         posBottomLabel1 = new javax.swing.JLabel JavaDoc();
346         posBottomComboBox = new javax.swing.JComboBox JavaDoc();
347         posBottomUnitComboBox = new javax.swing.JComboBox JavaDoc();
348         posRightLabel = new javax.swing.JLabel JavaDoc();
349         posRightComboBox = new javax.swing.JComboBox JavaDoc();
350         posRightUnitComboBox = new javax.swing.JComboBox JavaDoc();
351         posLeftLabel1 = new javax.swing.JLabel JavaDoc();
352         posLeftComboBox = new javax.swing.JComboBox JavaDoc();
353         posLeftUnitComboBox = new javax.swing.JComboBox JavaDoc();
354         sizePanel = new javax.swing.JPanel JavaDoc();
355         sizeContainerPanel = new javax.swing.JPanel JavaDoc();
356         heightLabel = new javax.swing.JLabel JavaDoc();
357         heightComboBox = new javax.swing.JComboBox JavaDoc();
358         heightUnitComboBox = new javax.swing.JComboBox JavaDoc();
359         widthLabel = new javax.swing.JLabel JavaDoc();
360         widthComboBox = new javax.swing.JComboBox JavaDoc();
361         widthUnitComboBox = new javax.swing.JComboBox JavaDoc();
362         visibleLabel1 = new javax.swing.JLabel JavaDoc();
363         visibleComboBox = new javax.swing.JComboBox JavaDoc();
364         zIndexLabel1 = new javax.swing.JLabel JavaDoc();
365         zindexComboBox = new javax.swing.JComboBox JavaDoc();
366         clipPanel = new javax.swing.JPanel JavaDoc();
367         clipLeftLabel1 = new javax.swing.JLabel JavaDoc();
368         clipBottomUnitComboBox = new javax.swing.JComboBox JavaDoc();
369         clipLeftUnitComboBox = new javax.swing.JComboBox JavaDoc();
370         clipTopLabel1 = new javax.swing.JLabel JavaDoc();
371         clipLeftComboBox = new javax.swing.JComboBox JavaDoc();
372         clipTopUnitComboBox = new javax.swing.JComboBox JavaDoc();
373         clipRightLabel1 = new javax.swing.JLabel JavaDoc();
374         clipBottomComboBox = new javax.swing.JComboBox JavaDoc();
375         clipRightUnitComboBox = new javax.swing.JComboBox JavaDoc();
376         clipBottomLabel = new javax.swing.JLabel JavaDoc();
377         clipTopComboBox = new javax.swing.JComboBox JavaDoc();
378         clipRightComboBox = new javax.swing.JComboBox JavaDoc();
379         clipErrorPanel = new javax.swing.JPanel JavaDoc();
380         clipErrorLabel = new javax.swing.JLabel JavaDoc();
381
382         setLayout(new java.awt.BorderLayout JavaDoc());
383
384         mainPositionPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
385
386         positionPanel.setLayout(new java.awt.BorderLayout JavaDoc());
387
388         positionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POISTION_TITLE"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP));
389         positionModePanel.setLayout(new java.awt.BorderLayout JavaDoc());
390
391         positionModePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
392         containerPanel.setLayout(new java.awt.BorderLayout JavaDoc(5, 5));
393
394         positionModeLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_MODE"));
395         containerPanel.add(positionModeLabel, java.awt.BorderLayout.WEST);
396
397         positionModeCombo.addItemListener(new java.awt.event.ItemListener JavaDoc() {
398             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
399                 positionModeComboItemStateChanged(evt);
400             }
401         });
402
403         containerPanel.add(positionModeCombo, java.awt.BorderLayout.CENTER);
404         positionModeCombo.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_MODE_ACCESS_NAME"));
405         positionModeCombo.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_MODE_ACCESS_DESC"));
406
407         positionModePanel.add(containerPanel, java.awt.BorderLayout.WEST);
408
409         positionModePanel.add(fillPanel, java.awt.BorderLayout.CENTER);
410
411         positionPanel.add(positionModePanel, java.awt.BorderLayout.NORTH);
412
413         positionContainerPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
414
415         positionContainerPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5));
416         posTopLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP"));
417         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
418         gridBagConstraints.gridx = 0;
419         gridBagConstraints.gridy = 0;
420         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
421         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
422         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
423         positionContainerPanel.add(posTopLabel, gridBagConstraints);
424
425         posTopComboBox.setEditable(true);
426         posTopComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
427             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
428                 posTopComboBoxItemStateChanged(evt);
429             }
430         });
431         posTopComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
432             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
433                 posTopComboBoxActionPerformed(evt);
434             }
435         });
436
437         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
438         gridBagConstraints.gridx = 1;
439         gridBagConstraints.gridy = 0;
440         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
441         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
442         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
443         positionContainerPanel.add(posTopComboBox, gridBagConstraints);
444         posTopComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_ACCESS_NAME"));
445         posTopComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_ACCESS_DESC"));
446
447         posTopUnitComboBox.setEnabled(false);
448         posTopUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
449             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
450                 posTopUnitComboBoxItemStateChanged(evt);
451             }
452         });
453
454         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
455         gridBagConstraints.gridx = 2;
456         gridBagConstraints.gridy = 0;
457         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
458         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
459         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
460         positionContainerPanel.add(posTopUnitComboBox, gridBagConstraints);
461         posTopUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_UNIT_ACCESS_NAME"));
462         posTopUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_UNIT_ACCESS_DESC"));
463
464         posBottomLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM"));
465         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
466         gridBagConstraints.gridx = 3;
467         gridBagConstraints.gridy = 0;
468         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
469         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 15, 5, 0);
470         positionContainerPanel.add(posBottomLabel1, gridBagConstraints);
471
472         posBottomComboBox.setEditable(true);
473         posBottomComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
474             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
475                 posBottomComboBoxItemStateChanged(evt);
476             }
477         });
478         posBottomComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
479             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
480                 posBottomComboBoxActionPerformed(evt);
481             }
482         });
483
484         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
485         gridBagConstraints.gridx = 4;
486         gridBagConstraints.gridy = 0;
487         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
488         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
489         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
490         positionContainerPanel.add(posBottomComboBox, gridBagConstraints);
491         posBottomComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_ACCESS_NAME"));
492         posBottomComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_ACCESS_DESC"));
493
494         posBottomUnitComboBox.setEnabled(false);
495         posBottomUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
496             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
497                 posBottomUnitComboBoxItemStateChanged(evt);
498             }
499         });
500
501         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
502         gridBagConstraints.gridx = 5;
503         gridBagConstraints.gridy = 0;
504         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
505         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
506         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
507         positionContainerPanel.add(posBottomUnitComboBox, gridBagConstraints);
508         posBottomUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_UNIT_ACCESS_NAME"));
509         posBottomUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_UNIT_ACCESS_DESC"));
510
511         posRightLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_RIGHT"));
512         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
513         gridBagConstraints.gridx = 0;
514         gridBagConstraints.gridy = 1;
515         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
516         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
517         positionContainerPanel.add(posRightLabel, gridBagConstraints);
518
519         posRightComboBox.setEditable(true);
520         posRightComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
521             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
522                 posRightComboBoxItemStateChanged(evt);
523             }
524         });
525         posRightComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
526             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
527                 posRightComboBoxActionPerformed(evt);
528             }
529         });
530
531         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
532         gridBagConstraints.gridx = 1;
533         gridBagConstraints.gridy = 1;
534         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
535         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
536         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
537         positionContainerPanel.add(posRightComboBox, gridBagConstraints);
538         posRightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_RIGHT_ACCESS_NAME"));
539         posRightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_Right_ACCESS_DESC"));
540
541         posRightUnitComboBox.setEnabled(false);
542         posRightUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
543             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
544                 posRightUnitComboBoxItemStateChanged(evt);
545             }
546         });
547
548         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
549         gridBagConstraints.gridx = 2;
550         gridBagConstraints.gridy = 1;
551         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
552         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
553         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
554         positionContainerPanel.add(posRightUnitComboBox, gridBagConstraints);
555         posRightUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_RIGHT_UNIT_ACCESS_NAME"));
556         posRightUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_Right_UNIT_ACCESS_DESC"));
557
558         posLeftLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT"));
559         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
560         gridBagConstraints.gridx = 3;
561         gridBagConstraints.gridy = 1;
562         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
563         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
564         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 15, 0, 0);
565         positionContainerPanel.add(posLeftLabel1, gridBagConstraints);
566
567         posLeftComboBox.setEditable(true);
568         posLeftComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
569             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
570                 posLeftComboBoxItemStateChanged(evt);
571             }
572         });
573         posLeftComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
574             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
575                 posLeftComboBoxActionPerformed(evt);
576             }
577         });
578
579         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
580         gridBagConstraints.gridx = 4;
581         gridBagConstraints.gridy = 1;
582         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
583         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
584         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
585         positionContainerPanel.add(posLeftComboBox, gridBagConstraints);
586         posLeftComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_ACCESS_NAME"));
587         posLeftComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_ACCESS_DESC"));
588
589         posLeftUnitComboBox.setEnabled(false);
590         posLeftUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
591             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
592                 posLeftUnitComboBoxItemStateChanged(evt);
593             }
594         });
595
596         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
597         gridBagConstraints.gridx = 5;
598         gridBagConstraints.gridy = 1;
599         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
600         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
601         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
602         positionContainerPanel.add(posLeftUnitComboBox, gridBagConstraints);
603         posLeftUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_ACCESS_NAME"));
604         posLeftUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_UNIT_ACCESS_DESC"));
605
606         positionPanel.add(positionContainerPanel, java.awt.BorderLayout.WEST);
607
608         mainPositionPanel.add(positionPanel, new java.awt.GridBagConstraints JavaDoc());
609
610         sizePanel.setLayout(new java.awt.BorderLayout JavaDoc());
611
612         sizePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "SIZE_TITLE"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP));
613         sizeContainerPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
614
615         sizeContainerPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
616         heightLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_HEIGHT"));
617         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
618         gridBagConstraints.gridx = 0;
619         gridBagConstraints.gridy = 1;
620         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
621         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
622         sizeContainerPanel.add(heightLabel, gridBagConstraints);
623
624         heightComboBox.setEditable(true);
625         heightComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
626             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
627                 heightComboBoxItemStateChanged(evt);
628             }
629         });
630         heightComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
631             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
632                 heightComboBoxActionPerformed(evt);
633             }
634         });
635
636         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
637         gridBagConstraints.gridx = 1;
638         gridBagConstraints.gridy = 1;
639         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
640         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
641         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
642         sizeContainerPanel.add(heightComboBox, gridBagConstraints);
643         heightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_ACCESS_NAME"));
644         heightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_ACCESS_DESC"));
645
646         heightUnitComboBox.setEnabled(false);
647         heightUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
648             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
649                 heightUnitComboBoxItemStateChanged(evt);
650             }
651         });
652
653         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
654         gridBagConstraints.gridx = 2;
655         gridBagConstraints.gridy = 1;
656         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
657         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
658         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
659         sizeContainerPanel.add(heightUnitComboBox, gridBagConstraints);
660         heightUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_UNIT_ACCESS_NAME"));
661         heightUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_UNIT_ACCESS_DESC"));
662
663         widthLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_WIDTH"));
664         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
665         gridBagConstraints.gridx = 0;
666         gridBagConstraints.gridy = 0;
667         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
668         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
669         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
670         sizeContainerPanel.add(widthLabel, gridBagConstraints);
671
672         widthComboBox.setEditable(true);
673         widthComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
674             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
675                 widthComboBoxItemStateChanged(evt);
676             }
677         });
678         widthComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
679             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
680                 widthComboBoxActionPerformed(evt);
681             }
682         });
683
684         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
685         gridBagConstraints.gridx = 1;
686         gridBagConstraints.gridy = 0;
687         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
688         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
689         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
690         sizeContainerPanel.add(widthComboBox, gridBagConstraints);
691         widthComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_ACCESS_NAME"));
692         widthComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_ACCESS_DESC"));
693
694         widthUnitComboBox.setEnabled(false);
695         widthUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
696             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
697                 widthUnitComboBoxItemStateChanged(evt);
698             }
699         });
700
701         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
702         gridBagConstraints.gridx = 2;
703         gridBagConstraints.gridy = 0;
704         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
705         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
706         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
707         sizeContainerPanel.add(widthUnitComboBox, gridBagConstraints);
708         widthUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_UNIT_ACCESS_NAME"));
709         widthUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_UNIT_ACCESS_DESC"));
710
711         visibleLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "VISIBILITY"));
712         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
713         gridBagConstraints.gridx = 3;
714         gridBagConstraints.gridy = 0;
715         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
716         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
717         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 15, 5, 0);
718         sizeContainerPanel.add(visibleLabel1, gridBagConstraints);
719
720         visibleComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
721             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
722                 visibleComboBoxItemStateChanged(evt);
723             }
724         });
725
726         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
727         gridBagConstraints.gridx = 4;
728         gridBagConstraints.gridy = 0;
729         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
730         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
731         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
732         sizeContainerPanel.add(visibleComboBox, gridBagConstraints);
733         visibleComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "VISIBILITY_ACCESS_NAME"));
734         visibleComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "VISIBILITY_ACCESS_DESC"));
735
736         zIndexLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "Z_INDEX"));
737         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
738         gridBagConstraints.gridx = 3;
739         gridBagConstraints.gridy = 1;
740         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
741         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
742         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 15, 0, 0);
743         sizeContainerPanel.add(zIndexLabel1, gridBagConstraints);
744
745         zindexComboBox.setEditable(true);
746         zindexComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
747             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
748                 zindexComboBoxItemStateChanged(evt);
749             }
750         });
751
752         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
753         gridBagConstraints.gridx = 4;
754         gridBagConstraints.gridy = 1;
755         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
756         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
757         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
758         sizeContainerPanel.add(zindexComboBox, gridBagConstraints);
759         zindexComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "ZINDEX_ACCESS_NAME"));
760         zindexComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "ZINDEX_ACCESS_DESC"));
761
762         sizePanel.add(sizeContainerPanel, java.awt.BorderLayout.WEST);
763
764         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
765         gridBagConstraints.gridx = 0;
766         gridBagConstraints.gridy = 1;
767         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
768         gridBagConstraints.insets = new java.awt.Insets JavaDoc(15, 0, 0, 0);
769         mainPositionPanel.add(sizePanel, gridBagConstraints);
770
771         clipPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
772
773         clipPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TITLE"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP));
774         clipLeftLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT"));
775         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
776         gridBagConstraints.gridx = 3;
777         gridBagConstraints.gridy = 1;
778         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
779         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
780         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 15, 0, 0);
781         clipPanel.add(clipLeftLabel1, gridBagConstraints);
782
783         clipBottomUnitComboBox.setEnabled(false);
784         clipBottomUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
785             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
786                 clipBottomUnitComboBoxItemStateChanged(evt);
787             }
788         });
789
790         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
791         gridBagConstraints.gridx = 5;
792         gridBagConstraints.gridy = 0;
793         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
794         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
795         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
796         clipPanel.add(clipBottomUnitComboBox, gridBagConstraints);
797         clipBottomUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_UNIT_ACCESS_NAME"));
798         clipBottomUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_UNIT_ACCESS_DESC"));
799
800         clipLeftUnitComboBox.setEnabled(false);
801         clipLeftUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
802             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
803                 clipLeftUnitComboBoxItemStateChanged(evt);
804             }
805         });
806
807         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
808         gridBagConstraints.gridx = 5;
809         gridBagConstraints.gridy = 1;
810         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
811         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
812         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
813         clipPanel.add(clipLeftUnitComboBox, gridBagConstraints);
814         clipLeftUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_UNIT_ACCESS_NAME"));
815         clipLeftUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_UNIT_ACCESS_DESC"));
816
817         clipTopLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP"));
818         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
819         gridBagConstraints.gridx = 0;
820         gridBagConstraints.gridy = 0;
821         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
822         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
823         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
824         clipPanel.add(clipTopLabel1, gridBagConstraints);
825
826         clipLeftComboBox.setEditable(true);
827         clipLeftComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
828             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
829                 clipLeftComboBoxItemStateChanged(evt);
830             }
831         });
832
833         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
834         gridBagConstraints.gridx = 4;
835         gridBagConstraints.gridy = 1;
836         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
837         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
838         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
839         clipPanel.add(clipLeftComboBox, gridBagConstraints);
840         clipLeftComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_ACCESS_NAME"));
841         clipLeftComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_ACCESS_DESC"));
842
843         clipTopUnitComboBox.setEnabled(false);
844         clipTopUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
845             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
846                 clipTopUnitComboBoxItemStateChanged(evt);
847             }
848         });
849
850         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
851         gridBagConstraints.gridx = 2;
852         gridBagConstraints.gridy = 0;
853         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
854         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
855         clipPanel.add(clipTopUnitComboBox, gridBagConstraints);
856         clipTopUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_UNIT_ACCESS_NAME"));
857         clipTopUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_UNIT_ACCESS_DESC"));
858
859         clipRightLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_RIGHT"));
860         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
861         gridBagConstraints.gridx = 0;
862         gridBagConstraints.gridy = 1;
863         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
864         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
865         clipPanel.add(clipRightLabel1, gridBagConstraints);
866
867         clipBottomComboBox.setEditable(true);
868         clipBottomComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
869             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
870                 clipBottomComboBoxItemStateChanged(evt);
871             }
872         });
873
874         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
875         gridBagConstraints.gridx = 4;
876         gridBagConstraints.gridy = 0;
877         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
878         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
879         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
880         clipPanel.add(clipBottomComboBox, gridBagConstraints);
881         clipBottomComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_ACCESS_NAME"));
882         clipBottomComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_ACCESS_DESC"));
883
884         clipRightUnitComboBox.setEnabled(false);
885         clipRightUnitComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
886             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
887                 clipRightUnitComboBoxItemStateChanged(evt);
888             }
889         });
890
891         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
892         gridBagConstraints.gridx = 2;
893         gridBagConstraints.gridy = 1;
894         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
895         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
896         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
897         clipPanel.add(clipRightUnitComboBox, gridBagConstraints);
898         clipRightUnitComboBox.getAccessibleContext().setAccessibleName(null);
899         clipRightUnitComboBox.getAccessibleContext().setAccessibleDescription(null);
900
901         clipBottomLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM"));
902         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
903         gridBagConstraints.gridx = 3;
904         gridBagConstraints.gridy = 0;
905         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
906         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 15, 5, 0);
907         clipPanel.add(clipBottomLabel, gridBagConstraints);
908
909         clipTopComboBox.setEditable(true);
910         clipTopComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
911             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
912                 clipTopComboBoxItemStateChanged(evt);
913             }
914         });
915
916         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
917         gridBagConstraints.gridx = 1;
918         gridBagConstraints.gridy = 0;
919         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
920         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
921         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
922         clipPanel.add(clipTopComboBox, gridBagConstraints);
923         clipTopComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_ACCESS_NAME"));
924         clipTopComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_ACCESS_DESC"));
925
926         clipRightComboBox.setEditable(true);
927         clipRightComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
928             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
929                 clipRightComboBoxItemStateChanged(evt);
930             }
931         });
932
933         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
934         gridBagConstraints.gridx = 1;
935         gridBagConstraints.gridy = 1;
936         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
937         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
938         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
939         clipPanel.add(clipRightComboBox, gridBagConstraints);
940         clipRightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_RIGHT_ACCESS_NAME"));
941         clipRightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_RIGHT_ACCESS_DESC"));
942
943         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
944         gridBagConstraints.gridx = 0;
945         gridBagConstraints.gridy = 2;
946         gridBagConstraints.insets = new java.awt.Insets JavaDoc(15, 0, 0, 0);
947         mainPositionPanel.add(clipPanel, gridBagConstraints);
948
949         add(mainPositionPanel, java.awt.BorderLayout.NORTH);
950
951         clipErrorPanel.setLayout(new java.awt.BorderLayout JavaDoc());
952
953         clipErrorPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 10, 1, 1));
954         clipErrorLabel.setForeground(new java.awt.Color JavaDoc(0, 0, 153));
955         clipErrorPanel.add(clipErrorLabel, java.awt.BorderLayout.CENTER);
956
957         add(clipErrorPanel, java.awt.BorderLayout.CENTER);
958
959     }// </editor-fold>//GEN-END:initComponents
960

961     
962     private void clipLeftUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipLeftUnitComboBoxItemStateChanged
963
if (evt.getStateChange() != evt.DESELECTED) {
964             clipData.setLeftUnit(clipLeftUnitComboBox.getSelectedItem().toString());
965             cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
966         }
967     }//GEN-LAST:event_clipLeftUnitComboBoxItemStateChanged
968

969     private void clipLeftComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipLeftComboBoxItemStateChanged
970
if (evt.getStateChange() != evt.DESELECTED) {
971             clipData.setLeft(clipLeftComboBox.getSelectedItem().toString());
972             clipLeftUnitComboBox.setEnabled(clipData.isLeftValueInteger());
973             cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
974         }
975     }//GEN-LAST:event_clipLeftComboBoxItemStateChanged
976

977     private void clipBottomUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipBottomUnitComboBoxItemStateChanged
978
if (evt.getStateChange() != evt.DESELECTED) {
979             clipData.setBottomUnit(clipBottomUnitComboBox.getSelectedItem().toString());
980             cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
981         }
982     }//GEN-LAST:event_clipBottomUnitComboBoxItemStateChanged
983

984     private void clipBottomComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipBottomComboBoxItemStateChanged
985
if (evt.getStateChange() != evt.DESELECTED) {
986             clipData.setBottom(clipBottomComboBox.getSelectedItem().toString());
987             clipBottomUnitComboBox.setEnabled(clipData.isBottomValueInteger());
988             cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
989         }
990     }//GEN-LAST:event_clipBottomComboBoxItemStateChanged
991

992     private void clipRightUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipRightUnitComboBoxItemStateChanged
993
if (evt.getStateChange() != evt.DESELECTED) {
994             clipData.setRightUnit(clipRightUnitComboBox.getSelectedItem().toString());
995             cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
996         }
997     }//GEN-LAST:event_clipRightUnitComboBoxItemStateChanged
998

999     private void clipRightComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipRightComboBoxItemStateChanged
1000
if (evt.getStateChange() != evt.DESELECTED) {
1001            clipData.setRight(clipRightComboBox.getSelectedItem().toString());
1002            clipRightUnitComboBox.setEnabled(clipData.isRightValueInteger());
1003            cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
1004        }
1005    }//GEN-LAST:event_clipRightComboBoxItemStateChanged
1006

1007    private void clipTopUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipTopUnitComboBoxItemStateChanged
1008
if (evt.getStateChange() != evt.DESELECTED) {
1009            clipData.setTopUnit(clipTopUnitComboBox.getSelectedItem().toString());
1010            cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
1011        }
1012    }//GEN-LAST:event_clipTopUnitComboBoxItemStateChanged
1013

1014    private void clipTopComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_clipTopComboBoxItemStateChanged
1015
if (evt.getStateChange() != evt.DESELECTED) {
1016            clipData.setTop(clipTopComboBox.getSelectedItem().toString());
1017            clipTopUnitComboBox.setEnabled(clipData.isTopValueInteger());
1018            cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString());
1019        }
1020    }//GEN-LAST:event_clipTopComboBoxItemStateChanged
1021

1022    private void zindexComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_zindexComboBoxItemStateChanged
1023
setZindex();
1024    }//GEN-LAST:event_zindexComboBoxItemStateChanged
1025

1026    private void visibleComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_visibleComboBoxItemStateChanged
1027
setVisibility();
1028    }//GEN-LAST:event_visibleComboBoxItemStateChanged
1029

1030    private void heightUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_heightUnitComboBoxItemStateChanged
1031
if (evt.getStateChange() != evt.DESELECTED) {
1032            setHeight();
1033        }
1034    }//GEN-LAST:event_heightUnitComboBoxItemStateChanged
1035

1036    private void heightComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_heightComboBoxItemStateChanged
1037
if (evt.getStateChange() != evt.DESELECTED) {
1038            setHeight();
1039        }
1040    }//GEN-LAST:event_heightComboBoxItemStateChanged
1041

1042    private void heightComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_heightComboBoxActionPerformed
1043
setHeight();
1044    }//GEN-LAST:event_heightComboBoxActionPerformed
1045

1046    private void widthComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_widthComboBoxActionPerformed
1047
setWidth();
1048    }//GEN-LAST:event_widthComboBoxActionPerformed
1049

1050    private void widthComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_widthComboBoxItemStateChanged
1051
if (evt.getStateChange() != evt.DESELECTED) {
1052            setWidth();
1053        }
1054    }//GEN-LAST:event_widthComboBoxItemStateChanged
1055

1056    private void widthUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_widthUnitComboBoxItemStateChanged
1057
if (evt.getStateChange() != evt.DESELECTED) {
1058            setWidth();
1059        }
1060    }//GEN-LAST:event_widthUnitComboBoxItemStateChanged
1061

1062    private void posRightUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posRightUnitComboBoxItemStateChanged
1063
if (evt.getStateChange() != evt.DESELECTED) {
1064            setRightPos();
1065        }
1066    }//GEN-LAST:event_posRightUnitComboBoxItemStateChanged
1067

1068    private void posRightComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posRightComboBoxItemStateChanged
1069
if (evt.getStateChange() != evt.DESELECTED) {
1070            setRightPos();
1071        }
1072    }//GEN-LAST:event_posRightComboBoxItemStateChanged
1073

1074    private void posRightComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_posRightComboBoxActionPerformed
1075
setRightPos();
1076    }//GEN-LAST:event_posRightComboBoxActionPerformed
1077

1078    private void posLeftUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posLeftUnitComboBoxItemStateChanged
1079
if (evt.getStateChange() != evt.DESELECTED) {
1080            setLeftPos();
1081        }
1082    }//GEN-LAST:event_posLeftUnitComboBoxItemStateChanged
1083

1084    private void posLeftComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posLeftComboBoxItemStateChanged
1085
if (evt.getStateChange() != evt.DESELECTED) {
1086            setLeftPos();
1087        }
1088    }//GEN-LAST:event_posLeftComboBoxItemStateChanged
1089

1090    private void posLeftComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_posLeftComboBoxActionPerformed
1091
setLeftPos();
1092    }//GEN-LAST:event_posLeftComboBoxActionPerformed
1093

1094    private void posBottomUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posBottomUnitComboBoxItemStateChanged
1095
if (evt.getStateChange() != evt.DESELECTED) {
1096            setBottomPos();
1097        }
1098    }//GEN-LAST:event_posBottomUnitComboBoxItemStateChanged
1099

1100    private void posBottomComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posBottomComboBoxItemStateChanged
1101
if (evt.getStateChange() != evt.DESELECTED) {
1102            setBottomPos();
1103        }
1104    }//GEN-LAST:event_posBottomComboBoxItemStateChanged
1105

1106    private void posBottomComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_posBottomComboBoxActionPerformed
1107
setBottomPos();
1108    }//GEN-LAST:event_posBottomComboBoxActionPerformed
1109

1110    private void posTopUnitComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posTopUnitComboBoxItemStateChanged
1111
if (evt.getStateChange() != evt.DESELECTED) {
1112            setTopPos();
1113        }
1114    }//GEN-LAST:event_posTopUnitComboBoxItemStateChanged
1115

1116    private void posTopComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_posTopComboBoxItemStateChanged
1117
if (evt.getStateChange() != evt.DESELECTED) {
1118            setTopPos();
1119        }
1120    }//GEN-LAST:event_posTopComboBoxItemStateChanged
1121

1122    private void posTopComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_posTopComboBoxActionPerformed
1123
setTopPos();
1124    }//GEN-LAST:event_posTopComboBoxActionPerformed
1125

1126    private void positionModeComboItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_positionModeComboItemStateChanged
1127
setPosition();
1128    }//GEN-LAST:event_positionModeComboItemStateChanged
1129

1130    private void setZindex(){
1131        PropertyData zindexData = new PropertyData();
1132        zindexData.setValue(zindexComboBox.getSelectedItem().toString());
1133        cssPropertyChangeSupport.firePropertyChange(CssProperties.Z_INDEX, null, zindexData.toString());
1134    }
1135    
1136    public void setVisibility(){
1137        PropertyData visibleData = new PropertyData();
1138        visibleData.setValue(visibleComboBox.getSelectedItem().toString());
1139        cssPropertyChangeSupport.firePropertyChange(CssProperties.VISIBILITY, null, visibleData.toString());
1140    }
1141    
1142    private void setHeight(){
1143        PropertyWithUnitData heightData = new PropertyWithUnitData();
1144        heightData.setUnit(heightUnitComboBox.getSelectedItem().toString());
1145        heightData.setValue(heightComboBox.getSelectedItem().toString());
1146        cssPropertyChangeSupport.firePropertyChange(CssProperties.HEIGHT, null, heightData.toString());
1147        heightUnitComboBox.setEnabled(heightData.isValueInteger());
1148    }
1149    
1150    private void setWidth(){
1151        PropertyWithUnitData widthData = new PropertyWithUnitData();
1152        widthData.setUnit(widthUnitComboBox.getSelectedItem().toString());
1153        widthData.setValue(widthComboBox.getSelectedItem().toString());
1154        cssPropertyChangeSupport.firePropertyChange(CssProperties.WIDTH, null, widthData.toString());
1155        widthUnitComboBox.setEnabled(widthData.isValueInteger());
1156    }
1157    
1158    private void setRightPos(){
1159        PropertyWithUnitData posRightData = new PropertyWithUnitData();
1160        posRightData.setUnit(posRightUnitComboBox.getSelectedItem().toString());
1161        posRightData.setValue(posRightComboBox.getSelectedItem().toString());
1162        cssPropertyChangeSupport.firePropertyChange(CssProperties.RIGHT, null, posRightData.toString());
1163        posRightUnitComboBox.setEnabled(posRightData.isValueInteger());
1164    }
1165    
1166    private void setLeftPos(){
1167        PropertyWithUnitData posLeftData = new PropertyWithUnitData();
1168        posLeftData.setUnit(posLeftUnitComboBox.getSelectedItem().toString());
1169        posLeftData.setValue(posLeftComboBox.getSelectedItem().toString());
1170        cssPropertyChangeSupport.firePropertyChange(CssProperties.LEFT, null, posLeftData.toString());
1171        posLeftUnitComboBox.setEnabled(posLeftData.isValueInteger());
1172    }
1173    
1174    private void setBottomPos(){
1175        PropertyWithUnitData posBottomData = new PropertyWithUnitData();
1176        posBottomData.setUnit(posBottomUnitComboBox.getSelectedItem().toString());
1177        posBottomData.setValue(posBottomComboBox.getSelectedItem().toString());
1178        cssPropertyChangeSupport.firePropertyChange(CssProperties.BOTTOM, null, posBottomData.toString());
1179        posBottomUnitComboBox.setEnabled(posBottomData.isValueInteger());
1180    }
1181    
1182    private void setTopPos(){
1183        PropertyWithUnitData posTopData = new PropertyWithUnitData();
1184        posTopData.setUnit(posTopUnitComboBox.getSelectedItem().toString());
1185        posTopData.setValue(posTopComboBox.getSelectedItem().toString());
1186        cssPropertyChangeSupport.firePropertyChange(CssProperties.TOP, null, posTopData.toString());
1187        posTopUnitComboBox.setEnabled(posTopData.isValueInteger());
1188    }
1189    
1190    public void setPosition(){
1191        PropertyData positionData = new PropertyData();
1192        positionData.setValue(positionModeCombo.getSelectedItem().toString());
1193        cssPropertyChangeSupport.firePropertyChange(CssProperties.POSITION, null, positionData.toString());
1194    }
1195    
1196    
1197    // Variables declaration - do not modify//GEN-BEGIN:variables
1198
private javax.swing.JComboBox JavaDoc clipBottomComboBox;
1199    private javax.swing.JLabel JavaDoc clipBottomLabel;
1200    private javax.swing.JComboBox JavaDoc clipBottomUnitComboBox;
1201    private javax.swing.JLabel JavaDoc clipErrorLabel;
1202    private javax.swing.JPanel JavaDoc clipErrorPanel;
1203    private javax.swing.JComboBox JavaDoc clipLeftComboBox;
1204    private javax.swing.JLabel JavaDoc clipLeftLabel1;
1205    private javax.swing.JComboBox JavaDoc clipLeftUnitComboBox;
1206    private javax.swing.JPanel JavaDoc clipPanel;
1207    private javax.swing.JComboBox JavaDoc clipRightComboBox;
1208    private javax.swing.JLabel JavaDoc clipRightLabel1;
1209    private javax.swing.JComboBox JavaDoc clipRightUnitComboBox;
1210    private javax.swing.JComboBox JavaDoc clipTopComboBox;
1211    private javax.swing.JLabel JavaDoc clipTopLabel1;
1212    private javax.swing.JComboBox JavaDoc clipTopUnitComboBox;
1213    private javax.swing.JPanel JavaDoc containerPanel;
1214    private javax.swing.JPanel JavaDoc fillPanel;
1215    private javax.swing.JComboBox JavaDoc heightComboBox;
1216    private javax.swing.JLabel JavaDoc heightLabel;
1217    private javax.swing.JComboBox JavaDoc heightUnitComboBox;
1218    private javax.swing.JPanel JavaDoc mainPositionPanel;
1219    private javax.swing.JComboBox JavaDoc posBottomComboBox;
1220    private javax.swing.JLabel JavaDoc posBottomLabel1;
1221    private javax.swing.JComboBox JavaDoc posBottomUnitComboBox;
1222    private javax.swing.JComboBox JavaDoc posLeftComboBox;
1223    private javax.swing.JLabel JavaDoc posLeftLabel1;
1224    private javax.swing.JComboBox JavaDoc posLeftUnitComboBox;
1225    private javax.swing.JComboBox JavaDoc posRightComboBox;
1226    private javax.swing.JLabel JavaDoc posRightLabel;
1227    private javax.swing.JComboBox JavaDoc posRightUnitComboBox;
1228    private javax.swing.JComboBox JavaDoc posTopComboBox;
1229    private javax.swing.JLabel JavaDoc posTopLabel;
1230    private javax.swing.JComboBox JavaDoc posTopUnitComboBox;
1231    private javax.swing.JPanel JavaDoc positionContainerPanel;
1232    private javax.swing.JComboBox JavaDoc positionModeCombo;
1233    private javax.swing.JLabel JavaDoc positionModeLabel;
1234    private javax.swing.JPanel JavaDoc positionModePanel;
1235    private javax.swing.JPanel JavaDoc positionPanel;
1236    private javax.swing.JPanel JavaDoc sizeContainerPanel;
1237    private javax.swing.JPanel JavaDoc sizePanel;
1238    private javax.swing.JComboBox JavaDoc visibleComboBox;
1239    private javax.swing.JLabel JavaDoc visibleLabel1;
1240    private javax.swing.JComboBox JavaDoc widthComboBox;
1241    private javax.swing.JLabel JavaDoc widthLabel;
1242    private javax.swing.JComboBox JavaDoc widthUnitComboBox;
1243    private javax.swing.JLabel JavaDoc zIndexLabel1;
1244    private javax.swing.JComboBox JavaDoc zindexComboBox;
1245    // End of variables declaration//GEN-END:variables
1246

1247}
1248
Popular Tags