Package org.eclipse.swt.graphics
Class MonitorAwareRectangle
java.lang.Object
org.eclipse.swt.graphics.Rectangle
org.eclipse.swt.graphics.MonitorAwareRectangle
- All Implemented Interfaces:
Serializable
Instances of this class represent
Rectangle
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 rectangles between pixels and points.- Since:
- 3.129
- See Also:
- Restriction:
- This class is not intended to be referenced by clients
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMonitorAwareRectangle
(int x, int y, int width, int height, Monitor monitor) Constructs a new MonitorAwareRectangle -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
hashCode()
Returns an integer hash code for the receiver.Methods inherited from class org.eclipse.swt.graphics.Rectangle
add, contains, contains, intersect, intersection, intersects, intersects, isEmpty, toString, union
-
Constructor Details
-
MonitorAwareRectangle
Constructs a new MonitorAwareRectangle- Parameters:
x
- the x coordinate of the top left corner of the rectangley
- the y coordinate of the top left corner of the rectanglewidth
- the width of the rectangleheight
- the height of the rectanglemonitor
- the monitor with whose context the rectangle is created
-
-
Method Details
-
getMonitor
Returns the monitor with whose context the instance is created.- Returns:
- the monitor with whose context the instance is created
-
equals
Description copied from class:Rectangle
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. -
hashCode
public int hashCode()Description copied from class:Rectangle
Returns an integer hash code for the receiver. Any two objects that returntrue
when passed toequals
must return the same value for this method.
-