Class LayoutItem
java.lang.Object
com.codename1.wordprocessing.LayoutItem
One thing drawn on a laid out page: a piece of text, a filled or stroked rectangle, a line,
a picture or the box of an embedded component. Coordinates are in points from the page's top
left corner.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal floatFor text, the y of the baseline it is drawn on.final intFor a fill or a line, its RGB color.final EmbeddedComponentFor a component, the component.static final intThe box an embedded component occupies.static final intA filled rectangle incolor.final floatThe height; for text, the height of its line.final intWhat this item is:TEXT,FILL,LINE,PICTUREorCOMPONENT.static final intA straight line from (x,y) to (x + width,y + height) incolor.final StringFor text, the id of the paragraph it belongs to, or null for generated text such as a list marker.final PictureFor a picture, the picture.static final intA picture filling the item's box.final intFor text, the offset of its first character in the paragraph's text.final TextStyleFor text, its style; otherwise null.final StringFor text, what is drawn; may be empty.static final intA piece of text:textdrawn instyleonbaseline.final floatThe width.final floatThe left edge.final floatThe top edge; for text, the top of its line. -
Method Summary
-
Field Details
-
TEXT
public static final int TEXTA piece of text:textdrawn instyleonbaseline.- See Also:
-
FILL
public static final int FILLA filled rectangle incolor.- See Also:
-
LINE
public static final int LINEA straight line from (x,y) to (x + width,y + height) incolor.- See Also:
-
PICTURE
public static final int PICTUREA picture filling the item's box.- See Also:
-
COMPONENT
public static final int COMPONENTThe box an embedded component occupies.- See Also:
-
kind
public final int kindWhat this item is:TEXT,FILL,LINE,PICTUREorCOMPONENT. -
x
public final float xThe left edge. -
y
public final float yThe top edge; for text, the top of its line. -
width
public final float widthThe width. -
height
public final float heightThe height; for text, the height of its line. -
baseline
public final float baselineFor text, the y of the baseline it is drawn on. -
text
For text, what is drawn; may be empty. -
style
For text, its style; otherwise null. -
paragraphId
For text, the id of the paragraph it belongs to, or null for generated text such as a list marker. -
start
public final int startFor text, the offset of its first character in the paragraph's text. -
picture
For a picture, the picture. -
component
For a component, the component. -
color
public final int colorFor a fill or a line, its RGB color.
-