Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6604357

Nimbus L&F: Add componet customization via ClientProperties

XMLWordPrintable

    • b09
    • generic
    • generic
    • Verified

      Would like to add the ability to modify what the NimbusStyle reports as values (painters, properties, etc) based on entries in UIDefaults AND in a component's client properties. The current scheme of customizing states based on named components in UI defaults is fine if you have a special named component that will be reused in many places. However, if you are doing a one-off design for a single component, this approach can lead to a polluted and cluttered UIDefaults table. Rather, it would be nice to associate the custom state with the component itself. Lacking public API, I propose using undocumented client properties for Java 6 (and documented properties or public API in Java 7). Any entry in client properties would override the corresponding entry in UIDefaults.

      We would also like Nimbus to support the "JComponent.sizeVariant" client property to control component size. The name of the property and its values have been chosen to match Apple's LAF so we are compatable. The valid values for this key are "large", "small" and "mini". They designed to be used in tools pallets where space is a premium and small or mini components are needed or in wizards/dialogs where there is plenty of space and a larger conponents can be used. Look at the attched screenshot to see the effect of this setting. It is not designed to work perfectly with all components, only a few like JButton, JCheckBox, JRadioButton, JTextField, JComboBox, JSpinner, JprogressBar, JScrollBar and JSlider.

            jasper Jasper Potts (Inactive)
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: