Interface Display
- All Known Implementing Classes:
AbstractDisplay, UnixDisplay
Display refers to the information regarding a video source and monitor identified by the EDID standard.
getDisplayInfo() returns a DisplayInfo exposing the display's decoded attributes — manufacturer ID,
product ID, serial number, physical dimensions, preferred resolution, model name, and the raw (or synthesized) EDID
byte array.
Example: extracting monitor manufacturer and dimensions:
for (Display display : hal.getDisplays()) {
DisplayInfo info = display.getDisplayInfo();
System.out.println("Manufacturer: " + info.getManufacturerID());
System.out.println("Product ID: " + info.getProductID());
System.out.printf("Size: %d cm x %d cm%n", info.getHcm(), info.getVcm());
}
For displays that report their attributes without providing an EDID (such as a built-in macOS Retina panel),
DisplayInfo.isEdidSynthetic() returns true and DisplayInfo.getEdid() returns an EDID
synthesized from those attributes.- See Also:
-
Method Summary
-
Method Details
-
getEdid
Deprecated.As of 7.4.0, usegetDisplayInfo().getEdid()instead; the decoded attributes are also available directly fromDisplayInfo. Scheduled for removal in the next major release.The EDID byte array.- Returns:
- The EDID byte array, either reported by the display or, when
DisplayInfo.isEdidSynthetic()istrue, synthesized from the display's reported attributes.
-
getDisplayInfo
DisplayInfo getDisplayInfo()The decoded display information.- Returns:
- A
DisplayInfoholding the display's decoded attributes.
-
getDisplayInfo().getEdid()instead; the decoded attributes are also available directly fromDisplayInfo.