protected static class AbstractGuiDriver.TextMetrics
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
actual
true if the metrics is actual (not approximate). |
private int |
height
The text's height.
|
private int |
width
The text's width.
|
private int[] |
widths
The widths for this text, for each substring starting from index 0 and ending on
indices 1 to text's length - 1.
|
Constructor and Description |
---|
TextMetrics(int width,
int height)
Constructor.
|
TextMetrics(int width,
int height,
boolean actual)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Returns the text height.
|
int |
getWidth()
Returns the text width.
|
int[] |
getWidths()
Get the intermediate widths.
|
boolean |
isActual()
Returns
true if the metrics is actual (not approximate). |
void |
setWidths(int[] widths)
Set the intermediate widths.
|
private final int width
private final int height
private final boolean actual
true
if the metrics is actual (not approximate). Used only for web driver.private int[] widths
public TextMetrics(int width, int height)
width
- The text's width.height
- The text's height.public TextMetrics(int width, int height, boolean actual)
width
- The text's width.height
- The text's height.actual
- true
if the metrics is actual (not approximate). Used only for web
driver.public int[] getWidths()
public void setWidths(int[] widths)
widths
- The intermediate widths.public boolean isActual()
true
if the metrics is actual (not approximate). Used only for web
driver.public int getWidth()
public int getHeight()