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: package org.netbeans.modules.visualweb.propertyeditors.css;
042:
043: import javax.swing.Icon;
044: import javax.swing.JPanel;
045: import org.openide.util.NbBundle;
046:
047: /**
048: * Position Style editor.
049: * @author Winston Prakash
050: * Jeff Hoffman (HIE design)
051: */
052: public class OtherStyleEditor extends StyleEditor {
053:
054: /** Creates new form FontStyleEditor */
055: public OtherStyleEditor() {
056: setName("otherStyleEditor"); //NOI18N
057: setDisplayName(NbBundle.getMessage(StyleBuilderDialog.class,
058: "OTHER_EDITOR_DISPNAME"));
059: initComponents();
060: }
061:
062: private void initComponents() {//GEN-BEGIN:initComponents
063: java.awt.GridBagConstraints gridBagConstraints;
064:
065: colorPanel = new javax.swing.JPanel();
066: filterLabel = new javax.swing.JLabel();
067: cursorComboBox = new javax.swing.JComboBox();
068: filterComboBox = new javax.swing.JComboBox();
069: cursorLabel = new javax.swing.JLabel();
070: previewPanel = new javax.swing.JPanel();
071: previewText = new javax.swing.JLabel();
072:
073: setLayout(new java.awt.GridBagLayout());
074:
075: colorPanel.setLayout(new java.awt.GridBagLayout());
076:
077: filterLabel.setText("Visual Filter:");
078: gridBagConstraints = new java.awt.GridBagConstraints();
079: gridBagConstraints.gridx = 0;
080: gridBagConstraints.gridy = 9;
081: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
082: gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 10);
083: colorPanel.add(filterLabel, gridBagConstraints);
084:
085: cursorComboBox.setModel(new javax.swing.DefaultComboBoxModel(
086: new String[] { "<Not Set>", "hand", "crosshair",
087: "text", "wait", "default", "help", "n-resize",
088: "s-resize", "e-resize", "w-resize",
089: "ne-resize", "nw-resize", "se-resize",
090: "sw-resize" }));
091: gridBagConstraints = new java.awt.GridBagConstraints();
092: gridBagConstraints.gridx = 1;
093: gridBagConstraints.gridy = 8;
094: gridBagConstraints.gridwidth = 2;
095: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
096: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
097: gridBagConstraints.weightx = 1.0;
098: gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
099: colorPanel.add(cursorComboBox, gridBagConstraints);
100:
101: filterComboBox.setEditable(true);
102: filterComboBox.setModel(new javax.swing.DefaultComboBoxModel(
103: new String[] { "<Not Set>", "<value>" }));
104: gridBagConstraints = new java.awt.GridBagConstraints();
105: gridBagConstraints.gridx = 1;
106: gridBagConstraints.gridy = 9;
107: gridBagConstraints.gridwidth = 2;
108: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
109: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
110: gridBagConstraints.weightx = 1.0;
111: gridBagConstraints.weighty = 1.0;
112: gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 0);
113: colorPanel.add(filterComboBox, gridBagConstraints);
114:
115: cursorLabel.setText("Cursor:");
116: gridBagConstraints = new java.awt.GridBagConstraints();
117: gridBagConstraints.gridx = 0;
118: gridBagConstraints.gridy = 8;
119: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
120: gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 10);
121: colorPanel.add(cursorLabel, gridBagConstraints);
122:
123: gridBagConstraints = new java.awt.GridBagConstraints();
124: gridBagConstraints.gridx = 0;
125: gridBagConstraints.gridy = 0;
126: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
127: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
128: gridBagConstraints.weightx = 1.0;
129: gridBagConstraints.weighty = 1.0;
130: gridBagConstraints.insets = new java.awt.Insets(0, 10, 5, 10);
131: add(colorPanel, gridBagConstraints);
132:
133: previewPanel.setBorder(new javax.swing.border.TitledBorder(
134: "Preview"));
135: previewPanel.setName("");
136: previewText.setText("<preview of cursor and/or filter>");
137: previewPanel.add(previewText);
138:
139: gridBagConstraints = new java.awt.GridBagConstraints();
140: gridBagConstraints.gridx = 0;
141: gridBagConstraints.gridy = 1;
142: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
143: gridBagConstraints.weighty = 1.0;
144: gridBagConstraints.insets = new java.awt.Insets(5, 10, 10, 10);
145: add(previewPanel, gridBagConstraints);
146:
147: }//GEN-END:initComponents
148:
149: // Variables declaration - do not modify//GEN-BEGIN:variables
150: private javax.swing.JPanel colorPanel;
151: private javax.swing.JComboBox cursorComboBox;
152: private javax.swing.JLabel cursorLabel;
153: private javax.swing.JComboBox filterComboBox;
154: private javax.swing.JLabel filterLabel;
155: private javax.swing.JPanel previewPanel;
156: private javax.swing.JLabel previewText;
157: // End of variables declaration//GEN-END:variables
158:
159: }
|