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