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 ListStyleEditor extends StyleEditor { 37 38 39 public ListStyleEditor() { 40 setName("listStyleEditor"); setDisplayName(NbBundle.getMessage(ListStyleEditor.class, "LIST_EDITOR_DISPNAME")); 42 initComponents(); 43 } 44 45 49 protected void setCssPropertyValues(CssStyleData cssStyleData){ 50 removeCssPropertyChangeListener(); 51 setCssPropertyChangeListener(cssStyleData); 53 } 54 55 private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; 57 58 previewPanel = new javax.swing.JPanel (); 59 previewText = new javax.swing.JLabel (); 60 colorPanel = new javax.swing.JPanel (); 61 decorationLabel = new javax.swing.JLabel (); 62 listTypeCombo = new javax.swing.JComboBox (); 63 jLabel1 = new javax.swing.JLabel (); 64 jLabel2 = new javax.swing.JLabel (); 65 jComboBox1 = new javax.swing.JComboBox (); 66 jComboBox2 = new javax.swing.JComboBox (); 67 colorButton = new javax.swing.JButton (); 68 69 setLayout(new java.awt.GridBagLayout ()); 70 71 previewPanel.setBorder(new javax.swing.border.TitledBorder ("Preview")); 72 previewPanel.setName(""); 73 previewText.setText("<preview of the list with a couple items>"); 74 previewPanel.add(previewText); 75 76 gridBagConstraints = new java.awt.GridBagConstraints (); 77 gridBagConstraints.gridx = 0; 78 gridBagConstraints.gridy = 1; 79 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 80 gridBagConstraints.weighty = 1.0; 81 gridBagConstraints.insets = new java.awt.Insets (5, 10, 10, 10); 82 add(previewPanel, gridBagConstraints); 83 84 colorPanel.setLayout(new java.awt.GridBagLayout ()); 85 86 decorationLabel.setText("Bullet Icon:"); 87 gridBagConstraints = new java.awt.GridBagConstraints (); 88 gridBagConstraints.gridx = 0; 89 gridBagConstraints.gridy = 2; 90 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 91 gridBagConstraints.insets = new java.awt.Insets (10, 0, 0, 10); 92 colorPanel.add(decorationLabel, gridBagConstraints); 93 94 listTypeCombo.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "<Not Set>", "disc", "circle", "square", "decimal (1, 2, 3...)", "lower-roman (i, ii, iii...)", "upper-roman (I, II, III...)", "lower-alpha (a, b, c...)", "upper-alpha (A, B, C...)", "none" })); 95 gridBagConstraints = new java.awt.GridBagConstraints (); 96 gridBagConstraints.gridx = 1; 97 gridBagConstraints.gridy = 0; 98 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 99 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 100 gridBagConstraints.insets = new java.awt.Insets (5, 0, 0, 0); 101 colorPanel.add(listTypeCombo, gridBagConstraints); 102 103 jLabel1.setText("List Type:"); 104 gridBagConstraints = new java.awt.GridBagConstraints (); 105 gridBagConstraints.gridx = 0; 106 gridBagConstraints.gridy = 0; 107 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 108 gridBagConstraints.insets = new java.awt.Insets (5, 0, 0, 10); 109 colorPanel.add(jLabel1, gridBagConstraints); 110 111 jLabel2.setText("Bullet Position"); 112 gridBagConstraints = new java.awt.GridBagConstraints (); 113 gridBagConstraints.gridx = 0; 114 gridBagConstraints.gridy = 3; 115 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 116 gridBagConstraints.insets = new java.awt.Insets (6, 0, 0, 10); 117 colorPanel.add(jLabel2, gridBagConstraints); 118 119 jComboBox1.setEditable(true); 120 jComboBox1.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "<Not Set>", "<URL>", "none" })); 121 gridBagConstraints = new java.awt.GridBagConstraints (); 122 gridBagConstraints.gridx = 1; 123 gridBagConstraints.gridy = 2; 124 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 125 gridBagConstraints.weightx = 1.0; 126 gridBagConstraints.insets = new java.awt.Insets (10, 0, 0, 0); 127 colorPanel.add(jComboBox1, gridBagConstraints); 128 129 jComboBox2.setEditable(true); 130 jComboBox2.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "<Not Set>", "inside", "outside" })); 131 gridBagConstraints = new java.awt.GridBagConstraints (); 132 gridBagConstraints.gridx = 1; 133 gridBagConstraints.gridy = 3; 134 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 135 gridBagConstraints.weightx = 1.0; 136 gridBagConstraints.insets = new java.awt.Insets (6, 0, 0, 0); 137 colorPanel.add(jComboBox2, gridBagConstraints); 138 139 colorButton.setText("..."); 140 colorButton.setMargin(new java.awt.Insets (2, 5, 2, 5)); 141 gridBagConstraints = new java.awt.GridBagConstraints (); 142 gridBagConstraints.gridx = 2; 143 gridBagConstraints.gridy = 2; 144 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 145 gridBagConstraints.insets = new java.awt.Insets (10, 5, 0, 0); 146 colorPanel.add(colorButton, gridBagConstraints); 147 148 gridBagConstraints = new java.awt.GridBagConstraints (); 149 gridBagConstraints.gridx = 0; 150 gridBagConstraints.gridy = 0; 151 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 152 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 153 gridBagConstraints.weightx = 1.0; 154 gridBagConstraints.insets = new java.awt.Insets (0, 10, 5, 10); 155 add(colorPanel, gridBagConstraints); 156 157 } 159 private javax.swing.JButton colorButton; 161 private javax.swing.JPanel colorPanel; 162 private javax.swing.JLabel decorationLabel; 163 private javax.swing.JComboBox jComboBox1; 164 private javax.swing.JComboBox jComboBox2; 165 private javax.swing.JLabel jLabel1; 166 private javax.swing.JLabel jLabel2; 167 private javax.swing.JComboBox listTypeCombo; 168 private javax.swing.JPanel previewPanel; 169 private javax.swing.JLabel previewText; 170 172 } 173 | Popular Tags |