Class VAppearances
- Object
-
- VAppearances
-
public class VAppearances extends ObjectThis class keeps track of macOS appearances and provides access to their attributes. The attributes of an appearance of interest to Java applications are the values of system colors, which are context dependent.
On macOS 10.14 and later, there are four standard appearances, but only two appear to be used: one for light mode and one for dark mode. Previously, there was just one standard appearance. The standard appearances are identified using standard names.
The system color values depend upon the selected appearance. Some system color values also depend on the selected accent color option, the selected highlight color option, and whether the increase contrast accessibility option is enabled. This context is represented as an instance of
AppearanceSettings.AppKit applications are notified of changes to system colors in two ways. Some changes use a system color change notification or an accessibility option change notification. Others invoke the viewDidChangeEffectiveAppearance method on NSView instances. To ensure that this class has the current data, the implementation of this NSView method should provide the NSAppearance object to the native function VAppearances_updateAppearance(NSAppearance *).
AppKit uses instances of NSAppearance in a tricky way. At any one time, there is a current NSAppearance object for each of the standard appearance names. However, at various times, new instances are created that replace the previous instances. This trickery is not important to Java, as Java identifies appearances by their standard names. The current NSAppearance is determined as needed using the name.
-
-
Nested Classes Modifier and Type Class and Description 
AppearanceChangeEvent 
A change event that identifies a newly available appearance.
-