Package org.eclipse.swt.graphics
Class Rectangle.WithMonitor
java.lang.Object
org.eclipse.swt.graphics.Rectangle
org.eclipse.swt.graphics.Rectangle.OfFloat
org.eclipse.swt.graphics.Rectangle.WithMonitor
- All Implemented Interfaces:
Serializable
,Cloneable
- Enclosing class:
Rectangle
Instances of this class represent
Rectangle.OfFloat
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.131
- See Also:
- Restriction:
- This class is not intended to be referenced by clients
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.swt.graphics.Rectangle
Rectangle.OfFloat, Rectangle.WithMonitor
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionWithMonitor
(int x, int y, int width, int height, Monitor monitor) Constructs a new Rectangle.WithMonitor -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of thisRectangle
.Returns the monitor with whose context the instance is created.Methods inherited from class org.eclipse.swt.graphics.Rectangle.OfFloat
getHeight, getWidth, getX, getY, setHeight, setWidth, setX, setY
Methods inherited from class org.eclipse.swt.graphics.Rectangle
add, contains, contains, equals, hashCode, intersect, intersection, intersects, intersects, isEmpty, of, toString, union
-
Constructor Details
-
WithMonitor
Constructs a new Rectangle.WithMonitor- 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
-
clone
Description copied from class:Rectangle
Creates and returns a copy of thisRectangle
.This method performs a shallow copy of the rectangle's fields:
x
,y
,width
, andheight
. It does not copy any subclass-specific fields, so subclasses should override this method if additional fields exist.
-