Class DockingWindowsLookAndFeelUtils

java.lang.Object
ghidra.docking.util.DockingWindowsLookAndFeelUtils

public class DockingWindowsLookAndFeelUtils extends Object
A utility class to manage LookAndFeel (LaF) settings.
  • Field Details

    • LAST_LOOK_AND_FEEL_KEY

      public static final String LAST_LOOK_AND_FEEL_KEY
      Preference name for look and feel for the application.
      See Also:
    • USE_INVERTED_COLORS_KEY

      public static final String USE_INVERTED_COLORS_KEY
      Preference name for whether to use inverted colors.
      See Also:
    • METAL_LOOK_AND_FEEL

      public static final String METAL_LOOK_AND_FEEL
      Metal is the non-system, generic Java Look and Feel.
      See Also:
  • Method Details

    • loadFromPreferences

      public static void loadFromPreferences()
      Loads settings from Preferences.
    • getUseInvertedColorsPreference

      public static boolean getUseInvertedColorsPreference()
      Returns the Preferences value for whether to use inverted colors when painting.
      Returns:
      the Preferences value for whether to use inverted colors when painting.
    • getInstalledLookAndFeelName

      public static String getInstalledLookAndFeelName()
      Returns the currently installed LaF.
      Returns:
      the currently installed LaF.
    • setLookAndFeel

      public static void setLookAndFeel(String lookAndFeelName)
      Set the look and feel (LAF) indicated by the string passed in as a parameter. The string value can be either the class name of the LAF, as returned by LookAndFeelInfo.getClassName() or the name as returned by LookAndFeelInfo.getName().

      Note: to be effective, this call needs to be made before any components have been created and shown.

      Parameters:
      lookAndFeelName - the string indicating which look and feel is desired (see above)
    • getLookAndFeelNames

      public static List<String> getLookAndFeelNames()
      Returns all installed LaFs. This will vary by OS.
      Returns:
      all installed LaFs.
    • setUseInvertedColors

      public static void setUseInvertedColors(boolean useInvertedColors)
    • isUsingAquaUI

      public static boolean isUsingAquaUI(ComponentUI UI)
      Returns true if the given UI object is using the Aqua Look and Feel.
      Parameters:
      UI - the UI to examine.
      Returns:
      true if the UI is using Aqua
    • isUsingNimbusUI

      public static boolean isUsingNimbusUI()
      Returns true if 'Nimbus' is the current Look and Feel
      Returns:
      true if 'Nimbus' is the current Look and Feel
    • isUsingMotifUI

      public static boolean isUsingMotifUI()