KickJava   Java API By Example, From Geeks To Geeks.

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


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  * OtherStyleEditor.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.CssStyleData;
29 import org.openide.util.NbBundle;
30
31 /**
32  * Position Style editor.
33  * @author Winston Prakash
34  * @version 1.0
35  */

36 public class OtherStyleEditor extends StyleEditor {
37
38     /** Creates new form FontStyleEditor */
39     public OtherStyleEditor() {
40         setName("otherStyleEditor"); //NOI18N
41
setDisplayName(NbBundle.getMessage(OtherStyleEditor.class, "OTHER_EDITOR_DISPNAME"));
42         initComponents();
43     }
44
45     /**
46      * Set the CSS Properties Values from the CssStyleData data structure
47      * to the GUI components.
48      */

49     protected void setCssPropertyValues(CssStyleData cssStyleData){
50         removeCssPropertyChangeListener();
51         // Set the values here
52
setCssPropertyChangeListener(cssStyleData);
53     }
54
55     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
56
private void initComponents() {
57         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
58
59         colorPanel = new javax.swing.JPanel JavaDoc();
60         filterLabel = new javax.swing.JLabel JavaDoc();
61         cursorComboBox = new javax.swing.JComboBox JavaDoc();
62         filterComboBox = new javax.swing.JComboBox JavaDoc();
63         cursorLabel = new javax.swing.JLabel JavaDoc();
64         previewPanel = new javax.swing.JPanel JavaDoc();
65         previewText = new javax.swing.JLabel JavaDoc();
66
67         setLayout(new java.awt.GridBagLayout JavaDoc());
68
69         colorPanel.setLayout(new java.awt.GridBagLayout JavaDoc());
70
71         filterLabel.setText("Visual Filter:");
72         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
73         gridBagConstraints.gridx = 0;
74         gridBagConstraints.gridy = 9;
75         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
76         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 0, 0, 10);
77         colorPanel.add(filterLabel, gridBagConstraints);
78
79         cursorComboBox.setModel(new javax.swing.DefaultComboBoxModel JavaDoc(new String JavaDoc[] { "<Not Set>", "hand", "crosshair", "text", "wait", "default", "help", "n-resize", "s-resize", "e-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize" }));
80         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
81         gridBagConstraints.gridx = 1;
82         gridBagConstraints.gridy = 8;
83         gridBagConstraints.gridwidth = 2;
84         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
85         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
86         gridBagConstraints.weightx = 1.0;
87         gridBagConstraints.insets = new java.awt.Insets JavaDoc(10, 0, 0, 0);
88         colorPanel.add(cursorComboBox, gridBagConstraints);
89
90         filterComboBox.setEditable(true);
91         filterComboBox.setModel(new javax.swing.DefaultComboBoxModel JavaDoc(new String JavaDoc[] { "<Not Set>", "<value>" }));
92         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
93         gridBagConstraints.gridx = 1;
94         gridBagConstraints.gridy = 9;
95         gridBagConstraints.gridwidth = 2;
96         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
97         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
98         gridBagConstraints.weightx = 1.0;
99         gridBagConstraints.weighty = 1.0;
100         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 0, 0, 0);
101         colorPanel.add(filterComboBox, gridBagConstraints);
102
103         cursorLabel.setText("Cursor:");
104         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
105         gridBagConstraints.gridx = 0;
106         gridBagConstraints.gridy = 8;
107         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
108         gridBagConstraints.insets = new java.awt.Insets JavaDoc(10, 0, 0, 10);
109         colorPanel.add(cursorLabel, gridBagConstraints);
110
111         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
112         gridBagConstraints.gridx = 0;
113         gridBagConstraints.gridy = 0;
114         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
115         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
116         gridBagConstraints.weightx = 1.0;
117         gridBagConstraints.weighty = 1.0;
118         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 10, 5, 10);
119         add(colorPanel, gridBagConstraints);
120
121         previewPanel.setBorder(new javax.swing.border.TitledBorder JavaDoc("Preview"));
122         previewPanel.setName("");
123         previewText.setText("<preview of cursor and/or filter>");
124         previewPanel.add(previewText);
125
126         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
127         gridBagConstraints.gridx = 0;
128         gridBagConstraints.gridy = 1;
129         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
130         gridBagConstraints.weighty = 1.0;
131         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 10, 10, 10);
132         add(previewPanel, gridBagConstraints);
133
134     }
135     // </editor-fold>//GEN-END:initComponents
136

137     // Variables declaration - do not modify//GEN-BEGIN:variables
138
private javax.swing.JPanel JavaDoc colorPanel;
139     private javax.swing.JComboBox JavaDoc cursorComboBox;
140     private javax.swing.JLabel JavaDoc cursorLabel;
141     private javax.swing.JComboBox JavaDoc filterComboBox;
142     private javax.swing.JLabel JavaDoc filterLabel;
143     private javax.swing.JPanel JavaDoc previewPanel;
144     private javax.swing.JLabel JavaDoc previewText;
145     // End of variables declaration//GEN-END:variables
146

147 }
148
Popular Tags