Package generic.theme.laf
Class CustomNimbusLookAndFeel
java.lang.Object
javax.swing.LookAndFeel
javax.swing.plaf.basic.BasicLookAndFeel
javax.swing.plaf.synth.SynthLookAndFeel
javax.swing.plaf.nimbus.NimbusLookAndFeel
generic.theme.laf.CustomNimbusLookAndFeel
- All Implemented Interfaces:
Serializable
Extends the
NimbusLookAndFeel
(Nimbus) to intercept getDefaults()
. Nimbus
does not honor changes to the UIDefaults after it is installed as the active
LookAndFeel
, so we have to make the changes at the time the UIDefaults are installed.
To get around this issue, we extend Nimbus so that we can install our GColors and overridden properties as Nimbus is being installed, specifically during the call to the getDefaults() method. For all other Look And Feels, the GColors and overridden properties are changed in the UIDefaults after the Look And Feel is installed, so they don't need to extend the Look and Feel class.
Also, unlike other LaFs, Nimbus needs to be reinstalled every time we need to make a change to any of the UIDefaults values, since it does not respond to changes other than when first installed.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
installJavaDefaultsIntoThemeManager
(UiDefaultsMapper uiDefaultsMapper) Methods inherited from class javax.swing.plaf.nimbus.NimbusLookAndFeel
getDerivedColor, getDerivedColor, getDerivedColor, getDescription, getDisabledIcon, getID, getName, getStyle, initialize, register, shouldUpdateStyleOnAncestorChanged, shouldUpdateStyleOnEvent, uninitialize
Methods inherited from class javax.swing.plaf.synth.SynthLookAndFeel
createUI, getRegion, getStyleFactory, isNativeLookAndFeel, isSupportedLookAndFeel, load, load, setStyleFactory, updateStyles
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initClassDefaults, initComponentDefaults, initSystemColorDefaults, loadSystemColors, playSound
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledSelectedIcon, getLayoutStyle, getSupportsWindowDecorations, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder
-
Method Details
-
getDefaults
- Overrides:
getDefaults
in classNimbusLookAndFeel
-
installJavaDefaultsIntoThemeManager
-
getNormalizedIdToLafIdMap
-