Package eu.webtoolkit.jwt
Class WTextItem
java.lang.Object
eu.webtoolkit.jwt.WTextItem
The result of a font metrics computation.
-
Constructor Summary
ConstructorDescriptionWTextItem
(CharSequence text, double width) Constructor.WTextItem
(CharSequence text, double width, double nextWidth) Constructor. -
Method Summary
-
Constructor Details
-
WTextItem
Constructor. -
WTextItem
Constructor.Calls
this(text, width, - 1)
-
-
Method Details
-
getText
Returns the measured text.If the item was measured with word breaking enabled, then the text may contain trailing whitespace that is not included in the
getWidth()
. -
getWidth
public double getWidth()Returns the measured width.Returns the text width, in device local coordinates (pixels).
-
getNextWidth
public double getNextWidth()Returns the width for a next line-break boundary.Returns the width until the next line-break boundary, or -1 if the underlying word boundary analysis does not support this.
-