Class NimbusLookAndFeelManager

java.lang.Object
generic.theme.laf.LookAndFeelManager
generic.theme.laf.NimbusLookAndFeelManager

public class NimbusLookAndFeelManager extends LookAndFeelManager
Nimbus LookAndFeelManager. Specialized so that it can return the Nimbus installer and perform specialized updating when icons or fonts change. Basically, this class needs to re-install a new instance of the Nimbus LookAndFeel each time a font or icon changes.
  • Constructor Details

  • Method Details

    • resetAll

      public void resetAll(GThemeValueMap javaDefaults)
      Description copied from class: LookAndFeelManager
      Called when all colors, fonts, and icons may have changed
      Overrides:
      resetAll in class LookAndFeelManager
      Parameters:
      javaDefaults - the current set of java defaults so that those ids can be updated special as needed by the current LookAndFeel
    • fontsChanged

      public void fontsChanged(Set<String> affectedJavaIds)
      Description copied from class: LookAndFeelManager
      Called when one or more fonts have changed.

      This will update the Java UIManager and trigger a reload of the UIs.

      Overrides:
      fontsChanged in class LookAndFeelManager
      Parameters:
      affectedJavaIds - the set of Java Font ids that are affected by this change; these are the normalized ids
    • iconsChanged

      public void iconsChanged(Set<String> affectedJavaIds, Icon newIcon)
      Description copied from class: LookAndFeelManager
      Called when one or more icons have changed.
      Overrides:
      iconsChanged in class LookAndFeelManager
      Parameters:
      affectedJavaIds - set of icon ids affected by this icon change
      newIcon - the new icon to use for the given set of icon ids
    • doInstallLookAndFeel

      protected void doInstallLookAndFeel() throws UnsupportedLookAndFeelException
      Description copied from class: LookAndFeelManager
      Subclasses may override this method to install a specific look and feel.
      Overrides:
      doInstallLookAndFeel in class LookAndFeelManager
      Throws:
      UnsupportedLookAndFeelException - if lnf.isSupportedLookAndFeel() is false
    • processJavaDefaults

      protected void processJavaDefaults()
      Description copied from class: LookAndFeelManager
      Extracts java default colors, fonts, and icons and stores them in the ThemeManager and updates the UIDefaults by installing GColors for all color values and installing any overridden fonts or icons.
      Overrides:
      processJavaDefaults in class LookAndFeelManager
    • fixupLookAndFeelIssues

      protected void fixupLookAndFeelIssues()
      Description copied from class: LookAndFeelManager
      Subclass may override this method to do specific LookAndFeel fixes.

      This will get called after default values are loaded. This means that any values installed by this method will overwrite any values registered by the theme.

      Standard properties, such as strings and booleans, can be set inside of the theme properties files. For more complicated UIManager properties, look and feel classes will need to override this method and install those directly.

      Any property installed here will not fully be part of the theme system, but rather will be directly installed into the Java Look and Feel. Thus, properties installed here will be hard-coded overrides for the system. If we decided that a hard-coded value should be put into the theme system, then we will need to add support for that property type so that it can be used when loading the theme files.

      Overrides:
      fixupLookAndFeelIssues in class LookAndFeelManager
    • createUiDefaultsMapper

      protected UiDefaultsMapper createUiDefaultsMapper(UIDefaults defaults)
      Specified by:
      createUiDefaultsMapper in class LookAndFeelManager