Class VAppearances
- Object
-
- VAppearances
-
public class VAppearances extends ObjectThis class keeps track of macOS appearances and their attributes. The attributes of an appearance of interest to Java applications are the values of system colors.
On macOS 10.14, there are four standard appearances. Previously, there was just one. The standard appearances are identified using standard names.
The values of system colors depends upon the selected appearance. Some system colors also depend on the selected accent color, the selected highlight color, and whether the increase contrast accessibility option is enabled. This class takes a snapshot of the system colors and makes the colors available in a
VAppearance
object. When the accent color, highlight color, or increase contrast option is changed, a new snapshot of the system colors is created and a new VAppearance object is created containing the new colors.AppKit applications are notified of changes to system colors in two ways. Some changes use a system color 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 the appearance that has changed.
-