Package ghidra.docking.util
Class DockingWindowsLookAndFeelUtils
- java.lang.Object
-
- ghidra.docking.util.DockingWindowsLookAndFeelUtils
-
public class DockingWindowsLookAndFeelUtils extends java.lang.ObjectA utility class to manage LookAndFeel (LaF) settings.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLAST_LOOK_AND_FEEL_KEYPreference name for look and feel for the application.static java.lang.StringMETAL_LOOK_AND_FEELMetal is the non-system, generic Java Look and Feel.static java.lang.StringUSE_INVERTED_COLORS_KEYPreference name for whether to use inverted colors.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetInstalledLookAndFeelName()Returns the currently installed LaF.static java.util.List<java.lang.String>getLookAndFeelNames()Returns all installed LaFs.static booleangetUseInvertedColorsPreference()Returns thePreferencesvalue for whether to use inverted colors when paiting.static booleanisUsingAquaUI(javax.swing.plaf.ComponentUI UI)Returns true if the given UI object is using the Aqua Look and Feel.static booleanisUsingNimbusUI()Returns true if 'Nimbus' is the current Look and Feelstatic voidloadFromPreferences()Loads settings fromPreferences.static voidsetLookAndFeel(java.lang.String lookAndFeelName)Set the look and feel (LAF) indicated by the string passed in as a parameter.static voidsetUseInvertedColors(boolean useInvertedColors)
-
-
-
Field Detail
-
LAST_LOOK_AND_FEEL_KEY
public static final java.lang.String LAST_LOOK_AND_FEEL_KEY
Preference name for look and feel for the application.- See Also:
- Constant Field Values
-
USE_INVERTED_COLORS_KEY
public static final java.lang.String USE_INVERTED_COLORS_KEY
Preference name for whether to use inverted colors.- See Also:
- Constant Field Values
-
METAL_LOOK_AND_FEEL
public static final java.lang.String METAL_LOOK_AND_FEEL
Metal is the non-system, generic Java Look and Feel.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadFromPreferences
public static void loadFromPreferences()
Loads settings fromPreferences.
-
getUseInvertedColorsPreference
public static boolean getUseInvertedColorsPreference()
Returns thePreferencesvalue for whether to use inverted colors when paiting.- Returns:
- the
Preferencesvalue for whether to use inverted colors when paiting.
-
getInstalledLookAndFeelName
public static java.lang.String getInstalledLookAndFeelName()
Returns the currently installed LaF.- Returns:
- the currently installed LaF.
-
setLookAndFeel
public static void setLookAndFeel(java.lang.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 java.util.List<java.lang.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(javax.swing.plaf.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
-
-