1 19 20 25 26 package org.netbeans.modules.css.visual.ui; 27 28 import org.netbeans.modules.css.visual.model.ClipData; 29 import org.netbeans.modules.css.visual.model.ClipModel; 30 import org.netbeans.modules.css.visual.model.CssProperties; 31 import org.netbeans.modules.css.visual.model.CssStyleData; 32 import org.netbeans.modules.css.visual.model.PositionData; 33 import org.netbeans.modules.css.visual.model.PositionModel; 34 import org.netbeans.modules.css.visual.model.PropertyData; 35 import org.netbeans.modules.css.visual.model.PropertyWithUnitData; 36 import org.netbeans.modules.css.visual.model.PropertyData; 37 import javax.swing.DefaultComboBoxModel ; 38 import javax.swing.JTextField ; 39 import javax.swing.SwingUtilities ; 40 import org.netbeans.modules.css.visual.model.Utils; 41 import org.openide.util.NbBundle; 42 43 48 public class PositionStyleEditor extends StyleEditor { 49 50 DefaultComboBoxModel positionModeList; 51 PositionData positionData = new PositionData(); 52 ClipData clipData = new ClipData(); 53 54 55 public PositionStyleEditor() { 56 setName("positionStyleEditor"); setDisplayName(NbBundle.getMessage(PositionStyleEditor.class, "POSITION_EDITOR_DISPNAME")); 58 initComponents(); 59 initialize(); 60 61 final JTextField widthComboBoxEditor = (JTextField ) widthComboBox.getEditor().getEditorComponent(); 63 widthComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 64 public void keyTyped(java.awt.event.KeyEvent evt) { 65 SwingUtilities.invokeLater(new Runnable (){ 66 public void run(){ 67 widthUnitComboBox.setEnabled(Utils.isInteger(widthComboBoxEditor.getText())); 68 } 69 }); 70 } 71 }); 72 final JTextField heightComboBoxEditor = (JTextField ) heightComboBox.getEditor().getEditorComponent(); 73 heightComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 74 public void keyTyped(java.awt.event.KeyEvent evt) { 75 SwingUtilities.invokeLater(new Runnable (){ 76 public void run(){ 77 heightUnitComboBox.setEnabled(Utils.isInteger(heightComboBoxEditor.getText())); 78 } 79 }); 80 } 81 }); 82 83 85 final JTextField posTopComboBoxEditor = (JTextField ) posTopComboBox.getEditor().getEditorComponent(); 86 posTopComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 87 public void keyTyped(java.awt.event.KeyEvent evt) { 88 SwingUtilities.invokeLater(new Runnable (){ 89 public void run(){ 90 posTopUnitComboBox.setEnabled(Utils.isInteger(posTopComboBoxEditor.getText())); 91 } 92 }); 93 } 94 }); 95 final JTextField posRightComboBoxEditor = (JTextField ) posRightComboBox.getEditor().getEditorComponent(); 96 posRightComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 97 public void keyTyped(java.awt.event.KeyEvent evt) { 98 SwingUtilities.invokeLater(new Runnable (){ 99 public void run(){ 100 posRightUnitComboBox.setEnabled(Utils.isInteger(posRightComboBoxEditor.getText())); 101 } 102 }); 103 } 104 }); 105 final JTextField posBottomComboBoxEditor = (JTextField ) posBottomComboBox.getEditor().getEditorComponent(); 106 posBottomComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 107 public void keyTyped(java.awt.event.KeyEvent evt) { 108 SwingUtilities.invokeLater(new Runnable (){ 109 public void run(){ 110 posBottomUnitComboBox.setEnabled(Utils.isInteger(posBottomComboBoxEditor.getText())); 111 } 112 }); 113 } 114 }); 115 final JTextField posLeftComboBoxEditor = (JTextField ) posLeftComboBox.getEditor().getEditorComponent(); 116 posLeftComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 117 public void keyTyped(java.awt.event.KeyEvent evt) { 118 SwingUtilities.invokeLater(new Runnable (){ 119 public void run(){ 120 posLeftUnitComboBox.setEnabled(Utils.isInteger(posLeftComboBoxEditor.getText())); 121 } 122 }); 123 124 } 125 }); 126 127 129 final JTextField clipTopComboBoxEditor = (JTextField ) clipTopComboBox.getEditor().getEditorComponent(); 130 clipTopComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 131 public void keyTyped(java.awt.event.KeyEvent evt) { 132 SwingUtilities.invokeLater(new Runnable (){ 133 public void run(){ 134 clipTopUnitComboBox.setEnabled(Utils.isInteger(clipTopComboBoxEditor.getText())); 135 } 136 }); 137 } 138 }); 139 final JTextField clipRightComboBoxEditor = (JTextField ) clipRightComboBox.getEditor().getEditorComponent(); 140 clipRightComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 141 public void keyTyped(java.awt.event.KeyEvent evt) { 142 SwingUtilities.invokeLater(new Runnable (){ 143 public void run(){ 144 clipRightUnitComboBox.setEnabled(Utils.isInteger(clipRightComboBoxEditor.getText())); 145 } 146 }); 147 } 148 }); 149 final JTextField clipBottomComboBoxEditor = (JTextField ) clipBottomComboBox.getEditor().getEditorComponent(); 150 clipBottomComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 151 public void keyTyped(java.awt.event.KeyEvent evt) { 152 SwingUtilities.invokeLater(new Runnable (){ 153 public void run(){ 154 clipBottomUnitComboBox.setEnabled(Utils.isInteger(clipBottomComboBoxEditor.getText())); 155 } 156 }); 157 } 158 }); 159 final JTextField clipLeftComboBoxEditor = (JTextField ) clipLeftComboBox.getEditor().getEditorComponent(); 160 clipLeftComboBoxEditor.addKeyListener(new java.awt.event.KeyAdapter () { 161 public void keyTyped(java.awt.event.KeyEvent evt) { 162 SwingUtilities.invokeLater(new Runnable (){ 163 public void run(){ 164 clipLeftComboBoxEditor.setEnabled(Utils.isInteger(clipLeftComboBoxEditor.getText())); 165 } 166 }); 167 } 168 }); 169 } 170 171 175 protected void setCssPropertyValues(CssStyleData cssStyleData){ 176 removeCssPropertyChangeListener(); 177 String positionMode = cssStyleData.getProperty(CssProperties.POSITION); 178 if(positionMode != null){ 179 positionModeCombo.setSelectedItem(positionMode); 180 }else{ 181 positionModeCombo.setSelectedIndex(0); 182 } 183 String posTop = cssStyleData.getProperty(CssProperties.TOP); 184 if(posTop != null){ 185 positionData.setTop(posTop); 186 posTopComboBox.setSelectedItem(positionData.getTopValue()); 187 posTopUnitComboBox.setSelectedItem(positionData.getTopUnit()); 188 }else{ 189 posTopComboBox.setSelectedIndex(0); 190 posTopUnitComboBox.setSelectedItem("px"); } 192 193 String posBottom = cssStyleData.getProperty(CssProperties.BOTTOM); 194 if(posBottom != null){ 195 positionData.setBottom(posBottom); 196 posBottomComboBox.setSelectedItem(positionData.getBottomValue()); 197 posBottomUnitComboBox.setSelectedItem(positionData.getBottomUnit()); 198 }else{ 199 posBottomComboBox.setSelectedIndex(0); 200 posBottomUnitComboBox.setSelectedItem("px"); } 202 203 String posLeft = cssStyleData.getProperty(CssProperties.LEFT); 204 if(posLeft != null){ 205 positionData.setLeft(posLeft); 206 posLeftComboBox.setSelectedItem(positionData.getLeftValue()); 207 posLeftUnitComboBox.setSelectedItem(positionData.getLeftUnit()); 208 }else{ 209 posLeftComboBox.setSelectedIndex(0); 210 posLeftUnitComboBox.setSelectedItem("px"); } 212 213 String width = cssStyleData.getProperty(CssProperties.WIDTH); 214 if(width != null){ 215 positionData.setWidth(width); 216 widthComboBox.setSelectedItem(positionData.getWidthValue()); 217 widthUnitComboBox.setSelectedItem(positionData.getWidthUnit()); 218 }else{ 219 widthComboBox.setSelectedIndex(0); 220 widthUnitComboBox.setSelectedItem("px"); } 222 223 String height = cssStyleData.getProperty(CssProperties.HEIGHT); 224 if(height != null){ 225 positionData.setHeight(height); 226 heightComboBox.setSelectedItem(positionData.getHeightValue()); 227 heightUnitComboBox.setSelectedItem(positionData.getHeightUnit()); 228 }else{ 229 heightComboBox.setSelectedIndex(0); 230 heightUnitComboBox.setSelectedItem("px"); } 232 233 String visibility = cssStyleData.getProperty(CssProperties.VISIBILITY); 234 if(visibility != null){ 235 visibleComboBox.setSelectedItem(visibility); 236 }else{ 237 visibleComboBox.setSelectedIndex(0); 238 } 239 240 String zindex = cssStyleData.getProperty(CssProperties.Z_INDEX); 241 if(zindex != null){ 242 zindexComboBox.setSelectedItem(zindex); 243 }else{ 244 zindexComboBox.setSelectedIndex(0); 245 } 246 247 String posRight = cssStyleData.getProperty(CssProperties.RIGHT); 248 if(posRight != null){ 249 positionData.setRight(posRight); 250 posRightComboBox.setSelectedItem(positionData.getRightValue()); 251 posRightUnitComboBox.setSelectedItem(positionData.getRightUnit()); 252 }else{ 253 posRightComboBox.setSelectedIndex(0); 254 posRightUnitComboBox.setSelectedItem("px"); } 256 257 String clip = cssStyleData.getProperty(CssProperties.CLIP); 258 clipData.setClip(clip); 259 clipTopComboBox.setSelectedItem(clipData.getTopValue()); 260 clipTopUnitComboBox.setSelectedItem(clipData.getTopUnit()); 261 clipBottomComboBox.setSelectedItem(clipData.getBottomValue()); 262 clipBottomUnitComboBox.setSelectedItem(clipData.getBottomUnit()); 263 clipLeftComboBox.setSelectedItem(clipData.getLeftValue()); 264 clipLeftUnitComboBox.setSelectedItem(clipData.getLeftUnit()); 265 clipRightComboBox.setSelectedItem(clipData.getRightValue()); 266 clipRightUnitComboBox.setSelectedItem(clipData.getRightUnit()); 267 268 setCssPropertyChangeListener(cssStyleData); 269 } 270 271 public void initialize(){ 272 PositionModel positionModel = new PositionModel(); 273 274 positionModeList = positionModel.getModeList(); 276 positionModeCombo.setModel(positionModeList); 277 278 DefaultComboBoxModel posTopList = positionModel.getPositionList(); 280 posTopComboBox.setModel(posTopList); 281 posTopUnitComboBox.setModel(positionModel.getPositionUnitList()); 282 283 DefaultComboBoxModel posBottomList = positionModel.getPositionList(); 285 posBottomComboBox.setModel(posBottomList); 286 posBottomUnitComboBox.setModel(positionModel.getPositionUnitList()); 287 288 DefaultComboBoxModel posLeftList = positionModel.getPositionList(); 290 posLeftComboBox.setModel(posLeftList); 291 posLeftUnitComboBox.setModel(positionModel.getPositionUnitList()); 292 293 DefaultComboBoxModel widthList = positionModel.getSizeList(); 295 widthComboBox.setModel(widthList); 296 widthUnitComboBox.setModel(positionModel.getPositionUnitList()); 297 298 DefaultComboBoxModel heightList = positionModel.getSizeList(); 300 heightComboBox.setModel(heightList); 301 heightUnitComboBox.setModel(positionModel.getPositionUnitList()); 302 303 DefaultComboBoxModel visibilityList = positionModel.getVisibilityList(); 305 visibleComboBox.setModel(visibilityList); 306 307 DefaultComboBoxModel zindexList = positionModel.getZIndexList(); 309 zindexComboBox.setModel(zindexList); 310 311 DefaultComboBoxModel posRightList = positionModel.getPositionList(); 313 posRightComboBox.setModel(posRightList); 314 posRightUnitComboBox.setModel(positionModel.getPositionUnitList()); 315 316 ClipModel clipModel = new ClipModel(); 317 318 clipTopComboBox.setModel(clipModel.getClipList()); 320 clipTopUnitComboBox.setModel(clipModel.getClipUnitList()); 321 clipBottomComboBox.setModel(clipModel.getClipList()); 322 clipBottomUnitComboBox.setModel(clipModel.getClipUnitList()); 323 clipLeftComboBox.setModel(clipModel.getClipList()); 324 clipLeftUnitComboBox.setModel(clipModel.getClipUnitList()); 325 clipRightComboBox.setModel(clipModel.getClipList()); 326 clipRightUnitComboBox.setModel(clipModel.getClipUnitList()); 327 328 } 329 330 private void initComponents() { 332 java.awt.GridBagConstraints gridBagConstraints; 333 334 mainPositionPanel = new javax.swing.JPanel (); 335 positionPanel = new javax.swing.JPanel (); 336 positionModePanel = new javax.swing.JPanel (); 337 containerPanel = new javax.swing.JPanel (); 338 positionModeLabel = new javax.swing.JLabel (); 339 positionModeCombo = new javax.swing.JComboBox (); 340 fillPanel = new javax.swing.JPanel (); 341 positionContainerPanel = new javax.swing.JPanel (); 342 posTopLabel = new javax.swing.JLabel (); 343 posTopComboBox = new javax.swing.JComboBox (); 344 posTopUnitComboBox = new javax.swing.JComboBox (); 345 posBottomLabel1 = new javax.swing.JLabel (); 346 posBottomComboBox = new javax.swing.JComboBox (); 347 posBottomUnitComboBox = new javax.swing.JComboBox (); 348 posRightLabel = new javax.swing.JLabel (); 349 posRightComboBox = new javax.swing.JComboBox (); 350 posRightUnitComboBox = new javax.swing.JComboBox (); 351 posLeftLabel1 = new javax.swing.JLabel (); 352 posLeftComboBox = new javax.swing.JComboBox (); 353 posLeftUnitComboBox = new javax.swing.JComboBox (); 354 sizePanel = new javax.swing.JPanel (); 355 sizeContainerPanel = new javax.swing.JPanel (); 356 heightLabel = new javax.swing.JLabel (); 357 heightComboBox = new javax.swing.JComboBox (); 358 heightUnitComboBox = new javax.swing.JComboBox (); 359 widthLabel = new javax.swing.JLabel (); 360 widthComboBox = new javax.swing.JComboBox (); 361 widthUnitComboBox = new javax.swing.JComboBox (); 362 visibleLabel1 = new javax.swing.JLabel (); 363 visibleComboBox = new javax.swing.JComboBox (); 364 zIndexLabel1 = new javax.swing.JLabel (); 365 zindexComboBox = new javax.swing.JComboBox (); 366 clipPanel = new javax.swing.JPanel (); 367 clipLeftLabel1 = new javax.swing.JLabel (); 368 clipBottomUnitComboBox = new javax.swing.JComboBox (); 369 clipLeftUnitComboBox = new javax.swing.JComboBox (); 370 clipTopLabel1 = new javax.swing.JLabel (); 371 clipLeftComboBox = new javax.swing.JComboBox (); 372 clipTopUnitComboBox = new javax.swing.JComboBox (); 373 clipRightLabel1 = new javax.swing.JLabel (); 374 clipBottomComboBox = new javax.swing.JComboBox (); 375 clipRightUnitComboBox = new javax.swing.JComboBox (); 376 clipBottomLabel = new javax.swing.JLabel (); 377 clipTopComboBox = new javax.swing.JComboBox (); 378 clipRightComboBox = new javax.swing.JComboBox (); 379 clipErrorPanel = new javax.swing.JPanel (); 380 clipErrorLabel = new javax.swing.JLabel (); 381 382 setLayout(new java.awt.BorderLayout ()); 383 384 mainPositionPanel.setLayout(new java.awt.GridBagLayout ()); 385 386 positionPanel.setLayout(new java.awt.BorderLayout ()); 387 388 positionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POISTION_TITLE"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP)); 389 positionModePanel.setLayout(new java.awt.BorderLayout ()); 390 391 positionModePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); 392 containerPanel.setLayout(new java.awt.BorderLayout (5, 5)); 393 394 positionModeLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_MODE")); 395 containerPanel.add(positionModeLabel, java.awt.BorderLayout.WEST); 396 397 positionModeCombo.addItemListener(new java.awt.event.ItemListener () { 398 public void itemStateChanged(java.awt.event.ItemEvent evt) { 399 positionModeComboItemStateChanged(evt); 400 } 401 }); 402 403 containerPanel.add(positionModeCombo, java.awt.BorderLayout.CENTER); 404 positionModeCombo.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_MODE_ACCESS_NAME")); 405 positionModeCombo.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_MODE_ACCESS_DESC")); 406 407 positionModePanel.add(containerPanel, java.awt.BorderLayout.WEST); 408 409 positionModePanel.add(fillPanel, java.awt.BorderLayout.CENTER); 410 411 positionPanel.add(positionModePanel, java.awt.BorderLayout.NORTH); 412 413 positionContainerPanel.setLayout(new java.awt.GridBagLayout ()); 414 415 positionContainerPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5)); 416 posTopLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP")); 417 gridBagConstraints = new java.awt.GridBagConstraints (); 418 gridBagConstraints.gridx = 0; 419 gridBagConstraints.gridy = 0; 420 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 421 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 422 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 423 positionContainerPanel.add(posTopLabel, gridBagConstraints); 424 425 posTopComboBox.setEditable(true); 426 posTopComboBox.addItemListener(new java.awt.event.ItemListener () { 427 public void itemStateChanged(java.awt.event.ItemEvent evt) { 428 posTopComboBoxItemStateChanged(evt); 429 } 430 }); 431 posTopComboBox.addActionListener(new java.awt.event.ActionListener () { 432 public void actionPerformed(java.awt.event.ActionEvent evt) { 433 posTopComboBoxActionPerformed(evt); 434 } 435 }); 436 437 gridBagConstraints = new java.awt.GridBagConstraints (); 438 gridBagConstraints.gridx = 1; 439 gridBagConstraints.gridy = 0; 440 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 441 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 442 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 443 positionContainerPanel.add(posTopComboBox, gridBagConstraints); 444 posTopComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_ACCESS_NAME")); 445 posTopComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_ACCESS_DESC")); 446 447 posTopUnitComboBox.setEnabled(false); 448 posTopUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 449 public void itemStateChanged(java.awt.event.ItemEvent evt) { 450 posTopUnitComboBoxItemStateChanged(evt); 451 } 452 }); 453 454 gridBagConstraints = new java.awt.GridBagConstraints (); 455 gridBagConstraints.gridx = 2; 456 gridBagConstraints.gridy = 0; 457 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 458 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 459 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 460 positionContainerPanel.add(posTopUnitComboBox, gridBagConstraints); 461 posTopUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_UNIT_ACCESS_NAME")); 462 posTopUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_TOP_UNIT_ACCESS_DESC")); 463 464 posBottomLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM")); 465 gridBagConstraints = new java.awt.GridBagConstraints (); 466 gridBagConstraints.gridx = 3; 467 gridBagConstraints.gridy = 0; 468 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 469 gridBagConstraints.insets = new java.awt.Insets (0, 15, 5, 0); 470 positionContainerPanel.add(posBottomLabel1, gridBagConstraints); 471 472 posBottomComboBox.setEditable(true); 473 posBottomComboBox.addItemListener(new java.awt.event.ItemListener () { 474 public void itemStateChanged(java.awt.event.ItemEvent evt) { 475 posBottomComboBoxItemStateChanged(evt); 476 } 477 }); 478 posBottomComboBox.addActionListener(new java.awt.event.ActionListener () { 479 public void actionPerformed(java.awt.event.ActionEvent evt) { 480 posBottomComboBoxActionPerformed(evt); 481 } 482 }); 483 484 gridBagConstraints = new java.awt.GridBagConstraints (); 485 gridBagConstraints.gridx = 4; 486 gridBagConstraints.gridy = 0; 487 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 488 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 489 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 490 positionContainerPanel.add(posBottomComboBox, gridBagConstraints); 491 posBottomComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_ACCESS_NAME")); 492 posBottomComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_ACCESS_DESC")); 493 494 posBottomUnitComboBox.setEnabled(false); 495 posBottomUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 496 public void itemStateChanged(java.awt.event.ItemEvent evt) { 497 posBottomUnitComboBoxItemStateChanged(evt); 498 } 499 }); 500 501 gridBagConstraints = new java.awt.GridBagConstraints (); 502 gridBagConstraints.gridx = 5; 503 gridBagConstraints.gridy = 0; 504 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 505 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 506 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 507 positionContainerPanel.add(posBottomUnitComboBox, gridBagConstraints); 508 posBottomUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_UNIT_ACCESS_NAME")); 509 posBottomUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_BOTTOM_UNIT_ACCESS_DESC")); 510 511 posRightLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_RIGHT")); 512 gridBagConstraints = new java.awt.GridBagConstraints (); 513 gridBagConstraints.gridx = 0; 514 gridBagConstraints.gridy = 1; 515 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 516 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 517 positionContainerPanel.add(posRightLabel, gridBagConstraints); 518 519 posRightComboBox.setEditable(true); 520 posRightComboBox.addItemListener(new java.awt.event.ItemListener () { 521 public void itemStateChanged(java.awt.event.ItemEvent evt) { 522 posRightComboBoxItemStateChanged(evt); 523 } 524 }); 525 posRightComboBox.addActionListener(new java.awt.event.ActionListener () { 526 public void actionPerformed(java.awt.event.ActionEvent evt) { 527 posRightComboBoxActionPerformed(evt); 528 } 529 }); 530 531 gridBagConstraints = new java.awt.GridBagConstraints (); 532 gridBagConstraints.gridx = 1; 533 gridBagConstraints.gridy = 1; 534 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 535 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 536 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 537 positionContainerPanel.add(posRightComboBox, gridBagConstraints); 538 posRightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_RIGHT_ACCESS_NAME")); 539 posRightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_Right_ACCESS_DESC")); 540 541 posRightUnitComboBox.setEnabled(false); 542 posRightUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 543 public void itemStateChanged(java.awt.event.ItemEvent evt) { 544 posRightUnitComboBoxItemStateChanged(evt); 545 } 546 }); 547 548 gridBagConstraints = new java.awt.GridBagConstraints (); 549 gridBagConstraints.gridx = 2; 550 gridBagConstraints.gridy = 1; 551 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 552 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 553 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 554 positionContainerPanel.add(posRightUnitComboBox, gridBagConstraints); 555 posRightUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_RIGHT_UNIT_ACCESS_NAME")); 556 posRightUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_Right_UNIT_ACCESS_DESC")); 557 558 posLeftLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT")); 559 gridBagConstraints = new java.awt.GridBagConstraints (); 560 gridBagConstraints.gridx = 3; 561 gridBagConstraints.gridy = 1; 562 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 563 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 564 gridBagConstraints.insets = new java.awt.Insets (0, 15, 0, 0); 565 positionContainerPanel.add(posLeftLabel1, gridBagConstraints); 566 567 posLeftComboBox.setEditable(true); 568 posLeftComboBox.addItemListener(new java.awt.event.ItemListener () { 569 public void itemStateChanged(java.awt.event.ItemEvent evt) { 570 posLeftComboBoxItemStateChanged(evt); 571 } 572 }); 573 posLeftComboBox.addActionListener(new java.awt.event.ActionListener () { 574 public void actionPerformed(java.awt.event.ActionEvent evt) { 575 posLeftComboBoxActionPerformed(evt); 576 } 577 }); 578 579 gridBagConstraints = new java.awt.GridBagConstraints (); 580 gridBagConstraints.gridx = 4; 581 gridBagConstraints.gridy = 1; 582 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 583 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 584 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 585 positionContainerPanel.add(posLeftComboBox, gridBagConstraints); 586 posLeftComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_ACCESS_NAME")); 587 posLeftComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_ACCESS_DESC")); 588 589 posLeftUnitComboBox.setEnabled(false); 590 posLeftUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 591 public void itemStateChanged(java.awt.event.ItemEvent evt) { 592 posLeftUnitComboBoxItemStateChanged(evt); 593 } 594 }); 595 596 gridBagConstraints = new java.awt.GridBagConstraints (); 597 gridBagConstraints.gridx = 5; 598 gridBagConstraints.gridy = 1; 599 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 600 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 601 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 602 positionContainerPanel.add(posLeftUnitComboBox, gridBagConstraints); 603 posLeftUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_ACCESS_NAME")); 604 posLeftUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_LEFT_UNIT_ACCESS_DESC")); 605 606 positionPanel.add(positionContainerPanel, java.awt.BorderLayout.WEST); 607 608 mainPositionPanel.add(positionPanel, new java.awt.GridBagConstraints ()); 609 610 sizePanel.setLayout(new java.awt.BorderLayout ()); 611 612 sizePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "SIZE_TITLE"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP)); 613 sizeContainerPanel.setLayout(new java.awt.GridBagLayout ()); 614 615 sizeContainerPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); 616 heightLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_HEIGHT")); 617 gridBagConstraints = new java.awt.GridBagConstraints (); 618 gridBagConstraints.gridx = 0; 619 gridBagConstraints.gridy = 1; 620 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 621 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 622 sizeContainerPanel.add(heightLabel, gridBagConstraints); 623 624 heightComboBox.setEditable(true); 625 heightComboBox.addItemListener(new java.awt.event.ItemListener () { 626 public void itemStateChanged(java.awt.event.ItemEvent evt) { 627 heightComboBoxItemStateChanged(evt); 628 } 629 }); 630 heightComboBox.addActionListener(new java.awt.event.ActionListener () { 631 public void actionPerformed(java.awt.event.ActionEvent evt) { 632 heightComboBoxActionPerformed(evt); 633 } 634 }); 635 636 gridBagConstraints = new java.awt.GridBagConstraints (); 637 gridBagConstraints.gridx = 1; 638 gridBagConstraints.gridy = 1; 639 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 640 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 641 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 642 sizeContainerPanel.add(heightComboBox, gridBagConstraints); 643 heightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_ACCESS_NAME")); 644 heightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_ACCESS_DESC")); 645 646 heightUnitComboBox.setEnabled(false); 647 heightUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 648 public void itemStateChanged(java.awt.event.ItemEvent evt) { 649 heightUnitComboBoxItemStateChanged(evt); 650 } 651 }); 652 653 gridBagConstraints = new java.awt.GridBagConstraints (); 654 gridBagConstraints.gridx = 2; 655 gridBagConstraints.gridy = 1; 656 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 657 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 658 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 659 sizeContainerPanel.add(heightUnitComboBox, gridBagConstraints); 660 heightUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_UNIT_ACCESS_NAME")); 661 heightUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "HEIGHT_UNIT_ACCESS_DESC")); 662 663 widthLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "POSITION_WIDTH")); 664 gridBagConstraints = new java.awt.GridBagConstraints (); 665 gridBagConstraints.gridx = 0; 666 gridBagConstraints.gridy = 0; 667 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 668 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 669 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 670 sizeContainerPanel.add(widthLabel, gridBagConstraints); 671 672 widthComboBox.setEditable(true); 673 widthComboBox.addItemListener(new java.awt.event.ItemListener () { 674 public void itemStateChanged(java.awt.event.ItemEvent evt) { 675 widthComboBoxItemStateChanged(evt); 676 } 677 }); 678 widthComboBox.addActionListener(new java.awt.event.ActionListener () { 679 public void actionPerformed(java.awt.event.ActionEvent evt) { 680 widthComboBoxActionPerformed(evt); 681 } 682 }); 683 684 gridBagConstraints = new java.awt.GridBagConstraints (); 685 gridBagConstraints.gridx = 1; 686 gridBagConstraints.gridy = 0; 687 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 688 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 689 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 690 sizeContainerPanel.add(widthComboBox, gridBagConstraints); 691 widthComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_ACCESS_NAME")); 692 widthComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_ACCESS_DESC")); 693 694 widthUnitComboBox.setEnabled(false); 695 widthUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 696 public void itemStateChanged(java.awt.event.ItemEvent evt) { 697 widthUnitComboBoxItemStateChanged(evt); 698 } 699 }); 700 701 gridBagConstraints = new java.awt.GridBagConstraints (); 702 gridBagConstraints.gridx = 2; 703 gridBagConstraints.gridy = 0; 704 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 705 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 706 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 707 sizeContainerPanel.add(widthUnitComboBox, gridBagConstraints); 708 widthUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_UNIT_ACCESS_NAME")); 709 widthUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "WIDTH_UNIT_ACCESS_DESC")); 710 711 visibleLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "VISIBILITY")); 712 gridBagConstraints = new java.awt.GridBagConstraints (); 713 gridBagConstraints.gridx = 3; 714 gridBagConstraints.gridy = 0; 715 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 716 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 717 gridBagConstraints.insets = new java.awt.Insets (0, 15, 5, 0); 718 sizeContainerPanel.add(visibleLabel1, gridBagConstraints); 719 720 visibleComboBox.addItemListener(new java.awt.event.ItemListener () { 721 public void itemStateChanged(java.awt.event.ItemEvent evt) { 722 visibleComboBoxItemStateChanged(evt); 723 } 724 }); 725 726 gridBagConstraints = new java.awt.GridBagConstraints (); 727 gridBagConstraints.gridx = 4; 728 gridBagConstraints.gridy = 0; 729 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 730 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 731 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 732 sizeContainerPanel.add(visibleComboBox, gridBagConstraints); 733 visibleComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "VISIBILITY_ACCESS_NAME")); 734 visibleComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "VISIBILITY_ACCESS_DESC")); 735 736 zIndexLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "Z_INDEX")); 737 gridBagConstraints = new java.awt.GridBagConstraints (); 738 gridBagConstraints.gridx = 3; 739 gridBagConstraints.gridy = 1; 740 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 741 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 742 gridBagConstraints.insets = new java.awt.Insets (0, 15, 0, 0); 743 sizeContainerPanel.add(zIndexLabel1, gridBagConstraints); 744 745 zindexComboBox.setEditable(true); 746 zindexComboBox.addItemListener(new java.awt.event.ItemListener () { 747 public void itemStateChanged(java.awt.event.ItemEvent evt) { 748 zindexComboBoxItemStateChanged(evt); 749 } 750 }); 751 752 gridBagConstraints = new java.awt.GridBagConstraints (); 753 gridBagConstraints.gridx = 4; 754 gridBagConstraints.gridy = 1; 755 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 756 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 757 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 758 sizeContainerPanel.add(zindexComboBox, gridBagConstraints); 759 zindexComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "ZINDEX_ACCESS_NAME")); 760 zindexComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "ZINDEX_ACCESS_DESC")); 761 762 sizePanel.add(sizeContainerPanel, java.awt.BorderLayout.WEST); 763 764 gridBagConstraints = new java.awt.GridBagConstraints (); 765 gridBagConstraints.gridx = 0; 766 gridBagConstraints.gridy = 1; 767 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 768 gridBagConstraints.insets = new java.awt.Insets (15, 0, 0, 0); 769 mainPositionPanel.add(sizePanel, gridBagConstraints); 770 771 clipPanel.setLayout(new java.awt.GridBagLayout ()); 772 773 clipPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TITLE"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP)); 774 clipLeftLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT")); 775 gridBagConstraints = new java.awt.GridBagConstraints (); 776 gridBagConstraints.gridx = 3; 777 gridBagConstraints.gridy = 1; 778 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 779 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 780 gridBagConstraints.insets = new java.awt.Insets (0, 15, 0, 0); 781 clipPanel.add(clipLeftLabel1, gridBagConstraints); 782 783 clipBottomUnitComboBox.setEnabled(false); 784 clipBottomUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 785 public void itemStateChanged(java.awt.event.ItemEvent evt) { 786 clipBottomUnitComboBoxItemStateChanged(evt); 787 } 788 }); 789 790 gridBagConstraints = new java.awt.GridBagConstraints (); 791 gridBagConstraints.gridx = 5; 792 gridBagConstraints.gridy = 0; 793 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 794 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 795 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 796 clipPanel.add(clipBottomUnitComboBox, gridBagConstraints); 797 clipBottomUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_UNIT_ACCESS_NAME")); 798 clipBottomUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_UNIT_ACCESS_DESC")); 799 800 clipLeftUnitComboBox.setEnabled(false); 801 clipLeftUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 802 public void itemStateChanged(java.awt.event.ItemEvent evt) { 803 clipLeftUnitComboBoxItemStateChanged(evt); 804 } 805 }); 806 807 gridBagConstraints = new java.awt.GridBagConstraints (); 808 gridBagConstraints.gridx = 5; 809 gridBagConstraints.gridy = 1; 810 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 811 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 812 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 813 clipPanel.add(clipLeftUnitComboBox, gridBagConstraints); 814 clipLeftUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_UNIT_ACCESS_NAME")); 815 clipLeftUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_UNIT_ACCESS_DESC")); 816 817 clipTopLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP")); 818 gridBagConstraints = new java.awt.GridBagConstraints (); 819 gridBagConstraints.gridx = 0; 820 gridBagConstraints.gridy = 0; 821 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 822 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 823 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 824 clipPanel.add(clipTopLabel1, gridBagConstraints); 825 826 clipLeftComboBox.setEditable(true); 827 clipLeftComboBox.addItemListener(new java.awt.event.ItemListener () { 828 public void itemStateChanged(java.awt.event.ItemEvent evt) { 829 clipLeftComboBoxItemStateChanged(evt); 830 } 831 }); 832 833 gridBagConstraints = new java.awt.GridBagConstraints (); 834 gridBagConstraints.gridx = 4; 835 gridBagConstraints.gridy = 1; 836 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 837 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 838 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 839 clipPanel.add(clipLeftComboBox, gridBagConstraints); 840 clipLeftComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_ACCESS_NAME")); 841 clipLeftComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_LEFT_ACCESS_DESC")); 842 843 clipTopUnitComboBox.setEnabled(false); 844 clipTopUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 845 public void itemStateChanged(java.awt.event.ItemEvent evt) { 846 clipTopUnitComboBoxItemStateChanged(evt); 847 } 848 }); 849 850 gridBagConstraints = new java.awt.GridBagConstraints (); 851 gridBagConstraints.gridx = 2; 852 gridBagConstraints.gridy = 0; 853 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 854 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 855 clipPanel.add(clipTopUnitComboBox, gridBagConstraints); 856 clipTopUnitComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_UNIT_ACCESS_NAME")); 857 clipTopUnitComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_UNIT_ACCESS_DESC")); 858 859 clipRightLabel1.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_RIGHT")); 860 gridBagConstraints = new java.awt.GridBagConstraints (); 861 gridBagConstraints.gridx = 0; 862 gridBagConstraints.gridy = 1; 863 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 864 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 865 clipPanel.add(clipRightLabel1, gridBagConstraints); 866 867 clipBottomComboBox.setEditable(true); 868 clipBottomComboBox.addItemListener(new java.awt.event.ItemListener () { 869 public void itemStateChanged(java.awt.event.ItemEvent evt) { 870 clipBottomComboBoxItemStateChanged(evt); 871 } 872 }); 873 874 gridBagConstraints = new java.awt.GridBagConstraints (); 875 gridBagConstraints.gridx = 4; 876 gridBagConstraints.gridy = 0; 877 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 878 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 879 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 880 clipPanel.add(clipBottomComboBox, gridBagConstraints); 881 clipBottomComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_ACCESS_NAME")); 882 clipBottomComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM_ACCESS_DESC")); 883 884 clipRightUnitComboBox.setEnabled(false); 885 clipRightUnitComboBox.addItemListener(new java.awt.event.ItemListener () { 886 public void itemStateChanged(java.awt.event.ItemEvent evt) { 887 clipRightUnitComboBoxItemStateChanged(evt); 888 } 889 }); 890 891 gridBagConstraints = new java.awt.GridBagConstraints (); 892 gridBagConstraints.gridx = 2; 893 gridBagConstraints.gridy = 1; 894 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 895 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 896 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 897 clipPanel.add(clipRightUnitComboBox, gridBagConstraints); 898 clipRightUnitComboBox.getAccessibleContext().setAccessibleName(null); 899 clipRightUnitComboBox.getAccessibleContext().setAccessibleDescription(null); 900 901 clipBottomLabel.setText(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_BOTTOM")); 902 gridBagConstraints = new java.awt.GridBagConstraints (); 903 gridBagConstraints.gridx = 3; 904 gridBagConstraints.gridy = 0; 905 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 906 gridBagConstraints.insets = new java.awt.Insets (0, 15, 5, 0); 907 clipPanel.add(clipBottomLabel, gridBagConstraints); 908 909 clipTopComboBox.setEditable(true); 910 clipTopComboBox.addItemListener(new java.awt.event.ItemListener () { 911 public void itemStateChanged(java.awt.event.ItemEvent evt) { 912 clipTopComboBoxItemStateChanged(evt); 913 } 914 }); 915 916 gridBagConstraints = new java.awt.GridBagConstraints (); 917 gridBagConstraints.gridx = 1; 918 gridBagConstraints.gridy = 0; 919 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 920 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 921 gridBagConstraints.insets = new java.awt.Insets (0, 5, 5, 0); 922 clipPanel.add(clipTopComboBox, gridBagConstraints); 923 clipTopComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_ACCESS_NAME")); 924 clipTopComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_TOP_ACCESS_DESC")); 925 926 clipRightComboBox.setEditable(true); 927 clipRightComboBox.addItemListener(new java.awt.event.ItemListener () { 928 public void itemStateChanged(java.awt.event.ItemEvent evt) { 929 clipRightComboBoxItemStateChanged(evt); 930 } 931 }); 932 933 gridBagConstraints = new java.awt.GridBagConstraints (); 934 gridBagConstraints.gridx = 1; 935 gridBagConstraints.gridy = 1; 936 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 937 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 938 gridBagConstraints.insets = new java.awt.Insets (0, 5, 0, 0); 939 clipPanel.add(clipRightComboBox, gridBagConstraints); 940 clipRightComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_RIGHT_ACCESS_NAME")); 941 clipRightComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PositionStyleEditor.class, "CLIP_RIGHT_ACCESS_DESC")); 942 943 gridBagConstraints = new java.awt.GridBagConstraints (); 944 gridBagConstraints.gridx = 0; 945 gridBagConstraints.gridy = 2; 946 gridBagConstraints.insets = new java.awt.Insets (15, 0, 0, 0); 947 mainPositionPanel.add(clipPanel, gridBagConstraints); 948 949 add(mainPositionPanel, java.awt.BorderLayout.NORTH); 950 951 clipErrorPanel.setLayout(new java.awt.BorderLayout ()); 952 953 clipErrorPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 10, 1, 1)); 954 clipErrorLabel.setForeground(new java.awt.Color (0, 0, 153)); 955 clipErrorPanel.add(clipErrorLabel, java.awt.BorderLayout.CENTER); 956 957 add(clipErrorPanel, java.awt.BorderLayout.CENTER); 958 959 } 961 962 private void clipLeftUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 964 clipData.setLeftUnit(clipLeftUnitComboBox.getSelectedItem().toString()); 965 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 966 } 967 } 969 private void clipLeftComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 971 clipData.setLeft(clipLeftComboBox.getSelectedItem().toString()); 972 clipLeftUnitComboBox.setEnabled(clipData.isLeftValueInteger()); 973 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 974 } 975 } 977 private void clipBottomUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 979 clipData.setBottomUnit(clipBottomUnitComboBox.getSelectedItem().toString()); 980 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 981 } 982 } 984 private void clipBottomComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 986 clipData.setBottom(clipBottomComboBox.getSelectedItem().toString()); 987 clipBottomUnitComboBox.setEnabled(clipData.isBottomValueInteger()); 988 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 989 } 990 } 992 private void clipRightUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 994 clipData.setRightUnit(clipRightUnitComboBox.getSelectedItem().toString()); 995 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 996 } 997 } 999 private void clipRightComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1001 clipData.setRight(clipRightComboBox.getSelectedItem().toString()); 1002 clipRightUnitComboBox.setEnabled(clipData.isRightValueInteger()); 1003 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 1004 } 1005 } 1007 private void clipTopUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1009 clipData.setTopUnit(clipTopUnitComboBox.getSelectedItem().toString()); 1010 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 1011 } 1012 } 1014 private void clipTopComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1016 clipData.setTop(clipTopComboBox.getSelectedItem().toString()); 1017 clipTopUnitComboBox.setEnabled(clipData.isTopValueInteger()); 1018 cssPropertyChangeSupport.firePropertyChange(CssProperties.CLIP, null, clipData.toString()); 1019 } 1020 } 1022 private void zindexComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { setZindex(); 1024 } 1026 private void visibleComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { setVisibility(); 1028 } 1030 private void heightUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1032 setHeight(); 1033 } 1034 } 1036 private void heightComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1038 setHeight(); 1039 } 1040 } 1042 private void heightComboBoxActionPerformed(java.awt.event.ActionEvent evt) { setHeight(); 1044 } 1046 private void widthComboBoxActionPerformed(java.awt.event.ActionEvent evt) { setWidth(); 1048 } 1050 private void widthComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1052 setWidth(); 1053 } 1054 } 1056 private void widthUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1058 setWidth(); 1059 } 1060 } 1062 private void posRightUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1064 setRightPos(); 1065 } 1066 } 1068 private void posRightComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1070 setRightPos(); 1071 } 1072 } 1074 private void posRightComboBoxActionPerformed(java.awt.event.ActionEvent evt) { setRightPos(); 1076 } 1078 private void posLeftUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1080 setLeftPos(); 1081 } 1082 } 1084 private void posLeftComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1086 setLeftPos(); 1087 } 1088 } 1090 private void posLeftComboBoxActionPerformed(java.awt.event.ActionEvent evt) { setLeftPos(); 1092 } 1094 private void posBottomUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1096 setBottomPos(); 1097 } 1098 } 1100 private void posBottomComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1102 setBottomPos(); 1103 } 1104 } 1106 private void posBottomComboBoxActionPerformed(java.awt.event.ActionEvent evt) { setBottomPos(); 1108 } 1110 private void posTopUnitComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1112 setTopPos(); 1113 } 1114 } 1116 private void posTopComboBoxItemStateChanged(java.awt.event.ItemEvent evt) { if (evt.getStateChange() != evt.DESELECTED) { 1118 setTopPos(); 1119 } 1120 } 1122 private void posTopComboBoxActionPerformed(java.awt.event.ActionEvent evt) { setTopPos(); 1124 } 1126 private void positionModeComboItemStateChanged(java.awt.event.ItemEvent evt) { setPosition(); 1128 } 1130 private void setZindex(){ 1131 PropertyData zindexData = new PropertyData(); 1132 zindexData.setValue(zindexComboBox.getSelectedItem().toString()); 1133 cssPropertyChangeSupport.firePropertyChange(CssProperties.Z_INDEX, null, zindexData.toString()); 1134 } 1135 1136 public void setVisibility(){ 1137 PropertyData visibleData = new PropertyData(); 1138 visibleData.setValue(visibleComboBox.getSelectedItem().toString()); 1139 cssPropertyChangeSupport.firePropertyChange(CssProperties.VISIBILITY, null, visibleData.toString()); 1140 } 1141 1142 private void setHeight(){ 1143 PropertyWithUnitData heightData = new PropertyWithUnitData(); 1144 heightData.setUnit(heightUnitComboBox.getSelectedItem().toString()); 1145 heightData.setValue(heightComboBox.getSelectedItem().toString()); 1146 cssPropertyChangeSupport.firePropertyChange(CssProperties.HEIGHT, null, heightData.toString()); 1147 heightUnitComboBox.setEnabled(heightData.isValueInteger()); 1148 } 1149 1150 private void setWidth(){ 1151 PropertyWithUnitData widthData = new PropertyWithUnitData(); 1152 widthData.setUnit(widthUnitComboBox.getSelectedItem().toString()); 1153 widthData.setValue(widthComboBox.getSelectedItem().toString()); 1154 cssPropertyChangeSupport.firePropertyChange(CssProperties.WIDTH, null, widthData.toString()); 1155 widthUnitComboBox.setEnabled(widthData.isValueInteger()); 1156 } 1157 1158 private void setRightPos(){ 1159 PropertyWithUnitData posRightData = new PropertyWithUnitData(); 1160 posRightData.setUnit(posRightUnitComboBox.getSelectedItem().toString()); 1161 posRightData.setValue(posRightComboBox.getSelectedItem().toString()); 1162 cssPropertyChangeSupport.firePropertyChange(CssProperties.RIGHT, null, posRightData.toString()); 1163 posRightUnitComboBox.setEnabled(posRightData.isValueInteger()); 1164 } 1165 1166 private void setLeftPos(){ 1167 PropertyWithUnitData posLeftData = new PropertyWithUnitData(); 1168 posLeftData.setUnit(posLeftUnitComboBox.getSelectedItem().toString()); 1169 posLeftData.setValue(posLeftComboBox.getSelectedItem().toString()); 1170 cssPropertyChangeSupport.firePropertyChange(CssProperties.LEFT, null, posLeftData.toString()); 1171 posLeftUnitComboBox.setEnabled(posLeftData.isValueInteger()); 1172 } 1173 1174 private void setBottomPos(){ 1175 PropertyWithUnitData posBottomData = new PropertyWithUnitData(); 1176 posBottomData.setUnit(posBottomUnitComboBox.getSelectedItem().toString()); 1177 posBottomData.setValue(posBottomComboBox.getSelectedItem().toString()); 1178 cssPropertyChangeSupport.firePropertyChange(CssProperties.BOTTOM, null, posBottomData.toString()); 1179 posBottomUnitComboBox.setEnabled(posBottomData.isValueInteger()); 1180 } 1181 1182 private void setTopPos(){ 1183 PropertyWithUnitData posTopData = new PropertyWithUnitData(); 1184 posTopData.setUnit(posTopUnitComboBox.getSelectedItem().toString()); 1185 posTopData.setValue(posTopComboBox.getSelectedItem().toString()); 1186 cssPropertyChangeSupport.firePropertyChange(CssProperties.TOP, null, posTopData.toString()); 1187 posTopUnitComboBox.setEnabled(posTopData.isValueInteger()); 1188 } 1189 1190 public void setPosition(){ 1191 PropertyData positionData = new PropertyData(); 1192 positionData.setValue(positionModeCombo.getSelectedItem().toString()); 1193 cssPropertyChangeSupport.firePropertyChange(CssProperties.POSITION, null, positionData.toString()); 1194 } 1195 1196 1197 private javax.swing.JComboBox clipBottomComboBox; 1199 private javax.swing.JLabel clipBottomLabel; 1200 private javax.swing.JComboBox clipBottomUnitComboBox; 1201 private javax.swing.JLabel clipErrorLabel; 1202 private javax.swing.JPanel clipErrorPanel; 1203 private javax.swing.JComboBox clipLeftComboBox; 1204 private javax.swing.JLabel clipLeftLabel1; 1205 private javax.swing.JComboBox clipLeftUnitComboBox; 1206 private javax.swing.JPanel clipPanel; 1207 private javax.swing.JComboBox clipRightComboBox; 1208 private javax.swing.JLabel clipRightLabel1; 1209 private javax.swing.JComboBox clipRightUnitComboBox; 1210 private javax.swing.JComboBox clipTopComboBox; 1211 private javax.swing.JLabel clipTopLabel1; 1212 private javax.swing.JComboBox clipTopUnitComboBox; 1213 private javax.swing.JPanel containerPanel; 1214 private javax.swing.JPanel fillPanel; 1215 private javax.swing.JComboBox heightComboBox; 1216 private javax.swing.JLabel heightLabel; 1217 private javax.swing.JComboBox heightUnitComboBox; 1218 private javax.swing.JPanel mainPositionPanel; 1219 private javax.swing.JComboBox posBottomComboBox; 1220 private javax.swing.JLabel posBottomLabel1; 1221 private javax.swing.JComboBox posBottomUnitComboBox; 1222 private javax.swing.JComboBox posLeftComboBox; 1223 private javax.swing.JLabel posLeftLabel1; 1224 private javax.swing.JComboBox posLeftUnitComboBox; 1225 private javax.swing.JComboBox posRightComboBox; 1226 private javax.swing.JLabel posRightLabel; 1227 private javax.swing.JComboBox posRightUnitComboBox; 1228 private javax.swing.JComboBox posTopComboBox; 1229 private javax.swing.JLabel posTopLabel; 1230 private javax.swing.JComboBox posTopUnitComboBox; 1231 private javax.swing.JPanel positionContainerPanel; 1232 private javax.swing.JComboBox positionModeCombo; 1233 private javax.swing.JLabel positionModeLabel; 1234 private javax.swing.JPanel positionModePanel; 1235 private javax.swing.JPanel positionPanel; 1236 private javax.swing.JPanel sizeContainerPanel; 1237 private javax.swing.JPanel sizePanel; 1238 private javax.swing.JComboBox visibleComboBox; 1239 private javax.swing.JLabel visibleLabel1; 1240 private javax.swing.JComboBox widthComboBox; 1241 private javax.swing.JLabel widthLabel; 1242 private javax.swing.JComboBox widthUnitComboBox; 1243 private javax.swing.JLabel zIndexLabel1; 1244 private javax.swing.JComboBox zindexComboBox; 1245 1247} 1248 | Popular Tags |