KickJava   Java API By Example, From Geeks To Geeks.

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


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  * FontStyleEditor.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.CssProperties;
29 import org.netbeans.modules.css.visual.model.CssStyleData;
30 import org.netbeans.modules.css.visual.model.FontModel;
31 import org.netbeans.modules.css.visual.model.PropertyData;
32 import org.netbeans.modules.css.visual.model.PropertyWithUnitData;
33 import org.netbeans.modules.css.visual.model.TextDecorationData;
34 import org.netbeans.modules.css.visual.model.PropertyData;
35 import java.awt.BorderLayout JavaDoc;
36 import java.awt.Dimension JavaDoc;
37 import java.awt.FontMetrics JavaDoc;
38 import java.beans.PropertyChangeEvent JavaDoc;
39 import java.beans.PropertyChangeListener JavaDoc;
40 import java.util.StringTokenizer JavaDoc;
41 import javax.swing.DefaultComboBoxModel JavaDoc;
42 import javax.swing.DefaultListModel JavaDoc;
43 import javax.swing.SwingUtilities JavaDoc;
44 import org.netbeans.modules.css.visual.model.Utils;
45 import org.openide.util.NbBundle;
46
47 /**
48  * Font Style editor.
49  * @author Winston Prakash
50  * @version 1.0
51  */

