WidgetBox
This page talks about WidgetBox class
WidgetBox:
The WidgetBox
class represents a box around a widget.
Fields
width
: The width of the box.height
: The height of the box.x1
,x2
,y1
,y2
: The coordinates of the box.
Constructors
WidgetBox(float x1, float y1, float x2, float y2, float scale)
: Constructs a WidgetBox object with the given coordinates and scale.WidgetBox(float x1, float y1, double height, double width, float scale)
: Constructs a WidgetBox object with the given height and width and scale.
Methods
contains(Widget widget, double x, double y)
: Returns whether the given point is inside this box.intersects(int otherX1, int otherY1, int otherX2, int otherY2)
: Returns whether this box intersects with another box defined by the given coordinates.getWidth()
: Returns the width of this box.getHeight()
: Returns the height of this box.