Package limn.backend

Interface Display


public interface Display
A monitor/screen, normalized so every part of the toolkit reads display information the same way instead of each class poking at the platform: its identity (id()/name()), the mode currently set (currentResolution()), all supported modes (availableResolutions()), the physical bounds(), the usable workArea() (minus taskbar/dock), and the DPI contentScale().

Enumerate displays through Backend.displays() / Backend.primaryDisplay(); a window reports the display it currently sits on via NativeWindow.display(). Values are read live from the platform, so they reflect resolution/monitor changes. UI-thread only.

  • Method Details

    • id

      String id()
      Returns:
      a stable-within-session identifier (e.g. "display-0").
    • name

      String name()
      Returns:
      a human-readable name (e.g. "Built-in Retina Display").
    • isPrimary

      boolean isPrimary()
      Returns:
      whether this is the primary display.
    • currentResolution

      Resolution currentResolution()
      Returns:
      the mode currently set on this display.
    • availableResolutions

      List<Resolution> availableResolutions()
      Returns:
      every distinct mode this display supports.
    • bounds

      ScreenRect bounds()
      Returns:
      the full monitor rectangle in screen coordinates.
    • workArea

      ScreenRect workArea()
      Returns:
      the usable area (monitor minus OS chrome) in screen coordinates.
    • contentScale

      float contentScale()
      Returns:
      the monitor's content (DPI) scale: 1.0, 1.25, 1.5, 2.0…