52 public class FontStyleEditor extends StyleEditor implements PropertyChangeListener JavaDoc {
53
54     ColorSelectionField colorField = new ColorSelectionField();
55     TextDecorationData textDecorationData = new TextDecorationData();
56
57     FontModel fontModel = new FontModel();
58     DefaultListModel JavaDoc fontFamilies = fontModel.getFontFamilySetList();
59
60     DefaultListModel JavaDoc fontSizes;
61     DefaultComboBoxModel JavaDoc fontSizeUnits;
62     DefaultComboBoxModel JavaDoc fontStyles;
63     DefaultComboBoxModel JavaDoc fontWeights;
64     DefaultComboBoxModel JavaDoc fontVariants;
65
66     String JavaDoc temporaryFontSet = null;
67
68     /** Creates new form FontStyleEditor */
69     public FontStyleEditor() {
70         setName("fontStyleEditor"); //NOI18N
71
setDisplayName(NbBundle.getMessage(FontStyleEditor.class, "FONT_EDITOR_DISPNAME"));
72         initComponents();
73         colorSelectionPanel.add(colorField,BorderLayout.CENTER);
74         colorField.addPropertyChangeListener(this);
75         initialize();
76     }
77
78     private void initialize(){
79         // Set the font family to the GUI
80
fontModel = new FontModel();
81         fontFamilies = fontModel.getFontFamilySetList();
82         fontFaceList.setModel(fontFamilies);
83
84         // Set the font size to the GUI
85
fontSizes= fontModel.getFontSizeList();
86         fontSizeList.setModel(fontSizes);
87
88         fontSizeUnits= fontModel.getFontSizeUnitList();
89         fontSizeUnitCombo.setModel(fontSizeUnits);
90         fontSizeUnitCombo.setSelectedItem("px");
91
92         // Set the font Style to the GUI
93
fontStyles = fontModel.getFontStyleList();
94         fontStyleComboBox.setModel(fontStyles);
95
96         // Set the font Weight to the GUI
97
fontWeights = fontModel.getFontWeightList();
98         fontWeightComboBox.setModel(fontWeights);
99
100         // Set the font Variant to the GUI
101
fontVariants = fontModel.getFontVariantList();
102         fontVariantComboBox.setModel(fontVariants);
103
104         FontMetrics JavaDoc fontMetrics = fontSizeField.getFontMetrics(fontSizeField.getFont());
105         int width = fontMetrics.stringWidth((String JavaDoc) fontSizes.get(0)) + 10;
106         int height = (fontMetrics.getHeight() + 10) > 25 ? fontMetrics.getHeight() + 10 : 25;
107         fontSizeField.setPreferredSize(new Dimension JavaDoc (width, height));
108     }
109
110     /**
111      * Set the CSS Properties Values from the CssStyleData data structure
112      * to the GUI components.
113      */

114     protected void setCssPropertyValues(CssStyleData cssStyleData){
115         removeCssPropertyChangeListener();
116
117         String JavaDoc fontFamily = cssStyleData.getProperty(CssProperties.FONT_FAMILY);
118         if(fontFamily != null){
119             // This is a work around. Since batik parser puts the quotes around
120
// fonts with out spaces, remove the quotes from those fonts before
121
// adding it to the list, else the font set will appear doubly - one
122
// with quotes and one with out quotes.
123
StringBuffer JavaDoc fontSetBuf = new StringBuffer JavaDoc();
124             StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(fontFamily.trim(),",");
125             while(st.hasMoreTokens()){
126                 String JavaDoc fontName = st.nextToken();
127                 if(new StringTokenizer JavaDoc(fontName.trim()).countTokens() == 1){
128                     fontName = fontName.replaceAll("'","");
129                 }
130                 fontSetBuf.append(fontName);
131                 if(st.hasMoreTokens()) fontSetBuf.append(",");
132             }
133             
134             if(!fontFamilies.contains(fontSetBuf.toString())){
135                 // Work around to avoid adding the fonts to the list
136
// when user edit the font family in the editor
137
if (temporaryFontSet != null){
138                     fontFamilies.removeElement(temporaryFontSet);
139                 }
140                 fontFamilies.add(1,fontSetBuf.toString());
141                 temporaryFontSet = fontSetBuf.toString();
142             }
143             fontFaceList.setSelectedIndex(fontFamilies.indexOf(fontSetBuf.toString()));
144         }else{
145             fontFaceList.setSelectedIndex(0);
146         }
147         
148         String JavaDoc fontSizeStr = cssStyleData.getProperty(CssProperties.FONT_SIZE);
149         if(fontSizeStr != null){
150             // First check if absolute relative (large largere etc) font-size identifiers
151
if(fontSizes.contains(fontSizeStr)){
152                 fontSizeList.setSelectedIndex(fontSizes.indexOf(fontSizeStr));
153             }else{
154                 // Try splitiing in to numerical font size and unit
155
FontModel.FontSize fontSize = fontModel.getFontSize(fontSizeStr);
156                 if(fontSize.getValue()!= null){
157                     if(fontSizes.contains(fontSize.getValue())){
158                         fontSizeList.setSelectedIndex(fontSizes.indexOf(fontSize.getValue()));
159                     }else{
160                         fontSizeField.setText(fontSize.getValue());
161                     }
162                 }else{
163                     fontSizeList.setSelectedIndex(0);
164                 }
165                 if(fontSizeUnits.getIndexOf(fontSize.getUnit()) != -1){
166                     fontSizeUnitCombo.setSelectedIndex(fontSizeUnits.getIndexOf(fontSize.getUnit()));
167                 }
168             }
169         }else{
170             fontSizeList.setSelectedIndex(0);
171         }
172         
173         String JavaDoc fontStyle = cssStyleData.getProperty(CssProperties.FONT_STYLE);
174         if(fontStyle != null){
175             if(fontStyles.getIndexOf(fontStyle) != -1){
176                 fontStyleComboBox.setSelectedIndex(fontStyles.getIndexOf(fontStyle));
177             } else{
178                 fontStyleComboBox.setSelectedIndex(0);
179             }
180         }else{
181             fontStyleComboBox.setSelectedIndex(0);
182         }
183         
184         String JavaDoc fontWeight = cssStyleData.getProperty(CssProperties.FONT_WEIGHT);
185         if(fontWeight != null){
186             if(fontWeights.getIndexOf(fontWeight) != -1){
187                 fontWeightComboBox.setSelectedIndex(fontWeights.getIndexOf(fontWeight));
188             }else{
189                 fontWeightComboBox.setSelectedIndex(0);
190             }
191         }else{
192             fontWeightComboBox.setSelectedIndex(0);
193         }
194         
195         String JavaDoc fontVariant = cssStyleData.getProperty(CssProperties.FONT_VARIANT);
196         if(fontVariant != null){
197             if(fontVariants.getIndexOf(fontVariant) != -1){
198                 fontVariantComboBox.setSelectedIndex(fontVariants.getIndexOf(fontVariant));
199             } else{
200                 fontVariantComboBox.setSelectedIndex(0);
201             }
202         }else{
203             fontVariantComboBox.setSelectedIndex(0);
204         }
205         
206         // Set the Text Decoration the GUI
207
String JavaDoc textDecoration = cssStyleData.getProperty(CssProperties.TEXT_DECORATION);
208         noDecorationCheckbox.setSelected(false);
209         underlineCheckbox.setSelected(false);
210         overlineCheckbox.setSelected(false);
211         strikethroughCheckbox.setSelected(false);
212         if(textDecoration != null){
213             textDecorationData.setDecoration(textDecoration);
214             if (textDecorationData.noDecorationEnabled()){
215                 noDecorationCheckbox.setSelected(true);
216             }else{
217                 underlineCheckbox.setSelected(textDecorationData.underlineEnabled());
218                 overlineCheckbox.setSelected(textDecorationData.overlineEnabled());
219                 strikethroughCheckbox.setSelected(textDecorationData.lineThroughEnabled());
220             }
221         }
222         
223         // Set the Bckground Color the GUI
224
String JavaDoc textColor = cssStyleData.getProperty(CssProperties.COLOR);
225         if(textColor != null){
226             colorField.setColorString(textColor);
227         }else{
228             colorField.setColorString(CssStyleData.NOT_SET);
229         }
230         
231         setCssPropertyChangeListener(cssStyleData);
232     }
233     
234     /** Listens to the color property change in the color chooser filed */
235     public void propertyChange(PropertyChangeEvent JavaDoc evt) {
236         setFontColor();
237     }
238     
239     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
240
private void initComponents() {
241         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
242
243         mainPanel = new javax.swing.JPanel JavaDoc();
244         fontFamilyPanel = new javax.swing.JPanel JavaDoc();
245         fontLabel = new javax.swing.JLabel JavaDoc();
246         fontFaceScroll = new javax.swing.JScrollPane JavaDoc();
247         fontFaceList = new javax.swing.JList JavaDoc();
248         fontChosenField = new javax.swing.JTextField JavaDoc();
249         fontFamilyButton = new javax.swing.JButton JavaDoc();
250         fontSizePanel = new javax.swing.JPanel JavaDoc();
251         sizeLabel = new javax.swing.JLabel JavaDoc();
252         fontSizeField = new javax.swing.JTextField JavaDoc();
253         fontSizeUnitCombo = new javax.swing.JComboBox JavaDoc();
254         fontSizeScroll = new javax.swing.JScrollPane JavaDoc();
255         fontSizeList = new javax.swing.JList JavaDoc();
256         styleMainPanel = new javax.swing.JPanel JavaDoc();
257         stylePanel = new javax.swing.JPanel JavaDoc();
258         styleLabel = new javax.swing.JLabel JavaDoc();
259         fontStyleComboBox = new javax.swing.JComboBox JavaDoc();
260         weightLabel = new javax.swing.JLabel JavaDoc();
261         fontWeightComboBox = new javax.swing.JComboBox JavaDoc();
262         variantLabel = new javax.swing.JLabel JavaDoc();
263         fontVariantComboBox = new javax.swing.JComboBox JavaDoc();
264         colorLabel = new javax.swing.JLabel JavaDoc();
265         colorSelectionPanel = new javax.swing.JPanel JavaDoc();
266         decorationPanel = new javax.swing.JPanel JavaDoc();
267         decorationLabel = new javax.swing.JLabel JavaDoc();
268         underlineCheckbox = new javax.swing.JCheckBox JavaDoc();
269         strikethroughCheckbox = new javax.swing.JCheckBox JavaDoc();
270         overlineCheckbox = new javax.swing.JCheckBox JavaDoc();
271         noDecorationCheckbox = new javax.swing.JCheckBox JavaDoc();
272         errorPanel = new javax.swing.JPanel JavaDoc();
273         errorLabel = new javax.swing.JLabel JavaDoc();
274
275         setLayout(new java.awt.BorderLayout JavaDoc());
276
277         mainPanel.setLayout(new java.awt.BorderLayout JavaDoc());
278
279         fontFamilyPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
280
281         fontFamilyPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
282         fontLabel.setLabelFor(fontChosenField);
283         fontLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "Font_Family"));
284         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
285         gridBagConstraints.gridx = 0;
286         gridBagConstraints.gridy = 0;
287         gridBagConstraints.gridwidth = 2;
288         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
289         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
290         gridBagConstraints.weightx = 1.0;
291         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
292         fontFamilyPanel.add(fontLabel, gridBagConstraints);
293
294         fontFaceList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
295         fontFaceList.addListSelectionListener(new javax.swing.event.ListSelectionListener JavaDoc() {
296             public void valueChanged(javax.swing.event.ListSelectionEvent JavaDoc evt) {
297                 fontFaceListValueChanged(evt);
298             }
299         });
300
301         fontFaceScroll.setViewportView(fontFaceList);
302         fontFaceList.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontFamilyList"));
303         fontFaceList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontFamilyListAccessibleDescription"));
304
305         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
306         gridBagConstraints.gridx = 0;
307         gridBagConstraints.gridy = 2;
308         gridBagConstraints.gridwidth = 2;
309         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
310         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
311         gridBagConstraints.weightx = 1.0;
312         gridBagConstraints.weighty = 1.0;
313         fontFamilyPanel.add(fontFaceScroll, gridBagConstraints);
314
315         fontChosenField.setEditable(false);
316         fontChosenField.setMargin(new java.awt.Insets JavaDoc(1, 2, 2, 4));
317         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
318         gridBagConstraints.gridx = 0;
319         gridBagConstraints.gridy = 1;
320         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
321         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
322         gridBagConstraints.weightx = 1.0;
323         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
324         fontFamilyPanel.add(fontChosenField, gridBagConstraints);
325         fontChosenField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "chosenFontsAccessibleName"));
326         fontChosenField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "ChosenFontAccessibleDescription"));
327
328         fontFamilyButton.setMnemonic(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_FAMILY_EDIT_BTN_MNEMONIC").charAt(0));
329         fontFamilyButton.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "EDIT"));
330         fontFamilyButton.setMargin(new java.awt.Insets JavaDoc(4, 4, 4, 4));
331         fontFamilyButton.addActionListener(new java.awt.event.ActionListener JavaDoc() {
332             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
333                 fontFamilyButtonActionPerformed(evt);
334             }
335         });
336
337         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
338         gridBagConstraints.gridx = 1;
339         gridBagConstraints.gridy = 1;
340         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
341         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
342         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
343         fontFamilyPanel.add(fontFamilyButton, gridBagConstraints);
344         fontFamilyButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "EditChosenFontsAccessibleDescription"));
345
346         mainPanel.add(fontFamilyPanel, java.awt.BorderLayout.CENTER);
347
348         fontSizePanel.setLayout(new java.awt.GridBagLayout JavaDoc());
349
350         fontSizePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
351         sizeLabel.setLabelFor(fontSizeField);
352         sizeLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_SIZE"));
353         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
354         gridBagConstraints.gridx = 0;
355         gridBagConstraints.gridy = 0;
356         gridBagConstraints.gridwidth = 2;
357         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
358         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
359         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
360         fontSizePanel.add(sizeLabel, gridBagConstraints);
361
362         fontSizeField.setHorizontalAlignment(javax.swing.JTextField.LEFT);
363         fontSizeField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
364             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
365                 fontSizeFieldActionPerformed(evt);
366             }
367         });
368         fontSizeField.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
369             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
370                 fontSizeFieldFocusLost(evt);
371             }
372         });
373         fontSizeField.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
374             public void keyTyped(java.awt.event.KeyEvent JavaDoc evt) {
375                 fontSizeFieldKeyTyped(evt);
376             }
377         });
378
379         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
380         gridBagConstraints.gridx = 0;
381         gridBagConstraints.gridy = 1;
382         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
383         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
384         gridBagConstraints.weightx = 0.5;
385         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
386         fontSizePanel.add(fontSizeField, gridBagConstraints);
387         fontSizeField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "ChosenFontSizeAccessibleName"));
388         fontSizeField.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/css/visual/ui/Bundle").getString("ChosenFontSizeAccessibleDescription"));
389
390         fontSizeUnitCombo.addItemListener(new java.awt.event.ItemListener JavaDoc() {
391             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
392                 fontSizeUnitComboItemStateChanged(evt);
393             }
394         });
395
396         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
397         gridBagConstraints.gridx = 1;
398         gridBagConstraints.gridy = 1;
399         gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
400         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
401         fontSizePanel.add(fontSizeUnitCombo, gridBagConstraints);
402         fontSizeUnitCombo.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontSizeUnitListAccessibleName"));
403         fontSizeUnitCombo.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontSizeUnitListAccessibleDescription"));
404
405         fontSizeList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
406         fontSizeList.addListSelectionListener(new javax.swing.event.ListSelectionListener JavaDoc() {
407             public void valueChanged(javax.swing.event.ListSelectionEvent JavaDoc evt) {
408                 fontSizeListValueChanged(evt);
409             }
410         });
411
412         fontSizeScroll.setViewportView(fontSizeList);
413         fontSizeList.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontSizeListAccessibleName"));
414         fontSizeList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontSizeListAccessibleDesription"));
415
416         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
417         gridBagConstraints.gridx = 0;
418         gridBagConstraints.gridy = 2;
419         gridBagConstraints.gridwidth = 2;
420         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
421         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
422         gridBagConstraints.weighty = 1.0;
423         fontSizePanel.add(fontSizeScroll, gridBagConstraints);
424
425         mainPanel.add(fontSizePanel, java.awt.BorderLayout.EAST);
426
427         styleMainPanel.setLayout(new java.awt.BorderLayout JavaDoc(20, 0));
428
429         stylePanel.setLayout(new java.awt.GridBagLayout JavaDoc());
430
431         stylePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
432         styleLabel.setLabelFor(fontStyleComboBox);
433         styleLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_STYLE"));
434         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
435         gridBagConstraints.gridx = 0;
436         gridBagConstraints.gridy = 0;
437         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
438         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
439         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
440         stylePanel.add(styleLabel, gridBagConstraints);
441
442         fontStyleComboBox.setMinimumSize(new java.awt.Dimension JavaDoc(150, 20));
443         fontStyleComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
444             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
445                 fontStyleComboBoxItemStateChanged(evt);
446             }
447         });
448         fontStyleComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
449             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
450                 fontStyleComboBoxActionPerformed(evt);
451             }
452         });
453         fontStyleComboBox.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
454             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
455                 fontStyleComboBoxFocusLost(evt);
456             }
457         });
458
459         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
460         gridBagConstraints.gridx = 1;
461         gridBagConstraints.gridy = 0;
462         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
463         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
464         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
465         stylePanel.add(fontStyleComboBox, gridBagConstraints);
466         fontStyleComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "STYLE_LIST_ACCES_NAME"));
467         fontStyleComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontStyleSelectionAccessibleDescription"));
468
469         weightLabel.setLabelFor(fontWeightComboBox);
470         weightLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_WEIGHT"));
471         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
472         gridBagConstraints.gridx = 0;
473         gridBagConstraints.gridy = 1;
474         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
475         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
476         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
477         stylePanel.add(weightLabel, gridBagConstraints);
478
479         fontWeightComboBox.setMinimumSize(new java.awt.Dimension JavaDoc(150, 20));
480         fontWeightComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
481             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
482                 fontWeightComboBoxItemStateChanged(evt);
483             }
484         });
485         fontWeightComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
486             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
487                 fontWeightComboBoxActionPerformed(evt);
488             }
489         });
490         fontWeightComboBox.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
491             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
492                 fontWeightComboBoxFocusLost(evt);
493             }
494         });
495
496         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
497         gridBagConstraints.gridx = 1;
498         gridBagConstraints.gridy = 1;
499         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
500         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
501         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
502         stylePanel.add(fontWeightComboBox, gridBagConstraints);
503         fontWeightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontWeightSelectionAccessibleName"));
504         fontWeightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontWeightSelectionAccessibleDescription"));
505
506         variantLabel.setLabelFor(fontVariantComboBox);
507         variantLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_VARIANT"));
508         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
509         gridBagConstraints.gridx = 0;
510         gridBagConstraints.gridy = 2;
511         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
512         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
513         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
514         stylePanel.add(variantLabel, gridBagConstraints);
515         variantLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontVariantSelectionAccessibleDescription"));
516
517         fontVariantComboBox.setMinimumSize(new java.awt.Dimension JavaDoc(150, 20));
518         fontVariantComboBox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
519             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
520                 fontVariantComboBoxItemStateChanged(evt);
521             }
522         });
523         fontVariantComboBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
524             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
525                 fontVariantComboBoxActionPerformed(evt);
526             }
527         });
528         fontVariantComboBox.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
529             public void focusGained(java.awt.event.FocusEvent JavaDoc evt) {
530                 fontVariantComboBoxFocusGained(evt);
531             }
532             public void focusLost(java.awt.event.FocusEvent JavaDoc evt) {
533                 fontVariantComboBoxFocusLost(evt);
534             }
535         });
536
537         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
538         gridBagConstraints.gridx = 1;
539         gridBagConstraints.gridy = 2;
540         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
541         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
542         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
543         stylePanel.add(fontVariantComboBox, gridBagConstraints);
544         fontVariantComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontVariantSelectionAccessibleName"));
545         fontVariantComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontVariantSelectionAccessibleDescription"));
546
547         colorLabel.setLabelFor(colorSelectionPanel);
548         colorLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_COLOR"));
549         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
550         gridBagConstraints.gridx = 0;
551         gridBagConstraints.gridy = 3;
552         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
553         stylePanel.add(colorLabel, gridBagConstraints);
554
555         colorSelectionPanel.setLayout(new java.awt.BorderLayout JavaDoc());
556
557         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
558         gridBagConstraints.gridx = 1;
559         gridBagConstraints.gridy = 3;
560         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
561         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
562         stylePanel.add(colorSelectionPanel, gridBagConstraints);
563
564         styleMainPanel.add(stylePanel, java.awt.BorderLayout.WEST);
565
566         decorationPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
567
568         decorationPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
569         decorationLabel.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_DECORATION"));
570         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
571         gridBagConstraints.gridx = 0;
572         gridBagConstraints.gridy = 0;
573         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
574         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
575         decorationPanel.add(decorationLabel, gridBagConstraints);
576
577         underlineCheckbox.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_UNDERLINE"));
578         underlineCheckbox.setMargin(new java.awt.Insets JavaDoc(0, 2, 0, 2));
579         underlineCheckbox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
580             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
581                 underlineCheckboxItemStateChanged(evt);
582             }
583         });
584
585         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
586         gridBagConstraints.gridx = 1;
587         gridBagConstraints.gridy = 0;
588         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
589         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
590         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
591         decorationPanel.add(underlineCheckbox, gridBagConstraints);
592         underlineCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontUnderlineAccessibleDescription"));
593
594         strikethroughCheckbox.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_STRIKETHROUGH"));
595         strikethroughCheckbox.setMargin(new java.awt.Insets JavaDoc(0, 2, 0, 2));
596         strikethroughCheckbox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
597             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
598                 strikethroughCheckboxItemStateChanged(evt);
599             }
600         });
601
602         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
603         gridBagConstraints.gridx = 1;
604         gridBagConstraints.gridy = 2;
605         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
606         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
607         gridBagConstraints.weightx = 1.0;
608         gridBagConstraints.weighty = 1.0;
609         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
610         decorationPanel.add(strikethroughCheckbox, gridBagConstraints);
611         strikethroughCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontStrikeThroughAccessibleDescription"));
612
613         overlineCheckbox.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FONT_OVERLINE"));
614         overlineCheckbox.setMargin(new java.awt.Insets JavaDoc(0, 2, 0, 2));
615         overlineCheckbox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
616             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
617                 overlineCheckboxItemStateChanged(evt);
618             }
619         });
620
621         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
622         gridBagConstraints.gridx = 1;
623         gridBagConstraints.gridy = 1;
624         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
625         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
626         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 5, 0);
627         decorationPanel.add(overlineCheckbox, gridBagConstraints);
628         overlineCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontOverlineAccessibleDescription"));
629
630         noDecorationCheckbox.setText(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "NO_DECORATION"));
631         noDecorationCheckbox.addItemListener(new java.awt.event.ItemListener JavaDoc() {
632             public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
633                 noDecorationCheckboxItemStateChanged(evt);
634             }
635         });
636
637         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
638         gridBagConstraints.gridx = 1;
639         gridBagConstraints.gridy = 3;
640         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
641         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 5, 0, 0);
642         decorationPanel.add(noDecorationCheckbox, gridBagConstraints);
643         noDecorationCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FontStyleEditor.class, "FontNoDecorationAccessibleDescription"));
644
645         styleMainPanel.add(decorationPanel, java.awt.BorderLayout.CENTER);
646
647         mainPanel.add(styleMainPanel, java.awt.BorderLayout.SOUTH);
648
649         add(mainPanel, java.awt.BorderLayout.NORTH);
650
651         errorPanel.setLayout(new java.awt.BorderLayout JavaDoc());
652
653         errorPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 10, 1, 1));
654         errorLabel.setForeground(new java.awt.Color JavaDoc(0, 0, 153));
655         errorPanel.add(errorLabel, java.awt.BorderLayout.CENTER);
656
657         add(errorPanel, java.awt.BorderLayout.CENTER);
658
659     }// </editor-fold>//GEN-END:initComponents
660

