Class TextBoxLayout
java.lang.Object
com.codename1.presentation.TextBoxLayout
The text of a shape laid out in its box: the word processing layout, where its first line starts, and how much it was shrunk to fit.
SlideRenderer paints from this, and a SlideView editing the text in place uses it to
put its editor exactly over the painted words.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DocumentLayoutThe layout, in points, of a page as wide as the box less nothing (the insets are the page margins); multiply byshrinkto get box points.final floatWhere the layout's top is in the box, in box points: the anchor's offset.final floatThe factor the text is drawn at, 1 unless the frame shrinks text to fit.final floatThe height the text uses in box points, insets included. -
Method Summary
-
Field Details
-
layout
The layout, in points, of a page as wide as the box less nothing (the insets are the page margins); multiply byshrinkto get box points. -
offsetY
public final float offsetYWhere the layout's top is in the box, in box points: the anchor's offset. -
shrink
public final float shrinkThe factor the text is drawn at, 1 unless the frame shrinks text to fit. -
usedHeight
public final float usedHeightThe height the text uses in box points, insets included.
-
-
Method Details
-
of
Lays a frame out in a box.
Parameters
-
frame: the text -
width: the box width in points -
height: the box height in points -
measurer: measures text; the painter must use the same kind
Returns
the layout
-
-