Package com.teamdev.jxbrowser.ui
Interface Rect
public interface Rect
A rectangle described by the location and dimensions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Rect
empty()
Returns an emptyRect
with empty origin and size.default int
height()
Returns the rectangle vertical dimension.static Rect
of
(int width, int height) Returns theRect
instance for the givenwidth
andheight
values.static Rect
of
(int x, int y, int width, int height) Returns theRect
instance for the givenx
,y
,width
, andheight
values.static Rect
Returns theRect
instance for the givenorigin
andsize
values.static Rect
Returns theRect
instance for the empty origin and the givensize
value.default Point
origin()
Returns the upper-left corner of the rectangle.default Size
size()
Returns the rectangle dimensions.default int
width()
Returns the rectangle horizontal dimension.default int
x()
Returns the horizontal coordinate of the upper-left corner of the rectangle.default int
y()
Returns the vertical coordinate of the upper-left corner of the rectangle.
-
Method Details
-
empty
Returns an emptyRect
with empty origin and size. -
of
Returns theRect
instance for the givenwidth
andheight
values.- Throws:
IllegalArgumentException
- whenwidth
orheight
is negative
-
of
Returns theRect
instance for the givenx
,y
,width
, andheight
values.- Throws:
IllegalArgumentException
- whenwidth
orheight
is negative
-
of
Returns theRect
instance for the empty origin and the givensize
value. -
of
Returns theRect
instance for the givenorigin
andsize
values. -
origin
Returns the upper-left corner of the rectangle. -
x
default int x()Returns the horizontal coordinate of the upper-left corner of the rectangle. -
y
default int y()Returns the vertical coordinate of the upper-left corner of the rectangle. -
width
default int width()Returns the rectangle horizontal dimension. -
height
default int height()Returns the rectangle vertical dimension. -
size
Returns the rectangle dimensions.
-