661     private void noDecorationCheckboxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_noDecorationCheckboxItemStateChanged
662
textDecorationData.enableNoDecoration((evt.getStateChange() == evt.SELECTED));
663         if(evt.getStateChange() == evt.SELECTED){
664             strikethroughCheckbox.setSelected(false);
665             overlineCheckbox.setSelected(false);
666             underlineCheckbox.setSelected(false);
667             strikethroughCheckbox.setEnabled(false);
668             overlineCheckbox.setEnabled(false);
669             underlineCheckbox.setEnabled(false);
670         }else{
671             strikethroughCheckbox.setEnabled(true);
672             overlineCheckbox.setEnabled(true);
673             underlineCheckbox.setEnabled(true);
674         }
675         setTextDecoration();
676     }//GEN-LAST:event_noDecorationCheckboxItemStateChanged
677

678     private void fontVariantComboBoxFocusGained(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_fontVariantComboBoxFocusGained
679
errorLabel.setText(CssStyleData.PREVIEW_NOT_SUPPORTED);
680     }//GEN-LAST:event_fontVariantComboBoxFocusGained
681

682     private void strikethroughCheckboxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_strikethroughCheckboxItemStateChanged
683
textDecorationData.enableLineThrough((evt.getStateChange() == evt.SELECTED));
684         setTextDecoration();
685     }//GEN-LAST:event_strikethroughCheckboxItemStateChanged
686

