Enum Class AutoscalingMode

java.lang.Object
java.lang.Enum<AutoscalingMode>
org.eclipse.swt.graphics.AutoscalingMode
All Implemented Interfaces:
Serializable, Comparable<AutoscalingMode>, Constable

public enum AutoscalingMode extends Enum<AutoscalingMode>
Defines the autoscaling behavior used when rendering or computing layout for controls that support DPI‑aware scaling.

This mode determines whether SWT takes care of the scaling of widgets with respect to the zoom level of the monitor.

  • ENABLED – Autoscaling is explicitly enabled. Values (such as coordinates, dimensions, or layout metrics) will be adjusted according to the effective scaling factor.
  • DISABLED – Autoscaling is explicitly disabled. Values will be used as‑is without applying any scaling transformations.
  • DISABLED_INHERITED – Autoscaling is disabled for this control and this is inherited by its children. Child controls will also be initialized with DISABLED_INHERITED AutoscalingMode.
Since:
3.133
  • Enum Constant Details

  • Method Details

    • values

      public static AutoscalingMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AutoscalingMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null