001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: /*
043: * OtherStyleEditor.java
044: *
045: * Created on October 13, 2004, 12:23 PM
046: */
047:
048: package org.netbeans.modules.css.visual.ui;
049:
050: import org.netbeans.modules.css.editor.model.CssRuleContent;
051: import org.openide.util.NbBundle;
052:
053: /**
054: * Position Style editor.
055: * @author Winston Prakash
056: * @version 1.0
057: */
058: public class OtherStyleEditor extends StyleEditor {
059:
060: /** Creates new form FontStyleEditor */
061: public OtherStyleEditor() {
062: setName("otherStyleEditor"); //NOI18N
063: setDisplayName(NbBundle.getMessage(OtherStyleEditor.class,
064: "OTHER_EDITOR_DISPNAME"));
065: initComponents();
066: }
067:
068: /**
069: * Set the CSS Properties Values from the CssStyleData data structure
070: * to the GUI components.
071: */
072: protected void setCssPropertyValues(CssRuleContent cssStyleData) {
073: removeCssPropertyChangeListener();
074: // Set the values here
075: setCssPropertyChangeListener(cssStyleData);
076: }
077:
078: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
079: private void initComponents() {
080: java.awt.GridBagConstraints gridBagConstraints;
081:
082: colorPanel = new javax.swing.JPanel();
083: filterLabel = new javax.swing.JLabel();
084: cursorComboBox = new javax.swing.JComboBox();
085: filterComboBox = new javax.swing.JComboBox();
086: cursorLabel = new javax.swing.JLabel();
087: previewPanel = new javax.swing.JPanel();
088: previewText = new javax.swing.JLabel();
089:
090: setLayout(new java.awt.GridBagLayout());
091:
092: colorPanel.setLayout(new java.awt.GridBagLayout());
093:
094: filterLabel.setText("Visual Filter:");
095: gridBagConstraints = new java.awt.GridBagConstraints();
096: gridBagConstraints.gridx = 0;
097: gridBagConstraints.gridy = 9;
098: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
099: gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 10);
100: colorPanel.add(filterLabel, gridBagConstraints);
101:
102: cursorComboBox.setModel(new javax.swing.DefaultComboBoxModel(
103: new String[] { "<Not Set>", "hand", "crosshair",
104: "text", "wait", "default", "help", "n-resize",
105: "s-resize", "e-resize", "w-resize",
106: "ne-resize", "nw-resize", "se-resize",
107: "sw-resize" }));
108: gridBagConstraints = new java.awt.GridBagConstraints();
109: gridBagConstraints.gridx = 1;
110: gridBagConstraints.gridy = 8;
111: gridBagConstraints.gridwidth = 2;
112: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
113: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
114: gridBagConstraints.weightx = 1.0;
115: gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
116: colorPanel.add(cursorComboBox, gridBagConstraints);
117:
118: filterComboBox.setEditable(true);
119: filterComboBox.setModel(new javax.swing.DefaultComboBoxModel(
120: new String[] { "<Not Set>", "<value>" }));
121: gridBagConstraints = new java.awt.GridBagConstraints();
122: gridBagConstraints.gridx = 1;
123: gridBagConstraints.gridy = 9;
124: gridBagConstraints.gridwidth = 2;
125: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
126: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
127: gridBagConstraints.weightx = 1.0;
128: gridBagConstraints.weighty = 1.0;
129: gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 0);
130: colorPanel.add(filterComboBox, gridBagConstraints);
131:
132: cursorLabel.setText("Cursor:");
133: gridBagConstraints = new java.awt.GridBagConstraints();
134: gridBagConstraints.gridx = 0;
135: gridBagConstraints.gridy = 8;
136: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
137: gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 10);
138: colorPanel.add(cursorLabel, gridBagConstraints);
139:
140: gridBagConstraints = new java.awt.GridBagConstraints();
141: gridBagConstraints.gridx = 0;
142: gridBagConstraints.gridy = 0;
143: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
144: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
145: gridBagConstraints.weightx = 1.0;
146: gridBagConstraints.weighty = 1.0;
147: gridBagConstraints.insets = new java.awt.Insets(0, 10, 5, 10);
148: add(colorPanel, gridBagConstraints);
149:
150: previewPanel.setBorder(new javax.swing.border.TitledBorder(
151: "Preview"));
152: previewPanel.setName("");
153: previewText.setText("<preview of cursor and/or filter>");
154: previewPanel.add(previewText);
155:
156: gridBagConstraints = new java.awt.GridBagConstraints();
157: gridBagConstraints.gridx = 0;
158: gridBagConstraints.gridy = 1;
159: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
160: gridBagConstraints.weighty = 1.0;
161: gridBagConstraints.insets = new java.awt.Insets(5, 10, 10, 10);
162: add(previewPanel, gridBagConstraints);
163:
164: }
165:
166: // </editor-fold>//GEN-END:initComponents
167:
168: // Variables declaration - do not modify//GEN-BEGIN:variables
169: private javax.swing.JPanel colorPanel;
170: private javax.swing.JComboBox cursorComboBox;
171: private javax.swing.JLabel cursorLabel;
172: private javax.swing.JComboBox filterComboBox;
173: private javax.swing.JLabel filterLabel;
174: private javax.swing.JPanel previewPanel;
175: private javax.swing.JLabel previewText;
176: // End of variables declaration//GEN-END:variables
177:
178: }
|