687     private void overlineCheckboxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_overlineCheckboxItemStateChanged
688
textDecorationData.enableOverline((evt.getStateChange() == evt.SELECTED));
689         setTextDecoration();
690     }//GEN-LAST:event_overlineCheckboxItemStateChanged
691

692     private void underlineCheckboxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_underlineCheckboxItemStateChanged
693
textDecorationData.enableUnderline((evt.getStateChange() == evt.SELECTED));
694         setTextDecoration();
695     }//GEN-LAST:event_underlineCheckboxItemStateChanged
696

697     private void fontVariantComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_fontVariantComboBoxItemStateChanged
698
if (evt.getStateChange() != evt.DESELECTED) {
699             setFontVariant();
700         }
701     }//GEN-LAST:event_fontVariantComboBoxItemStateChanged
702

703     private void fontVariantComboBoxFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_fontVariantComboBoxFocusLost
704
errorLabel.setText("");
705         setFontVariant();
706     }//GEN-LAST:event_fontVariantComboBoxFocusLost
707

708     private void fontVariantComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_fontVariantComboBoxActionPerformed
709
setFontVariant();
710     }//GEN-LAST:event_fontVariantComboBoxActionPerformed
711

712     private void fontWeightComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_fontWeightComboBoxItemStateChanged
713
if (evt.getStateChange() != evt.DESELECTED) {
714             setFontWeight();
715         }
716     }//GEN-LAST:event_fontWeightComboBoxItemStateChanged
717

