1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"/> 5 <title>Component Specific Properties</title> 6 </head> 7 <!-- 8 Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. 9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10 11 This code is free software; you can redistribute it and/or modify it 12 under the terms of the GNU General Public License version 2 only, as 13 published by the Free Software Foundation. Oracle designates this 14 particular file as subject to the "Classpath" exception as provided 15 by Oracle in the LICENSE file that accompanied this code. 16 17 This code is distributed in the hope that it will be useful, but WITHOUT 18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 19 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 20 version 2 for more details (a copy is included in the LICENSE file that 21 accompanied this code). 22 23 You should have received a copy of the GNU General Public License version 24 2 along with this work; if not, write to the Free Software Foundation, 25 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 26 27 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 28 or visit www.oracle.com if you need additional information or have any 29 questions. 30 --> 31 32 <body bgcolor="white"> 33 <h3>Component Specific Properties</h3> 34 <p> The look, and to some degree the feel of Synth 35 can be customized by way of component specific properties. 36 These properties are accessed from <a 37 href="../SynthStyle.html">SynthStyle#get</a>. Refer to <a 38 href="synthFileFormat.html#e.property">synth file format</a> for examples 39 of how to specify these properties in a synth configuration file.</p> 40 <p> 41 This file specifies the expected class type each of the values 42 are to take. The behavior of supplying the wrong type is 43 unspecified: typically a <code>ClassCastException</code> is 44 thrown, but it is implementation specific. 45 </p> 46 <h4>ArrowButton</h4> 47 <p> ArrowButton is a special type of JButton that renders an arrow. 48 ArrowButton is typically not created directly, rather some of the 49 Components will create it to render a button with an arrow. The 50 components that make use of ArrowButton are: 51 JComboBox, JScrollBar and JSplitPane (for the buttons on the divider). 52 In addition to the <a 53 href="#buttonProperties">Button properties</a>, ArrowButton supports 54 the following properties: </p> 55 <h5>ArrowButton Specific Properties</h5> 56 <table border="1" summary="ArrowButton specific properties"> 57 <thead><tr> 58 <th>Property</th> 59 <th>Expected Type</th> 60 <th>Default Value</th> 61 <th>Description </th> 62 </tr> 63 </thead> <tbody> 64 <tr> 65 <td>ArrowButton.size</td> 66 <td>Integer</td> 67 <td>16 </td> 68 <td>Preferred size of the arrow button. </td> 69 </tr> 70 </tbody> 71 </table> 72 <br> 73 <h4><a id="JButton">JButton</a></h4> 74 <p> JButton paints text using the TEXT_FOREGROUND ColorType. In addition 75 to the <a href="#buttonProperties">Button properties</a>, JButton 76 supports the following property: </p> 77 <h5>JButton Specific Properties</h5> 78 <table border="1" summary="JButton specific properties"> 79 <thead><tr> 80 <th>Property</th> 81 <th>Expected Type</th> 82 <th>Default Value</th> 83 <th>Description </th> 84 </tr> 85 </thead> <tbody> 86 <tr> 87 <td>Button.defaultButtonFollowsFocus</td> 88 <td>Boolean</td> 89 <td>true </td> 90 <td>Whether or not the default JButton should change to the 91 button that is receiving focus. </td> 92 </tr> 93 </tbody> 94 </table> 95 <br> 96 <h4><a id="JCheckBox">JCheckBox</a></h4> 97 <p> JCheckBox paints text using the TEXT_FOREGROUND ColorType. In 98 addition to the <a href="#buttonProperties">Button properties</a>, 99 JCheckBox supports the following property: </p> 100 <h5>JCheckBox Specific Properties</h5> 101 <table border="1" summary="JCheckBox specific properties"> 102 <thead><tr> 103 <th>Property</th> 104 <th>Expected Type</th> 105 <th>Default Value</th> 106 <th>Description </th> 107 </tr> 108 </thead> <tbody> 109 <tr> 110 <td>CheckBox.icon</td> 111 <td>Icon</td> 112 <td>null </td> 113 <td>Icon used to render the check. </td> 114 </tr> 115 </tbody> 116 </table> 117 <br> 118 <h4><a id="JComboBox">JComboBox</a></h4> 119 <p> JComboBox is a composite component that consists of the following 120 child Components: </p> 121 <table border="1" summary="JComboBox child components"> 122 <thead><tr> 123 <th>Name</th> 124 <th>Type</th> 125 <th>Description </th> 126 </tr> 127 </thead> <tbody> 128 <tr> 129 <td>ComboBox.arrowButton</td> 130 <td>SynthArrowButton </td> 131 <td>Renders the drop down indicator. </td> 132 </tr> 133 <tr> 134 <td>ComboBox.list</td> 135 <td>JList </td> 136 <td>JList used to render the values. </td> 137 </tr> 138 <tr> 139 <td>ComboBox.listRenderer</td> 140 <td>Component </td> 141 <td>The renderer used for the JComboBox's JList. </td> 142 </tr> 143 <tr> 144 <td>ComboBox.popup</td> 145 <td>JPopupMenu </td> 146 <td>JPopupMenu used to show the ComboBox.list of the JComboBox. </td> 147 </tr> 148 <tr> 149 <td>ComboBox.renderer</td> 150 <td>Component </td> 151 <td>The renderer used for the JComboBox. This is ONLY set if 152 the renderer is a UIResource. </td> 153 </tr> 154 <tr> 155 <td>ComboBox.scrollPane</td> 156 <td>JScrollPane </td> 157 <td>JScrollPane containing the JList. </td> 158 </tr> 159 <tr> 160 <td>ComboBox.textField</td> 161 <td>JTextField </td> 162 <td>The editor. </td> 163 </tr> 164 </tbody> 165 </table> 166 167 <h5>JComboBox Specific Properties</h5> 168 <table border="1" summary="JComboBox specific properties"> 169 <thead><tr> 170 <th>Property</th> 171 <th>Expected Type</th> 172 <th>Default Value</th> 173 <th>Description </th> 174 </tr> 175 </thead> <tbody> 176 <tr> 177 <td>ComboBox.showPopupOnNavigation</td> 178 <td>Boolean</td> 179 <td>false </td> 180 <td>Whether or not the JPopupMenu should appear when navigating 181 with the keyboard. </td> 182 </tr> 183 </tbody> 184 </table> 185 <br> 186 <h4>JFileChooser</h4> 187 <h5>JFileChooser Specific Properties</h5> 188 <table cellpadding="2" cellspacing="2" border="1" summary="JFileChooser specific properties" 189 style="width: 100%; text-align: left;"> 190 <tbody> 191 <tr> 192 <th style="vertical-align: top; text-align: center;">Property</th> 193 <th style="vertical-align: top; text-align: center;">Expected Type<br> 194 </th> 195 <th style="vertical-align: top; text-align: center;">Default Value<br> 196 </th> 197 <th style="vertical-align: top; text-align: center;">Description</th> 198 </tr> 199 <tr> 200 <td style="vertical-align: top;">FileChooser.cancelIcon<br> 201 </td> 202 <td style="vertical-align: top;">Icon<br> 203 </td> 204 <td style="vertical-align: top;">null<br> 205 </td> 206 <td style="vertical-align: top;">Icon displayed on cancel button 207 of the file chooser.<br> 208 </td> 209 </tr> 210 <tr> 211 <td style="vertical-align: top;">FileChooser.okIcon<br> 212 </td> 213 <td style="vertical-align: top;">Icon<br> 214 </td> 215 <td style="vertical-align: top;">null<br> 216 </td> 217 <td style="vertical-align: top;">Icon displayed on the ok button 218 of the file chooser.<br> 219 </td> 220 </tr> 221 <tr> 222 <td style="vertical-align: top;">FileView.directoryIcon<br> 223 </td> 224 <td style="vertical-align: top;">Icon<br> 225 </td> 226 <td style="vertical-align: top;">null<br> 227 </td> 228 <td style="vertical-align: top;">Icon used for directories. 229 </td> 230 </tr> 231 <tr> 232 <td style="vertical-align: top;">FileView.fileIcon<br> 233 </td> 234 <td style="vertical-align: top;">Icon<br> 235 </td> 236 <td style="vertical-align: top;">null<br> 237 </td> 238 <td style="vertical-align: top;">Icon used for files. 239 </td> 240 </tr> 241 <tr> 242 <td style="vertical-align: top;">FileView.computerIcon<br> 243 </td> 244 <td style="vertical-align: top;">Icon<br> 245 </td> 246 <td style="vertical-align: top;">null<br> 247 </td> 248 <td style="vertical-align: top;">Icon used for directories that 249 represent the computer. Not all platforms will make use 250 of this icon. 251 </td> 252 </tr> 253 <tr> 254 <td style="vertical-align: top;">FileView.hardDriveIcon<br> 255 </td> 256 <td style="vertical-align: top;">Icon<br> 257 </td> 258 <td style="vertical-align: top;">null<br> 259 </td> 260 <td style="vertical-align: top;">Icon used to represent the root 261 of a hard drive. For example, on Windows this would be 262 used when viewing the C drive. 263 </td> 264 </tr> 265 <tr> 266 <td style="vertical-align: top;">FileView.floppyDriveIcon<br> 267 </td> 268 <td style="vertical-align: top;">Icon<br> 269 </td> 270 <td style="vertical-align: top;">null<br> 271 </td> 272 <td style="vertical-align: top;">Icon used to represent a floppy 273 disk. 274 </td> 275 </tr> 276 <tr> 277 <td style="vertical-align: top;">FileChooser.newFolderIcon<br> 278 </td> 279 <td style="vertical-align: top;">Icon<br> 280 </td> 281 <td style="vertical-align: top;">null<br> 282 </td> 283 <td style="vertical-align: top;">Icon used by the button that creates a new 284 folder. 285 </td> 286 </tr> 287 <tr> 288 <td style="vertical-align: top;">FileChooser.upFolderIcon<br> 289 </td> 290 <td style="vertical-align: top;">Icon<br> 291 </td> 292 <td style="vertical-align: top;">null<br> 293 </td> 294 <td style="vertical-align: top;">Icon used by the button that navigates to the 295 parent folder. 296 </td> 297 </tr> 298 <tr> 299 <td style="vertical-align: top;">FileChooser.homeFolderIcon<br> 300 </td> 301 <td style="vertical-align: top;">Icon<br> 302 </td> 303 <td style="vertical-align: top;">null<br> 304 </td> 305 <td style="vertical-align: top;">Icon used by the button that navigates to the 306 current user's home directory. 307 </td> 308 </tr> 309 <tr> 310 <td style="vertical-align: top;">FileChooser.detailsViewIcon<br> 311 </td> 312 <td style="vertical-align: top;">Icon<br> 313 </td> 314 <td style="vertical-align: top;">null<br> 315 </td> 316 <td style="vertical-align: top;">Icon used by the button that toggles the 317 detailed files list view. 318 </td> 319 </tr> 320 <tr> 321 <td style="vertical-align: top;">FileChooser.listViewIcon<br> 322 </td> 323 <td style="vertical-align: top;">Icon<br> 324 </td> 325 <td style="vertical-align: top;">null<br> 326 </td> 327 <td style="vertical-align: top;">Icon used by the button that toggles the 328 regular files list view, showing only an icon and the name of each 329 file and directory. 330 </td> 331 </tr> 332 <tr> 333 <td style="vertical-align: top;">FileChooser.viewMenuIcon<br> 334 </td> 335 <td style="vertical-align: top;">Icon<br> 336 </td> 337 <td style="vertical-align: top;">null<br> 338 </td> 339 <td style="vertical-align: top;">Icon used by the button that shows popup menu 340 for selection of a view mode. 341 </td> 342 </tr> 343 </tbody> 344 </table> 345 <br> 346 <h4><a id="JInternalFrame"></a>JInternalFrame</h4> 347 <h5>JInternalFrame Specific Properties</h5> 348 <table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrame specific properties" 349 style="text-align: left; width: 100%;"> 350 <tbody> 351 <tr> 352 <th style="vertical-align: top; text-align: center;">Property<br> 353 </th> 354 <th style="vertical-align: top; text-align: center;">Expected Type<br> 355 </th> 356 <th style="vertical-align: top; text-align: center;">DefaultValue<br> 357 </th> 358 <th style="vertical-align: top; text-align: center;">Description<br> 359 </th> 360 </tr> 361 <tr> 362 <td style="vertical-align: top;">InternalFrame.icon<br> 363 </td> 364 <td style="vertical-align: top;">Icon</td> 365 <td style="vertical-align: top;">null<br> 366 </td> 367 <td style="vertical-align: top;">Icon drawn representing the 368 system<br> 369 icon of the internal frame. If pressed<br> 370 the system menu will be shown.<br> 371 </td> 372 </tr> 373 </tbody> 374 </table> 375 <br> 376 <h4><a id="JInternalFrameTitlePane"></a>JInternalFrameTitlePane</h4> 377 <p>JInternalFrameTitlePane is the control bar located at the top of the 378 internal frame similar to that found in a frame.<br> 379 </p> 380 <h5>JInternalFrameTitlePane Specific Properties</h5> 381 <table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrameTitlePane specific properties" 382 style="text-align: left; width: 100%;"> 383 <tbody> 384 <tr> 385 <th style="vertical-align: top; text-align: center;">Property<br> 386 </th> 387 <th style="vertical-align: top; text-align: center;">Expected Type<br> 388 </th> 389 <th style="vertical-align: top; text-align: center;">Default Value<br> 390 </th> 391 <th style="vertical-align: top; text-align: center;">Description<br> 392 </th> 393 </tr> 394 <tr> 395 <td style="vertical-align: top;">InternalFrameTitlePane.maximizeIcon<br> 396 </td> 397 <td style="vertical-align: top;">Icon</td> 398 <td style="vertical-align: top;">null<br> 399 </td> 400 <td style="vertical-align: top;">Icon drawn to indicate the 401 ability to maximize the internal frame.<br> 402 </td> 403 </tr> 404 <tr> 405 <td style="vertical-align: top;">InternalFrameTitlePane.minimizeIcon<br> 406 </td> 407 <td style="vertical-align: top;">Icon</td> 408 <td style="vertical-align: top;">null<br> 409 </td> 410 <td style="vertical-align: top;">Icon drawn to indicate the 411 ability to restore the internal frame back to its previous state.<br> 412 </td> 413 </tr> 414 <tr> 415 <td style="vertical-align: top;">InternalFrameTitlePane.iconifyIcon<br> 416 </td> 417 <td style="vertical-align: top;">Icon</td> 418 <td style="vertical-align: top;">null<br> 419 </td> 420 <td style="vertical-align: top;">Icon drawn to indicate the 421 ability to minimize the internal frame.<br> 422 </td> 423 </tr> 424 <tr> 425 <td style="vertical-align: top;">InternalFrameTitlePane.closeIcon<br> 426 </td> 427 <td style="vertical-align: top;">Icon</td> 428 <td style="vertical-align: top;">null<br> 429 </td> 430 <td style="vertical-align: top;">Icon drawn to indicate the 431 abililty to close the internal frame. 432 </td> 433 </tr> 434 <tr> 435 <td style="vertical-align: top;">InternalFrameTitlePane.titleSpacing<br> 436 </td> 437 <td style="vertical-align: top;">Integer</td> 438 <td style="vertical-align: top;">2</td> 439 <td style="vertical-align: top;">Space between the 440 buttons on the title pane and the title. 441 </td> 442 </tr> 443 <tr> 444 <td style="vertical-align: top;">InternalFrameTitlePane.buttonSpacing<br> 445 </td> 446 <td style="vertical-align: top;">Integer</td> 447 <td style="vertical-align: top;">2</td> 448 <td style="vertical-align: top;">Space between the buttons on 449 the title pane. 450 </td> 451 </tr> 452 <tr> 453 <td style="vertical-align: top;">InternalFrameTitlePane.maxFrameIconSize<br> 454 </td> 455 <td style="vertical-align: top;">Dimension</td> 456 <td style="vertical-align: top;">16x16</td> 457 <td style="vertical-align: top;">Maximum size of the frame 458 icon that will be rendered on the title pane. If the icon 459 is bigger than this size, it will be scaled down. 460 </td> 461 </tr> 462 <tr> 463 <td style="vertical-align: top;">InternalFrameTitlePane.titleAlignment<br> 464 </td> 465 <td style="vertical-align: top;">leading|trailing|center</td> 466 <td style="vertical-align: top;">leading</td> 467 <td style="vertical-align: top;">Alignment for the title. 468 With a left to right component orientation leading is left 469 and trailing right. With a right to left component 470 orientation leading is right and trailing left. 471 </td> 472 </tr> 473 </tbody> 474 </table> 475 <br> 476 <h4><a id="JList">JList</a></h4> 477 <p> JList's sets the name of the renderer to List.renderer. JList 478 supports the following properties: </p> 479 <h5>JList Specific Properties</h5> 480 <table border="1" summary="JList specific properties"> 481 <thead><tr> 482 <th>Property</th> 483 <th>Expected Type</th> 484 <th>Default Value</th> 485 <th>Description </th> 486 </tr> 487 </thead> <tbody> 488 <tr> 489 <td>List.rendererUseListColors</td> 490 <td>Boolean</td> 491 <td>true </td> 492 <td>If true the renderers state is not updated, and the text 493 colors come from JList's getSelectionBackground and 494 getSelectionForeground methods. If false, the renderer's state is 495 updated and the colors will instead come from the Style. </td> 496 </tr> 497 <tr> 498 <td>List.rendererUseUIBorder</td> 499 <td>Boolean</td> 500 <td>true </td> 501 <td>If true setBorder on the renderer will succeed regardless 502 of the border passed in, otherwise setBorder on the renderer will 503 only succeed if it is a Synth Border. </td> 504 </tr> 505 <tr> 506 <td>List.cellHeight</td> 507 <td>Integer</td> 508 <td>-1 </td> 509 <td>Cell height of the JList. Is this is -1, <code>setFixedCellHeight</code> 510 is not invoked. </td> 511 </tr> 512 </tbody> 513 </table> 514 <br> 515 <h4><a id="menuProperties">Menu Properties</a></h4> 516 <p> The Menu classes (JCheckBoxMenuItem, JMenu, JMenuItem, and 517 JRadioButtonMenuItem) all support the same set of properties and behave 518 similarly. Each component consists of two Regions: the region 519 specific to the component and Region.MENU_ITEM_ACCELERATOR. 520 MENU_ITEM_ACCELERATOR is used for painting the accelerator. Both Regions 521 paint text using the TEXT_FOREGROUND ColorType. The following set of 522 properties are supported: </p> 523 <table border="1" summary="Menu classes common properties"> 524 <thead><tr> 525 <th>Property</th> 526 <th>Expected Type</th> 527 <th>Default Value</th> 528 <th>Description </th> 529 </tr> 530 </thead> <tbody> 531 <tr> 532 <td>prefix.acceleratorDelimiter</td> 533 <td>String</td> 534 <td>+ </td> 535 <td>String separator between the description of the modifiers 536 and the key, for example <code>Ctrl <acceleratorDelimiter> X</code>. 537 </td> 538 </tr> 539 <tr> 540 <td>prefix.arrowIcon</td> 541 <td>Icon</td> 542 <td>null </td> 543 <td>Icon drawn to the right of the text (or left when the 544 ComponentOrientation is right to left) of the text. This is 545 typically only defined for JMenu. </td> 546 </tr> 547 <tr> 548 <td>prefix.checkIcon</td> 549 <td>Icon</td> 550 <td>null </td> 551 <td>Icon drawn to the left of the text (or right when the 552 ComponentOrientation is right to left) of the text. This is 553 typically only defined for JCheckBoxMenuItem and JRadioButtonMenuItem 554 to provide the check or radio button. </td> 555 </tr> 556 <tr> 557 <td>prefix.margin</td> 558 <td>Insets</td> 559 <td>Empty Insets (0, 0, 0, 0) </td> 560 <td>Margin for the JMenuItem. Refer to the javadoc of 561 <code>javax.swing.AbstractButton#setMargin(java.awt.Insets)</code> for details 562 of how the margin is used. </td> 563 </tr> 564 <tr> 565 <td>prefix.textIconGap</td> 566 <td>Integer</td> 567 <td>4 </td> 568 <td>Padding between the icon and text. Refer to the javadoc for 569 <code>javax.swing.AbstractButton#setIconTextGap(int)</code> for details of how 570 this is used. </td> 571 </tr> 572 </tbody> 573 </table> 574 <p> <code>Prefix</code> is one of: CheckBoxMenuItem, Menu, MenuItem, or 575 RadioButtonMenuItem. </p> 576 <p> JMenu also supports the following properties: </p> 577 <table border="1" summary="JMenu specific properties"> 578 <thead><tr> 579 <th>Property</th> 580 <th>Expected Type</th> 581 <th>Default Value</th> 582 <th>Description </th> 583 </tr> 584 </thead> <tbody> 585 <tr> 586 <td>Menu.delay</td> 587 <td>Integer</td> 588 <td>200 </td> 589 <td>Sets the delay before the menu appears. </td> 590 </tr> 591 <tr> 592 <td>Menu.shortcutKeys</td> 593 <td>int[]</td> 594 <td>KeyEvent.ALT_MASK </td> 595 <td>Array of the KeyEvent modifiers to use for shortcut keys. </td> 596 </tr> 597 </tbody> 598 </table> 599 <br> 600 <h4><a id="JOptionPane">JOptionPane</a></h4> 601 <p> JOptionPane is a composite component and may consist of numerous child 602 components, they are: OptionPane.button, OptionPane.label, 603 OptionPane.comboBox, OptionPane.scrollPane, OptionPane.list, 604 OptionPane.textField, OptionPane.iconLabel. </p> 605 <h5>JOptionPane Specific Properties</h5> 606 <table border="1" summary="JOptionPane specific properties"> 607 <thead><tr> 608 <th>Property</th> 609 <th>Expected Type</th> 610 <th>Default Value</th> 611 <th>Description </th> 612 </tr> 613 </thead> <tbody> 614 <tr> 615 <td>OptionPane.buttonAreaBorder</td> 616 <td>Border </td> 617 <td>null </td> 618 <td>Border around the button area. </td> 619 </tr> 620 <tr> 621 <td>OptionPane.buttonClickThreshhold</td> 622 <td>Integer </td> 623 <td>0 </td> 624 <td>Passed to the created buttons setMultiClickThreshhold. </td> 625 </tr> 626 <tr> 627 <td>OptionPane.buttonOrientation</td> 628 <td>Integer </td> 629 <td>SwingConstants.CENTER </td> 630 <td>How the buttons should be layed out, one of 631 SwingConstants.LEFT, SwingConstants.RIGHT or SwingConstants.CENTER 632 (this will be flipped when in a right to left locale). </td> 633 </tr> 634 <tr> 635 <td>OptionPane.buttonPadding</td> 636 <td>Integer </td> 637 <td>6 </td> 638 <td>Amount of space between buttons. </td> 639 </tr> 640 <tr> 641 <td>OptionPane.cancelIcon</td> 642 <td>Icon </td> 643 <td>null </td> 644 <td>Icon for the cancel button. </td> 645 </tr> 646 <tr> 647 <td>OptionPane.errorIcon</td> 648 <td>Icon </td> 649 <td>null </td> 650 <td>Icon used for ERROR_MESSAGE. </td> 651 </tr> 652 <tr> 653 <td>OptionPane.informationIcon</td> 654 <td>Icon </td> 655 <td>null </td> 656 <td>Icon used for INFORMATION_MESSAGE. </td> 657 </tr> 658 <tr> 659 <td>OptionPane.isYesLast</td> 660 <td>Boolean </td> 661 <td>false </td> 662 <td>If true the 'yes' button leads other buttons, otherwise 663 it follows the other buttons. </td> 664 </tr> 665 <tr> 666 <td>OptionPane.questionIcon</td> 667 <td>Icon </td> 668 <td>null </td> 669 <td>Icon used for error QUESTION_MESSAGE. </td> 670 </tr> 671 <tr> 672 <td>OptionPane.minimumSize</td> 673 <td>Dimension </td> 674 <td>262x90</td> 675 <td>Minimum size for the JOptionPane. </td> 676 </tr> 677 <tr> 678 <td>OptionPane.noIcon</td> 679 <td>Icon </td> 680 <td>null </td> 681 <td>Icon for the no button. </td> 682 </tr> 683 <tr> 684 <td>OptionPane.okIcon</td> 685 <td>Icon </td> 686 <td>null </td> 687 <td>Icon for the ok button. </td> 688 </tr> 689 <tr> 690 <td>OptionPane.sameSizeButtons</td> 691 <td>Boolean </td> 692 <td>true </td> 693 <td>Whether or not all the buttons should be the same size. </td> 694 </tr> 695 <tr> 696 <td>OptionPane.separatorPadding</td> 697 <td>Integer </td> 698 <td>6</td> 699 <td>Amount of padding between the message area and separator. </td> 700 </tr> 701 <tr> 702 <td>OptionPane.yesIcon</td> 703 <td>Icon </td> 704 <td>null </td> 705 <td>Icon for the yes button. </td> 706 </tr> 707 <tr> 708 <td>OptionPane.warningIcon</td> 709 <td>Icon </td> 710 <td>null </td> 711 <td>Icon used for error WARNING_MESSAGE </td> 712 </tr> 713 </tbody> 714 </table> 715 <br> 716 <h4><a id="JProgressBar"></a>JProgressBar<br> 717 </h4> 718 <h5>JProgressBar Specific Properties<br> 719 </h5> 720 <table cellpadding="2" cellspacing="2" border="1" summary="JProgressBar specific properties" 721 style="text-align: left; width: 100%;"> 722 <tbody> 723 <tr> 724 <th style="vertical-align: top; text-align: center;">Property</th> 725 <th style="vertical-align: top; text-align: center;">Expected Type<br> 726 </th> 727 <th style="vertical-align: top; text-align: center;">Default Value<br> 728 </th> 729 <th style="vertical-align: top; text-align: center;">Description</th> 730 </tr> 731 <tr> 732 <td style="vertical-align: top;">ProgressBar.repaintInterval<br> 733 </td> 734 <td style="vertical-align: top;">Integer<br> 735 </td> 736 <td style="vertical-align: top;">50<br> 737 </td> 738 <td style="vertical-align: top;">Number of milliseconds between 739 repaints for indeterminate progress bars.<br> 740 </td> 741 </tr> 742 <tr> 743 <td style="vertical-align: top;">ProgressBar.cycleTime<br> 744 </td> 745 <td style="vertical-align: top;">Integer<br> 746 </td> 747 <td style="vertical-align: top;">3000<br> 748 </td> 749 <td style="vertical-align: top;">Number of milliseconds used to 750 determine how far to move<br> 751 the bouncing box per frame when the progress bar is indeterminate.<br> 752 </td> 753 </tr> 754 </tbody> 755 </table> 756 <h4><a id="JRadioButton">JRadioButton</a></h4> 757 <p> JRadioButton paints text using the TEXT_FOREGROUND ColorType. In 758 addition to the <a href="#buttonProperties">Button properties</a>, 759 JRadioButton supports the following property: </p> 760 <h5>JRadioButton Specific Properties</h5> 761 <table border="1" summary="JRadioButton specific properties"> 762 <thead><tr> 763 <th>Property</th> 764 <th>Expected Type</th> 765 <th>Default Value</th> 766 <th>Description </th> 767 </tr> 768 </thead> <tbody> 769 <tr> 770 <td>RadioButton.icon</td> 771 <td>Icon</td> 772 <td>null </td> 773 <td>Icon used to render the radio indicator. </td> 774 </tr> 775 </tbody> 776 </table> 777 <br> 778 <h4><a id="JScrollBar">JScrollBar</a></h4> 779 <p> JScrollBar is a composite component that consists of the following 780 child Components: </p> 781 <table border="1" summary="JScrollBar child components"> 782 <thead><tr> 783 <th>Name</th> 784 <th>Type</th> 785 <th>Description </th> 786 </tr> 787 </thead> <tbody> 788 <tr> 789 <td>ScrollBar.button</td> 790 <td>SynthArrowButton </td> 791 <td>Identifies the increment/decrement buttons. </td> 792 </tr> 793 </tbody> 794 </table> 795 796 <h5>JScrollBar Specific Properties</h5> 797 <table border="1" summary="JScrollBar specific properties"> 798 <thead><tr> 799 <th>Property</th> 800 <th>Expected Type</th> 801 <th>Default Value</th> 802 <th>Description </th> 803 </tr> 804 </thead> <tbody> 805 <tr> 806 <td>ScrollBar.allowsAbsolutePositioning</td> 807 <td>Boolean </td> 808 <td>false</td> 809 <td>If true, middle mouse click in the track will set the 810 position of the track to where the mouse is. </td> 811 </tr> 812 <tr> 813 <td>ScrollBar.maximumThumbSize</td> 814 <td>Dimension</td> 815 <td>4096x4096 </td> 816 <td>Maximum thumb size. </td> 817 </tr> 818 <tr> 819 <td>ScrollBar.minimumThumbSize</td> 820 <td>Dimension</td> 821 <td>Derived from ScrollBar.thumbHeight</td> 822 <td>The minimum thumb size. If this is not specified the 823 minimum thumb size is ScrollBar.thumbHeight plus the insets 824 of the scrollbar along the opposite axis of the scrollbar 825 and 7 along the other axis. For example, if you have not 826 specified Insets for a scrollbar, and the orientation of 827 the scrollbar is vertical, than the minimum thumb 828 size width is ScrollBar.thumbHeight with a height of 7.</td> 829 </tr> 830 <tr> 831 <td>ScrollBar.squareButtons</td> 832 <td>Boolean </td> 833 <td>false</td> 834 <td>If true, the width and height of the scrollbar buttons 835 will be made equal. </td> 836 </tr> 837 <tr> 838 <td>ScrollBar.thumbHeight</td> 839 <td>Integer</td> 840 <td>14 </td> 841 <td>The preferred height, when the orientation of the 842 scrollbar is horizontal, or preferred width when the 843 orientation of the scrollbar is vertical.</td> 844 </tr> 845 </tbody> 846 </table> 847 <br> 848 <h4><a id="Separator">Separators</a></h4> 849 <p> All of the separator classes, JSeparator, JPopupMenu.Separator and 850 JToolBar.Separator use the same property: </p> 851 <table border="1" summary="Separator classes common properties"> 852 <thead><tr> 853 <th>Property</th> 854 <th>Expected Type</th> 855 <th>Default Value</th> 856 <th>Description </th> 857 </tr> 858 </thead> <tbody> 859 <tr> 860 <td>Separator.thickness</td> 861 <td>Integer</td> 862 <td>2 </td> 863 <td>Preferred width, for vertically aligned separators, or 864 preferred height for horizontally aligned separators. The resulting 865 preferred size will include the Insets. </td> 866 </tr> 867 </tbody> 868 </table> 869 <p> JToolBar.Separator also supports the following property: </p> 870 <table border="1" summary="JToolBar.Separator specific properties"> 871 <thead><tr> 872 <th>Property</th> 873 <th>Expected Type</th> 874 <th>Default Value</th> 875 <th>Description </th> 876 </tr> 877 </thead> <tbody> 878 <tr> 879 <td>ToolBar.separatorSize</td> 880 <td>Dimension</td> 881 <td>null </td> 882 <td>The value of this is passed to the 883 <code>javax.swing.JToolBar$Separator#setSeparatorSize(java.awt.Dimension)</code> 884 method. If unspecified <code>setSeparatorSize</code> is not invoked. 885 </td> 886 </tr> 887 </tbody> 888 </table> 889 <br> 890 <h4><a id="JScrollPane">JScrollPane</a></h4> 891 <p> 892 JScrollPane is unique in that it provides a method for setting 893 the Border around the JViewport with JViewport throwing an 894 IllegalArgumentException from <code>setBorder</code>. To 895 accommodate this a special border is installed on the 896 <code>JScrollPane</code> that uses the 897 insets from the key 898 <code>ScrollPane.viewportBorderInsets</code>. The 899 <code>SynthPainter</code> method 900 <code>paintViewportBorder</code> is called to paint the 901 <code>Viewport</code>s border. 902 </p> 903 <h5>JScrollPane Specific Properties</h5> 904 <table border="1" summary="JScrollPane specific properties"> 905 <thead><tr> 906 <th>Property</th> 907 <th>Expected Type</th> 908 <th>Default Value</th> 909 <th>Description </th> 910 </tr> 911 </thead> <tbody> 912 <tr> 913 <td>ScrollPane.viewportBorderInsets</td> 914 <td>Insets</td> 915 <td>null </td> 916 <td>Insets for the viewport Border. </td> 917 </tr> 918 </tbody> 919 </table> 920 <br> 921 <h4><a id="JSplitPane">JSplitPane</a></h4> 922 <p> JSplitPane is a composite component that will contain a divider and 923 potentially two buttons, if setOneTouchExpandable(true) has been 924 invoked. The two buttons will be named: 925 SplitPaneDivider.leftOneTouchButton and 926 SplitPaneDivider.rightOneTouchButton. </p> 927 <h5>JSplitPane Specific Properties</h5> 928 <table border="1" summary="JSplitPane specific properties"> 929 <thead><tr> 930 <th>Property</th> 931 <th>Expected Type</th> 932 <th>Default Value</th> 933 <th>Description </th> 934 </tr> 935 </thead> <tbody> 936 <tr> 937 <td>SplitPane.centerOneTouchButtons</td> 938 <td>Boolean</td> 939 <td>true </td> 940 <td>If true, the one touch buttons are centered on the divider. </td> 941 </tr> 942 <tr> 943 <td>SplitPane.oneTouchButtonOffset</td> 944 <td>Integer</td> 945 <td>2 </td> 946 <td>Distance between the one touch buttons. </td> 947 </tr> 948 <tr> 949 <td>SplitPane.oneTouchButtonSize</td> 950 <td>Integer</td> 951 <td>6 </td> 952 <td>Size to make the one touch buttons. </td> 953 </tr> 954 <tr> 955 <td>SplitPane.oneTouchExpandable</td> 956 <td>Boolean</td> 957 <td>null </td> 958 <td>If non null, the value of this is passed to 959 setOneTouchExpandable. </td> 960 </tr> 961 <tr> 962 <td>SplitPane.size</td> 963 <td>Integer</td> 964 <td>6 </td> 965 <td>Size of the divider </td> 966 </tr> 967 </tbody> 968 </table> 969 <br> 970 <h4><a id="JSlider"></a>JSlider</h4> 971 <h5>JSlider Specific Properties</h5> 972 <table cellpadding="2" cellspacing="2" border="1" summary="JSlider specific properties" 973 style="text-align: left; width: 100%;"> 974 <tbody> 975 <tr> 976 <th style="vertical-align: top; text-align: center;">Property<br> 977 </th> 978 <th style="vertical-align: top; text-align: center;">Expected Type<br> 979 </th> 980 <th style="vertical-align: top; text-align: center;">Default Value<br> 981 </th> 982 <th style="vertical-align: top; text-align: center;">Description<br> 983 </th> 984 </tr> 985 <tr> 986 <td style="vertical-align: top;">Slider.thumbWidth<br> 987 </td> 988 <td style="vertical-align: top;">Integer<br> 989 </td> 990 <td style="vertical-align: top;">30<br> 991 </td> 992 <td style="vertical-align: top;">Width of the slider thumb<br> 993 </td> 994 </tr> 995 <tr> 996 <td style="vertical-align: top;">Slider.thumbHeight<br> 997 </td> 998 <td style="vertical-align: top;">Integer<br> 999 </td> 1000 <td style="vertical-align: top;">14<br> 1001 </td> 1002 <td style="vertical-align: top;">Height of the slider thumb<br> 1003 </td> 1004 </tr> 1005 <tr> 1006 <td style="vertical-align: top;">Slider.trackBorder<br> 1007 </td> 1008 <td style="vertical-align: top;">Integer<br> 1009 </td> 1010 <td style="vertical-align: top;">1<br> 1011 </td> 1012 <td style="vertical-align: top;">Width of the track border<br> 1013 </td> 1014 </tr> 1015 <tr> 1016 <td style="vertical-align: top;">Slider.paintValue<br> 1017 </td> 1018 <td style="vertical-align: top;">Boolean<br> 1019 </td> 1020 <td style="vertical-align: top;">true<br> 1021 </td> 1022 <td style="vertical-align: top;">Whether or not to paint the 1023 current value<br> 1024 of the slider.<br> 1025 </td> 1026 </tr> 1027 </tbody> 1028 </table> 1029 <br> 1030 <h4><a id="JTabbedPane"></a>JTabbedPane</h4> 1031 <h5>JTabbedPane Specific Properties</h5> 1032 <table cellpadding="2" cellspacing="2" border="1" summary="JTabbedPane specific properties" 1033 style="text-align: left; width: 100%;"> 1034 <tbody> 1035 <tr> 1036 <th style="vertical-align: top; text-align: center;">Property</th> 1037 <th style="vertical-align: top; text-align: center;">Expected Type<br> 1038 </th> 1039 <th style="vertical-align: top; text-align: center;">Default Value<br> 1040 </th> 1041 <th style="vertical-align: top; text-align: center;">Description</th> 1042 </tr> 1043 <tr> 1044 <td style="vertical-align: top;">TabbedPane.tabRunOverlay<br> 1045 </td> 1046 <td style="vertical-align: top;">Integer<br> 1047 </td> 1048 <td style="vertical-align: top;">0<br> 1049 </td> 1050 <td style="vertical-align: top;">Number of pixels to overlap 1051 tabs when there is more than one row. <br> 1052 </td> 1053 </tr> 1054 <tr> 1055 <td style="vertical-align: top;">TabbedPane.textIconGap<br> 1056 </td> 1057 <td style="vertical-align: top;">Integer<br> 1058 </td> 1059 <td style="vertical-align: top;">0<br> 1060 </td> 1061 <td style="vertical-align: top;">Padding added between the icon 1062 and text on a tab. If there is no text or icon this value 1063 is not used. 1064 </td> 1065 </tr> 1066 <tr> 1067 <td style="vertical-align: top;">TabbedPane.selectedTabPadInsets<br> 1068 </td> 1069 <td style="vertical-align: top;">Insets<br> 1070 </td> 1071 <td style="vertical-align: top;">Empty Insets (0, 0, 0, 0)<br> 1072 </td> 1073 <td style="vertical-align: top;">Extra insets added to the 1074 selected tab.<br> 1075 </td> 1076 </tr> 1077 <tr> 1078 <td style="vertical-align: top;">TabbedPane.selectionFollowsFocus<br> 1079 </td> 1080 <td style="vertical-align: top;">Boolean<br> 1081 </td> 1082 <td style="vertical-align: top;">true<br> 1083 </td> 1084 <td style="vertical-align: top;">If true the selection of the 1085 tabbed pane changes as the user navigates the tabs with a 1086 mouse.<br> 1087 </td> 1088 </tr> 1089 </tbody> 1090 </table> 1091 <br> 1092 <h4><a id="JTable">JTable</a></h4> 1093 <p> JTable sets the name of the renderer to Table.cellRenderer. 1094 JTable supports the following properties: </p> 1095 <h5>JTable Specific Properties</h5> 1096 <table border="1" summary="JTable specific properties"> 1097 <thead><tr> 1098 <th>Property</th> 1099 <th>Expected Type</th> 1100 <th>Default Value</th> 1101 <th>Description </th> 1102 </tr> 1103 </thead> <tbody> 1104 <tr> 1105 <td>Table.gridColor</td> 1106 <td>Color</td> 1107 <td>null </td> 1108 <td>Color used for the grid. If null the foreground from the 1109 style is used. </td> 1110 </tr> 1111 <tr> 1112 <td>Table.rendererUseTableColors</td> 1113 <td>Boolean</td> 1114 <td>true </td> 1115 <td>If true the renderers state is not updated, and the text 1116 colors come from JTable's getSelectionBackground and 1117 getSelectionForeground methods. If false, the renderer's state is 1118 updated and the colors will instead come from the Style. </td> 1119 </tr> 1120 <tr> 1121 <td>Table.rendererUseUIBorder</td> 1122 <td>Boolean</td> 1123 <td>true </td> 1124 <td>If true setBorder on the renderer will succeed 1125 regardless of the border passed in, otherwise setBorder on the 1126 renderer will only succeed if it is a Synth Border. </td> 1127 </tr> 1128 <tr> 1129 <td>Table.rowHeight</td> 1130 <td>Integer</td> 1131 <td>-1 </td> 1132 <td>If not -1 setRowHeight is invoked on the JTable. </td> 1133 </tr> 1134 </tbody> 1135 </table> 1136 <br> 1137 <h4><a id="JTree">JTree</a></h4> 1138 <p> JTree sets the name of the renderer to Tree.renderer, the name of 1139 the editor is Tree.cellEditor.</p> 1140 <h5>JTree Specific Properties</h5> 1141 <table border="1" summary="JTree specific properties"> 1142 <thead><tr> 1143 <th>Property</th> 1144 <th>Expected Type</th> 1145 <th>Default Value</th> 1146 <th>Description </th> 1147 </tr> 1148 </thead> <tbody> 1149 <tr> 1150 <td>Tree.collapsedIcon</td> 1151 <td>Icon</td> 1152 <td>null </td> 1153 <td>Icon to use when a node is collapsed. </td> 1154 </tr> 1155 <tr> 1156 <td>Tree.drawHorizontalLines</td> 1157 <td>Boolean</td> 1158 <td>true </td> 1159 <td>If true nodes have a horizontal connecting them to the 1160 leading edge of their parent. </td> 1161 </tr> 1162 <tr> 1163 <td>Tree.drawVerticalLines</td> 1164 <td>Boolean</td> 1165 <td>true </td> 1166 <td>If true a vertical line is drawn down from expanded nodes. </td> 1167 </tr> 1168 <tr> 1169 <td>Tree.expandedIcon</td> 1170 <td>Icon</td> 1171 <td>null </td> 1172 <td>Icon to use when a node has been expanded. </td> 1173 </tr> 1174 <tr> 1175 <td>Tree.leftChildIndent</td> 1176 <td>Integer</td> 1177 <td>0 </td> 1178 <td>This plus Tree.rightChildIndent account for the total 1179 space, along the y axis, to offset nodes from their parent. </td> 1180 </tr> 1181 <tr> 1182 <td>Tree.rightChildIndent</td> 1183 <td>Integer</td> 1184 <td>0 </td> 1185 <td>This plus Tree.leftChildIndent account for the total 1186 space, along the y axis, to offset nodes from their parent. </td> 1187 </tr> 1188 <tr> 1189 <td>Tree.rowHeight</td> 1190 <td>Integer</td> 1191 <td>-1 </td> 1192 <td>Row height for the Tree.</td> 1193 </tr> 1194 <tr> 1195 <td>Tree.scrollsHorizontallyAndVertically</td> 1196 <td>Boolean</td> 1197 <td>false </td> 1198 <td>If false and scrolling needs to happen to accommodate cells 1199 it will only happen along the vertical axis, if true, scrolling 1200 may happen along both the horizontal and vertical axis. </td> 1201 </tr> 1202 <tr> 1203 <td>Tree.scrollsOnExpand</td> 1204 <td>Boolean</td> 1205 <td>true </td> 1206 <td>Whether or not the JTree should scroll when a node is 1207 expanded. </td> 1208 </tr> 1209 <tr> 1210 <td>Tree.linesStyle</td> 1211 <td>String</td> 1212 <td> </td> 1213 <td>The styles of the lines in the tree. Synth supports solid lines 1214 (empty value) and dashed lines ("dashed" value). It is possible to add new 1215 styles by creating a new <a href="../SynthGraphicsUtils.html">SynthGraphicsUtils</a> 1216 and <a href="synthFileFormat.html#e.graphicsUtils">binding it</a> to the tree.</td> 1217 </tr> 1218 </tbody> 1219 </table> 1220 <h4><a id="JToggleButton">JToggleButton</a></h4> 1221 <p> JToggleButton paints text using the TEXT_FOREGROUND ColorType. In 1222 addition to the <a href="#buttonProperties">Button properties</a>, 1223 JToggleButton supports the following property: </p> 1224 <h5>JToggleButton Specific Properties</h5> 1225 <table border="1" summary="JToggleButton specific properties"> 1226 <thead><tr> 1227 <th>Property</th> 1228 <th>Expected Type</th> 1229 <th>Default Value</th> 1230 <th>Description </th> 1231 </tr> 1232 </thead> <tbody> 1233 <tr> 1234 <td>ToggleButton.icon</td> 1235 <td>Icon</td> 1236 <td>null </td> 1237 <td>Icon used to render the radio indicator. </td> 1238 </tr> 1239 </tbody> 1240 </table> 1241 <br> 1242 <h4><a id="buttonProperties">Button Properties</a></h4> 1243 <p> Each of the Button classes (JButton, JCheckBox, JRadioButton, 1244 JToggleButton and SynthArrowButton) support a similar set of properties. 1245 These properties are: </p> 1246 <table border="1" summary="Button classes common properties"> 1247 <thead><tr> 1248 <th>Property</th> 1249 <th>Expected Type</th> 1250 <th>Default Value</th> 1251 <th>Description </th> 1252 </tr> 1253 </thead> <tbody> 1254 <tr> 1255 <td>prefix.contentAreaFilled</td> 1256 <td>Integer</td> 1257 <td>true </td> 1258 <td>Refer to the javadoc of 1259 <code>javax.swing.AbstractButton#contentAreaFilled(boolean)</code> 1260 for details of how this is used. It is up to the Painter to properly honor 1261 this property. 1262 </td> 1263 </tr> 1264 <tr> 1265 <td>prefix.iconTextGap</td> 1266 <td>Integer</td> 1267 <td>If unspecified, JButton.setIconTextGap is not invoked.</td> 1268 <td>Padding between the icon and text. Refer to the javadoc of 1269 <code>javax.swing.AbstractButton#setIconTextGap(int)</code> 1270 for details of how this is used. 1271 </td> 1272 </tr> 1273 <tr> 1274 <td>prefix.margin</td> 1275 <td>Insets</td> 1276 <td>Empty Insets (0, 0, 0, 0) </td> 1277 <td>Margin for the JButton. Refer to the javadoc of 1278 <code>javax.swing.AbstractButton#setMargin(java.awt.Insets)</code> for 1279 details of how the margin is used. 1280 </td> 1281 </tr> 1282 <tr> 1283 <td>prefix.textShiftOffset</td> 1284 <td>Integer</td> 1285 <td>0 </td> 1286 <td>Amount to shift the text and icon, along the x and y axis, 1287 from where it would normally be layed out. This is only used when 1288 the button is in a pressed state and does not have a pressed icon. </td> 1289 </tr> 1290 </tbody> 1291 </table> 1292 <p> <code>Prefix</code> is one of: Button, CheckBox, RadioButton or 1293 JToggleButton.<br> 1294 </p> 1295 <h4><a id="textProperties"></a>Text Properties<br> 1296 </h4> 1297 <table cellpadding="2" cellspacing="2" border="1" summary="Text properties" 1298 style="text-align: left; width: 100%;"> 1299 <tbody> 1300 <tr> 1301 <th style="vertical-align: top; text-align: center;">Property</th> 1302 <th style="vertical-align: top; text-align: center;">Expected Type<br> 1303 </th> 1304 <th style="vertical-align: top; text-align: center;">Default Value<br> 1305 </th> 1306 <th style="vertical-align: top; text-align: center;">Description<br> 1307 </th> 1308 </tr> 1309 <tr> 1310 <td style="vertical-align: top;">prefix.caretForeground<br> 1311 </td> 1312 <td style="vertical-align: top;">Color<br> 1313 </td> 1314 <td style="vertical-align: top;">#000000</td> 1315 <td style="vertical-align: top;">Color of the caret.<br> 1316 </td> 1317 </tr> 1318 <tr> 1319 <td style="vertical-align: top;">prefix.margin<br> 1320 </td> 1321 <td style="vertical-align: top;">Insets</td> 1322 <td style="vertical-align: top;">Empty Insets (0, 0, 0, 0),<br> 1323 EditorPane and TextPane (3, 3, 3, 3)<br> 1324 </td> 1325 <td style="vertical-align: top;">Margins of the text component.<br> 1326 </td> 1327 </tr> 1328 <tr> 1329 <td style="vertical-align: top;">prefix.caretBlinkRate<br> 1330 </td> 1331 <td style="vertical-align: top;">Integer<br> 1332 </td> 1333 <td style="vertical-align: top;">500<br> 1334 </td> 1335 <td style="vertical-align: top;">Number of milliseconds defining 1336 the blink rate fo the caret.<br> 1337 </td> 1338 </tr> 1339 </tbody> 1340 </table> 1341 <p><code>Prefix</code> is one of: EditorPane, FormattedTextField, 1342 PasswordField, TextArea, TextField or TextPane.<br> 1343 </p> 1344 </body> 1345 </html> --- EOF ---