Interface DisplayInfo

All Known Implementing Classes:
DisplayInfoImpl

@PublicApi @Immutable public interface DisplayInfo
Holds the human-readable information described by a display's EDID (Extended Display Identification Data), exposing the same values that EdidUtil parses from a raw EDID byte array.

For a display that reports a raw EDID, getEdid() returns those bytes and isEdidSynthetic() is false. For a display that reports its attributes without an EDID (such as a built-in macOS Retina panel), isEdidSynthetic() is true and getEdid() returns an EDID synthesized from those attributes.

A synthesized EDID is a valid 128-byte EDID (correct header and checksum) that re-parses to the same values this interface exposes, so it is interchangeable with a real EDID for EdidUtil decoding. It carries only those values, however: unlike a panel's real EDID it does not include the additional detail (chromaticity coordinates, full detailed-timing parameters, extension blocks, etc.) that was never reported.

See Also:
  • Method Details

    • getEdid

      byte[] getEdid()
      Gets the EDID byte array: the bytes reported by the display, or, when isEdidSynthetic() is true, an EDID synthesized from the display's reported attributes.
      Returns:
      A copy of the EDID byte array.
    • isEdidSynthetic

      boolean isEdidSynthetic()
      Indicates whether the EDID returned by getEdid() was synthesized from reported attributes rather than read directly from the display.
      Returns:
      true if the EDID is synthetic, false if it is the display's raw EDID.
    • getManufacturerID

      String getManufacturerID()
      Gets the manufacturer ID.
      Returns:
      The manufacturer ID.
    • getProductID

      String getProductID()
      Gets the product ID.
      Returns:
      The product ID.
    • getSerialNo

      String getSerialNo()
      Gets the serial number, the numeric ID serial number from bytes 12-15 of the EDID. This is distinct from getProductSerialNumber().
      Returns:
      The serial number.
    • getWeek

      byte getWeek()
      Gets the week of manufacture.
      Returns:
      The week of manufacture.
    • getYear

      int getYear()
      Gets the year of manufacture.
      Returns:
      The year of manufacture.
    • getVersion

      String getVersion()
      Gets the EDID version.
      Returns:
      The EDID version.
    • isDigital

      boolean isDigital()
      Tests whether the display is digital.
      Returns:
      true if the display is digital, false otherwise.
    • getHcm

      int getHcm()
      Gets the monitor width in cm.
      Returns:
      The monitor width in cm.
    • getVcm

      int getVcm()
      Gets the monitor height in cm.
      Returns:
      The monitor height in cm.
    • getPreferredResolution

      String getPreferredResolution()
      Gets the preferred resolution.
      Returns:
      The preferred resolution (e.g. "2560x1440").
    • getModel

      String getModel()
      Gets the monitor model.
      Returns:
      The monitor model.
    • getProductSerialNumber

      String getProductSerialNumber()
      Gets the display product serial number, the text of the serial-number descriptor. This is distinct from getSerialNo(), which returns the numeric ID serial number.
      Returns:
      The display product serial number, or an empty string if not available.