718     private void fontWeightComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_fontWeightComboBoxActionPerformed
719
setFontWeight();
720     }//GEN-LAST:event_fontWeightComboBoxActionPerformed
721

722     private void fontWeightComboBoxFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_fontWeightComboBoxFocusLost
723
setFontWeight();
724     }//GEN-LAST:event_fontWeightComboBoxFocusLost
725

726     private void fontStyleComboBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_fontStyleComboBoxActionPerformed
727
setFontStyle();
728     }//GEN-LAST:event_fontStyleComboBoxActionPerformed
729

730     private void fontStyleComboBoxFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_fontStyleComboBoxFocusLost
731
setFontStyle();
732     }//GEN-LAST:event_fontStyleComboBoxFocusLost
733

734     private void fontStyleComboBoxItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_fontStyleComboBoxItemStateChanged
735
if (evt.getStateChange() != evt.DESELECTED) {
736             setFontStyle();
737         }
738     }//GEN-LAST:event_fontStyleComboBoxItemStateChanged
739

740     private void fontSizeUnitComboItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_fontSizeUnitComboItemStateChanged
741
if (evt.getStateChange() != evt.DESELECTED) {
742             setFontSize();
743         }
744     }//GEN-LAST:event_fontSizeUnitComboItemStateChanged
745

