Class MonitorAwarePoint

java.lang.Object
org.eclipse.swt.graphics.Point
org.eclipse.swt.graphics.MonitorAwarePoint
All Implemented Interfaces:
Serializable

public final class MonitorAwarePoint extends Point
Instances of this class represent Point objects along with the context of the monitor in relation to which they are placed on the display. The monitor awareness makes it easy to scale and translate the points between pixels and points.
Since:
3.129
See Also:
Restriction:
This class is not intended to be referenced by clients
  • Field Summary

    Fields inherited from class org.eclipse.swt.graphics.Point

    x, y
  • Constructor Summary

    Constructors
    Constructor
    Description
    MonitorAwarePoint(int x, int y, Monitor monitor)
    Constructs a new MonitorAwarePoint
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
    Returns the monitor with whose context the instance is created.
    int
    Returns an integer hash code for the receiver.

    Methods inherited from class org.eclipse.swt.graphics.Point

    toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MonitorAwarePoint

      public MonitorAwarePoint(int x, int y, Monitor monitor)
      Constructs a new MonitorAwarePoint
      Parameters:
      x - the x coordinate of the point
      y - the y coordinate of the point
      monitor - the monitor with whose context the point is created
  • Method Details

    • getMonitor

      public Monitor getMonitor()
      Returns the monitor with whose context the instance is created.
      Returns:
      the monitor with whose context the instance is created
    • equals

      public boolean equals(Object object)
      Description copied from class: Point
      Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
      Overrides:
      equals in class Point
      Parameters:
      object - the object to compare with this object
      Returns:
      true if the object is the same as this object and false otherwise
      See Also:
    • hashCode

      public int hashCode()
      Description copied from class: Point
      Returns an integer hash code for the receiver. Any two objects that return true when passed to equals must return the same value for this method.
      Overrides:
      hashCode in class Point
      Returns:
      the receiver's hash
      See Also: