1 19 20 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 36 public class OtherStyleEditor extends StyleEditor { 37 38 39 public OtherStyleEditor() { 40 setName("otherStyleEditor"); setDisplayName(NbBundle.getMessage(OtherStyleEditor.class, "OTHER_EDITOR_DISPNAME")); 42 initComponents(); 43 } 44 45 49 protected void setCssPropertyValues(CssStyleData cssStyleData){ 50 removeCssPropertyChangeListener(); 51 setCssPropertyChangeListener(cssStyleData); 53 } 54 55 private void initComponents() { 57 java.awt.GridBagConstraints gridBagConstraints; 58 59 colorPanel = new javax.swing.JPanel (); 60 filterLabel = new javax.swing.JLabel (); 61 cursorComboBox = new javax.swing.JComboBox (); 62 filterComboBox = new javax.swing.JComboBox (); 63 cursorLabel = new javax.swing.JLabel (); 64 previewPanel = new javax.swing.JPanel (); 65 previewText = new javax.swing.JLabel (); 66 67 setLayout(new java.awt.GridBagLayout ()); 68 69 colorPanel.setLayout(new java.awt.GridBagLayout ()); 70 71 filterLabel.setText("Visual Filter:"); 72 gridBagConstraints = new java.awt.GridBagConstraints (); 73 gridBagConstraints.gridx = 0; 74 gridBagConstraints.gridy = 9; 75 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 76 gridBagConstraints.insets = new java.awt.Insets (6, 0, 0, 10); 77 colorPanel.add(filterLabel, gridBagConstraints); 78 79 cursorComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "<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 (); 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 (10, 0, 0, 0); 88 colorPanel.add(cursorComboBox, gridBagConstraints); 89 90 filterComboBox.setEditable(true); 91 filterComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "<Not Set>", "<value>" })); 92 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (6, 0, 0, 0); 101 colorPanel.add(filterComboBox, gridBagConstraints); 102 103 cursorLabel.setText("Cursor:"); 104 gridBagConstraints = new java.awt.GridBagConstraints (); 105 gridBagConstraints.gridx = 0; 106 gridBagConstraints.gridy = 8; 107 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 108 gridBagConstraints.insets = new java.awt.Insets (10, 0, 0, 10); 109 colorPanel.add(cursorLabel, gridBagConstraints); 110 111 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (0, 10, 5, 10); 119 add(colorPanel, gridBagConstraints); 120 121 previewPanel.setBorder(new javax.swing.border.TitledBorder ("Preview")); 122 previewPanel.setName(""); 123 previewText.setText("<preview of cursor and/or filter>"); 124 previewPanel.add(previewText); 125 126 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (5, 10, 10, 10); 132 add(previewPanel, gridBagConstraints); 133 134 } 135 137 private javax.swing.JPanel colorPanel; 139 private javax.swing.JComboBox cursorComboBox; 140 private javax.swing.JLabel cursorLabel; 141 private javax.swing.JComboBox filterComboBox; 142 private javax.swing.JLabel filterLabel; 143 private javax.swing.JPanel previewPanel; 144 private javax.swing.JLabel previewText; 145 147 } 148 | Popular Tags |