746     private void fontSizeFieldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_fontSizeFieldActionPerformed
747
setFontSize();
748     }//GEN-LAST:event_fontSizeFieldActionPerformed
749

750     private void fontSizeFieldFocusLost(java.awt.event.FocusEvent JavaDoc evt) {//GEN-FIRST:event_fontSizeFieldFocusLost
751
setFontSize();
752     }//GEN-LAST:event_fontSizeFieldFocusLost
753

754     private void fontSizeFieldKeyTyped(java.awt.event.KeyEvent JavaDoc evt) {//GEN-FIRST:event_fontSizeFieldKeyTyped
755
SwingUtilities.invokeLater(new Runnable JavaDoc(){
756             public void run(){
757                 enableFontSizeUnitCombo(Utils.isInteger(fontSizeField.getText()));
758             }
759         });
760     }//GEN-LAST:event_fontSizeFieldKeyTyped
761

762     private void fontSizeListValueChanged(javax.swing.event.ListSelectionEvent JavaDoc evt) {//GEN-FIRST:event_fontSizeListValueChanged
763
if (evt.getValueIsAdjusting()) return;
764         String JavaDoc selectedFontSize = (String JavaDoc) fontSizeList.getSelectedValue();
765         fontSizeField.setText(selectedFontSize);
766         enableFontSizeUnitCombo(Utils.isInteger(selectedFontSize));
767         setFontSize();
768     }//GEN-LAST:event_fontSizeListValueChanged
769

