Class LayoutItem

java.lang.Object
com.codename1.wordprocessing.LayoutItem

public final class LayoutItem extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    final float
    For text, the y of the baseline it is drawn on.
    final int
    For a fill or a line, its RGB color.
    For a component, the component.
    static final int
    The box an embedded component occupies.
    static final int
    A filled rectangle in color.
    final float
    The height; for text, the height of its line.
    final int
    What this item is: TEXT, FILL, LINE, PICTURE or COMPONENT.
    static final int
    A straight line from (x, y) to (x + width, y + height) in color.
    final String
    For text, the id of the paragraph it belongs to, or null for generated text such as a list marker.
    final Picture
    For a picture, the picture.
    static final int
    A picture filling the item's box.
    final int
    For text, the offset of its first character in the paragraph's text.
    final TextStyle
    For text, its style; otherwise null.
    final String
    For text, what is drawn; may be empty.
    static final int
    A piece of text: text drawn in style on baseline.
    final float
    The width.
    final float
    The left edge.
    final float
    The top edge; for text, the top of its line.
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TEXT

      public static final int TEXT
      A piece of text: text drawn in style on baseline.
      See Also:
    • FILL

      public static final int FILL
      A filled rectangle in color.
      See Also:
    • LINE

      public static final int LINE
      A straight line from (x, y) to (x + width, y + height) in color.
      See Also:
    • PICTURE

      public static final int PICTURE
      A picture filling the item's box.
      See Also:
    • COMPONENT

      public static final int COMPONENT
      The box an embedded component occupies.
      See Also:
    • kind

      public final int kind
      What this item is: TEXT, FILL, LINE, PICTURE or COMPONENT.
    • x

      public final float x
      The left edge.
    • y

      public final float y
      The top edge; for text, the top of its line.
    • width

      public final float width
      The width.
    • height

      public final float height
      The height; for text, the height of its line.
    • baseline

      public final float baseline
      For text, the y of the baseline it is drawn on.
    • text

      public final String text
      For text, what is drawn; may be empty.
    • style

      public final TextStyle style
      For text, its style; otherwise null.
    • paragraphId

      public final String 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 start
      For text, the offset of its first character in the paragraph's text.
    • picture

      public final Picture picture
      For a picture, the picture.
    • component

      public final EmbeddedComponent component
      For a component, the component.
    • color

      public final int color
      For a fill or a line, its RGB color.