Package ghidra.docking.util
Class DockingWindowsLookAndFeelUtils
- java.lang.Object
-
- ghidra.docking.util.DockingWindowsLookAndFeelUtils
-
public class DockingWindowsLookAndFeelUtils extends java.lang.Object
A utility class to manage LookAndFeel (LaF) settings.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LAST_LOOK_AND_FEEL_KEY
Preference name for look and feel for the application.static java.lang.String
METAL_LOOK_AND_FEEL
Metal is the non-system, generic Java Look and Feel.static java.lang.String
USE_INVERTED_COLORS_KEY
Preference name for whether to use inverted colors.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getInstalledLookAndFeelName()
Returns the currently installed LaF.static java.util.List<java.lang.String>
getLookAndFeelNames()
Returns all installed LaFs.static boolean
getUseInvertedColorsPreference()
Returns thePreferences
value for whether to use inverted colors when paiting.static boolean
isUsingAquaUI(javax.swing.plaf.ComponentUI UI)
Returns true if the given UI object is using the Aqua Look and Feel.static boolean
isUsingNimbusUI()
Returns true if 'Nimbus' is the current Look and Feelstatic void
loadFromPreferences()
Loads settings fromPreferences
.static void
setLookAndFeel(java.lang.String lookAndFeelName)
Set the look and feel (LAF) indicated by the string passed in as a parameter.static void
setUseInvertedColors(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 thePreferences
value for whether to use inverted colors when paiting.- Returns:
- the
Preferences
value 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 byLookAndFeelInfo.getClassName()
or the name as returned byLookAndFeelInfo.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
-
-