770     private void enableFontSizeUnitCombo(final boolean enable){
771         SwingUtilities.invokeLater(new Runnable JavaDoc(){
772             public void run(){
773                 fontSizeUnitCombo.setEnabled(enable);
774             }
775         });
776     }
777     
778     private void fontFaceListValueChanged(javax.swing.event.ListSelectionEvent JavaDoc evt) {//GEN-FIRST:event_fontFaceListValueChanged
779
if (evt.getValueIsAdjusting()) return;
780         if(fontFaceList.getSelectedValue()!= null){
781             fontChosenField.setText(fontFaceList.getSelectedValue().toString());
782             setFontFamily();
783         }
784     }//GEN-LAST:event_fontFaceListValueChanged
785

786     private void fontFamilyButtonActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_fontFamilyButtonActionPerformed
787
FontFamilyEditorDialog fontFamilyEditor = new FontFamilyEditorDialog(fontFamilies, fontFaceList.getSelectedIndex());
788         fontFamilyEditor.showDialog();
789         fontFaceList.setSelectedIndex(fontFamilyEditor.getSelectedIndex());
790         fontChosenField.setText(fontFaceList.getSelectedValue().toString());
791         setFontFamily();
792     }//GEN-LAST:event_fontFamilyButtonActionPerformed
793

