public final class Bounds extends Object implements IRenderingElement
Modifier and Type | Field and Description |
---|---|
double |
maxX
Maximum x/y coordinates.
|
double |
maxY
Maximum x/y coordinates.
|
double |
minX
Minimum x/y coordinates.
|
double |
minY
Minimum x/y coordinates.
|
Constructor and Description |
---|
Bounds()
An empty bounding box.
|
Bounds(double x1,
double y1,
double x2,
double y2)
Specify the min/max coordinates of the bounding box.
|
Bounds(IRenderingElement element)
An bounding box around the specified element.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IRenderingVisitor visitor)
Converts this
TextElement into widget specific objects. |
void |
add(Bounds bounds)
Add one bounds to another.
|
void |
add(double x,
double y)
Ensure the point x,y is included in the bounding box.
|
void |
add(IRenderingElement element)
Add the specified element bounds.
|
double |
height()
Specifies the height of the bounding box.
|
boolean |
isEmpty()
The bounds are empty and contain no elements.
|
IRenderingElement |
root()
Access the root rendering element, it contains all
elements added to the bounds so far.
|
String |
toString() |
double |
width()
Specifies the width of the bounding box.
|
public double minX
public double minY
public double maxX
public double maxY
public Bounds(double x1, double y1, double x2, double y2)
x1
- min x coordinatey1
- min y coordinatex2
- max x coordinatey2
- max y coordinatepublic Bounds()
public Bounds(IRenderingElement element)
public void add(IRenderingElement element)
public void add(double x, double y)
x
- x-coordinatey
- y-coordinatepublic void add(Bounds bounds)
bounds
- other boundspublic IRenderingElement root()
public final double width()
public final double height()
public final boolean isEmpty()
public void accept(IRenderingVisitor visitor)
TextElement
into widget specific objects.accept
in interface IRenderingElement
visitor
- Toolkit specific widget factory.Copyright © 2021. All rights reserved.