Class DpiUtil

java.lang.Object
com._1c.g5.v8.dt.common.ui.utils.DpiUtil

public class DpiUtil extends Object
Represents a display scaling methods.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The current DPI.
    static final int
    The default DPI for current OS.
    static final float
    The scale value.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    adapt(int size)
    Adapts the specified size on display scale.
    static org.eclipse.swt.graphics.Point
    adapt(org.eclipse.swt.graphics.Point point)
    Adapts the point on display scale.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DPI_DEFAULT

      public static final int DPI_DEFAULT
      The default DPI for current OS.
    • DPI_CURRENT

      public static final int DPI_CURRENT
      The current DPI.
    • DPI_SCALE

      public static final float DPI_SCALE
      The scale value.
  • Method Details

    • adapt

      public static int adapt(int size)
      Adapts the specified size on display scale.
      Parameters:
      size - the size.
      Returns:
      new size.
    • adapt

      public static org.eclipse.swt.graphics.Point adapt(org.eclipse.swt.graphics.Point point)
      Adapts the point on display scale.
      Parameters:
      size - the point, can not be null.
      Returns:
      new point.