794     
795     private void setFontFamily(){
796         PropertyData fontFamilyData = new PropertyData();
797         fontFamilyData.setValue(fontChosenField.getText());
798         cssPropertyChangeSupport.firePropertyChange(CssProperties.FONT_FAMILY, null, fontFamilyData.toString());
799     }
800     
801     private void setFontSize(){
802         //XXX Do we need to put some constraints?
803
PropertyWithUnitData fontSizeData = new PropertyWithUnitData();
804         fontSizeData.setUnit(fontSizeUnitCombo.getSelectedItem().toString());
805         fontSizeData.setValue(fontSizeField.getText());
806         cssPropertyChangeSupport.firePropertyChange(CssProperties.FONT_SIZE, null, fontSizeData.toString());
807     }
808     
809     private void setFontStyle(){
810         PropertyData fontStyleData = new PropertyData();
811         fontStyleData.setValue(fontStyleComboBox.getSelectedItem().toString());
812         cssPropertyChangeSupport.firePropertyChange(CssProperties.FONT_STYLE, null, fontStyleData.toString());
813     }
814     
815     private void setFontWeight(){
816         PropertyData fontWeightData = new PropertyData();
817         fontWeightData.setValue(fontWeightComboBox.getSelectedItem().toString());
818         cssPropertyChangeSupport.firePropertyChange(CssProperties.FONT_WEIGHT, null, fontWeightData.toString());
819     }
820     
821     private void setFontVariant(){
822         PropertyData fontVariantData = new PropertyData();
823         fontVariantData.setValue(fontVariantComboBox.getSelectedItem().toString());
824         cssPropertyChangeSupport.firePropertyChange(CssProperties.FONT_VARIANT, null, fontVariantData.toString());
825     }
826     
827     private void setFontColor(){
828         PropertyData fontColorData = new PropertyData();
829         fontColorData.setValue(colorField.getColorString());
830         cssPropertyChangeSupport.firePropertyChange(CssProperties.COLOR, null, fontColorData.toString());
831     }
832     
833     private void setTextDecoration(){
834         cssPropertyChangeSupport.firePropertyChange(CssProperties.TEXT_DECORATION, null, textDecorationData.toString());
835     }
836     
837     
838     // Variables declaration - do not modify//GEN-BEGIN:variables
839
private javax.swing.JLabel JavaDoc colorLabel;
840     private javax.swing.JPanel JavaDoc colorSelectionPanel;
841     private javax.swing.JLabel JavaDoc decorationLabel;
842     private javax.swing.JPanel JavaDoc decorationPanel;
843     private javax.swing.JLabel JavaDoc errorLabel;
844     private javax.swing.JPanel JavaDoc errorPanel;
845     private javax.swing.JTextField JavaDoc fontChosenField;
846     private javax.swing.JList JavaDoc fontFaceList;
847     private javax.swing.JScrollPane JavaDoc fontFaceScroll;
848     private javax.swing.JButton JavaDoc fontFamilyButton;
849     private javax.swing.JPanel JavaDoc fontFamilyPanel;
850     private javax.swing.JLabel JavaDoc fontLabel;
851     private javax.swing.JTextField JavaDoc fontSizeField;
852     private javax.swing.JList JavaDoc fontSizeList;
853     private javax.swing.JPanel JavaDoc fontSizePanel;
854     private javax.swing.JScrollPane JavaDoc fontSizeScroll;
855     private javax.swing.JComboBox JavaDoc fontSizeUnitCombo;
856     private javax.swing.JComboBox JavaDoc fontStyleComboBox;
857     private javax.swing.JComboBox JavaDoc fontVariantComboBox;
858     private javax.swing.JComboBox JavaDoc fontWeightComboBox;
859     private javax.swing.JPanel JavaDoc mainPanel;
860     private javax.swing.JCheckBox JavaDoc noDecorationCheckbox;
861     private javax.swing.JCheckBox JavaDoc overlineCheckbox;
862     private javax.swing.JLabel JavaDoc sizeLabel;
863     private javax.swing.JCheckBox JavaDoc strikethroughCheckbox;
864     private javax.swing.JLabel JavaDoc styleLabel;
865     private javax.swing.JPanel JavaDoc styleMainPanel;
866     private javax.swing.JPanel JavaDoc stylePanel;
867     private javax.swing.JCheckBox JavaDoc underlineCheckbox;
868     private javax.swing.JLabel JavaDoc variantLabel;
869     private javax.swing.JLabel JavaDoc weightLabel;
870     // End of variables declaration//GEN-END:variables
871
}
872
Popular Tags