Interface Element

All Known Subinterfaces:
LargeElement, TextElementArray
All Known Implementing Classes:
Anchor, Annotation, Cell, Chapter, ChapterAutoNumber, Chunk, DottedLineSeparator, Footnote, GreekList, Header, HeaderFooter, Image, ImgCCITT, ImgJBIG2, ImgRaw, ImgTemplate, ImgWMF, IncCell, Jpeg, Jpeg2000, LineSeparator, List, ListItem, MarkedObject, MarkedSection, Meta, MultiColumnText, Paragraph, PdfCell, PdfPCell, PdfPTable, PdfTable, Phrase, Rectangle, RectangleReadOnly, RomanList, Row, Section, SimpleCell, SimpleTable, Table, TableRectangle, VerticalPositionMark, ZapfDingbatsList, ZapfDingbatsNumberList

public interface Element
Interface for a text element.

Remark: I looked at the interface javax.swing.text.Element, but I decided to write my own text-classes.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A possible value for vertical alignment.
    static final int
    A possible value for vertical alignment.
    static final int
    A possible value for paragraph alignment.
    static final int
    A possible value for paragraph alignment.
    static final int
    Does the same as ALIGN_JUSTIFIED but the last line is also spread out.
    static final int
    A possible value for paragraph alignment.
    static final int
    A possible value for vertical alignment.
    static final int
    A possible value for paragraph alignment.
    static final int
    A possible value for vertical alignment.
    static final int
    A possible value for paragraph alignment.
    static final int
    This is a possible type of Element
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element .
    static final int
    A flag indicating whether 1-bits are to be interpreted as black pixels and 0-bits as white pixels,
    static final int
    A flag indicating whether the filter expects extra 0-bits before each encoded line so that the line begins on a byte boundary.
    static final int
    A flag indicating whether the filter expects the encoded data to be terminated by an end-of-block pattern, overriding the Rows parameter.
    static final int
    A flag indicating whether end-of-line bit patterns are required to be present in the encoding.
    static final int
    Pure one-dimensional encoding (Group 3, 1-D)
    static final int
    Mixed one- and two-dimensional encoding (Group 3, 2-D)
    static final int
    Pure two-dimensional encoding (Group 4)
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element .
    static final int
    This is a possible type of Element .
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element
    static final int
    This is a possible type of Element
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element .
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element .
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
    static final int
    This is a possible type of Element.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets all the chunks in this element.
    boolean
    Checks if this element is a content object.
    boolean
    Checks if this element is nestable.
    boolean
    Processes the element by adding it (or the different parts) to an ElementListener.
    Gets the content of the text element.
    int
    Gets the type of the text element.
  • Field Details

    • TITLE

      static final int TITLE
      This is a possible type of Element.
      See Also:
    • SUBJECT

      static final int SUBJECT
      This is a possible type of Element.
      See Also:
    • KEYWORDS

      static final int KEYWORDS
      This is a possible type of Element.
      See Also:
    • AUTHOR

      static final int AUTHOR
      This is a possible type of Element .
      See Also:
    • PRODUCER

      static final int PRODUCER
      This is a possible type of Element .
      See Also:
    • CREATIONDATE

      static final int CREATIONDATE
      This is a possible type of Element .
      See Also:
    • CREATOR

      static final int CREATOR
      This is a possible type of Element .
      See Also:
    • MODIFICATIONDATE

      static final int MODIFICATIONDATE
      This is a possible type of Element .
      See Also:
    • CHUNK

      static final int CHUNK
      This is a possible type of Element.
      See Also:
    • PHRASE

      static final int PHRASE
      This is a possible type of Element.
      See Also:
    • PARAGRAPH

      static final int PARAGRAPH
      This is a possible type of Element.
      See Also:
    • SECTION

      static final int SECTION
      This is a possible type of Element
      See Also:
    • LIST

      static final int LIST
      This is a possible type of Element
      See Also:
    • LISTITEM

      static final int LISTITEM
      This is a possible type of Element
      See Also:
    • CHAPTER

      static final int CHAPTER
      This is a possible type of Element
      See Also:
    • ANCHOR

      static final int ANCHOR
      This is a possible type of Element
      See Also:
    • CELL

      static final int CELL
      This is a possible type of Element.
      See Also:
    • ROW

      static final int ROW
      This is a possible type of Element.
      See Also:
    • TABLE

      static final int TABLE
      This is a possible type of Element.
      See Also:
    • PTABLE

      static final int PTABLE
      This is a possible type of Element.
      See Also:
    • ANNOTATION

      static final int ANNOTATION
      This is a possible type of Element.
      See Also:
    • RECTANGLE

      static final int RECTANGLE
      This is a possible type of Element.
      See Also:
    • JPEG

      static final int JPEG
      This is a possible type of Element.
      See Also:
    • JPEG2000

      static final int JPEG2000
      This is a possible type of Element.
      See Also:
    • IMGRAW

      static final int IMGRAW
      This is a possible type of Element.
      See Also:
    • IMGTEMPLATE

      static final int IMGTEMPLATE
      This is a possible type of Element.
      See Also:
    • JBIG2

      static final int JBIG2
      This is a possible type of Element.
      Since:
      2.1.5
      See Also:
    • MULTI_COLUMN_TEXT

      static final int MULTI_COLUMN_TEXT
      This is a possible type of Element.
      See Also:
    • MARKED

      static final int MARKED
      This is a possible type of Element.
      See Also:
    • YMARK

      static final int YMARK
      This is a possible type of Element.
      Since:
      2.1.2
      See Also:
    • FOOTNOTE

      static final int FOOTNOTE
      This is a possible type of Element.
      See Also:
    • ALIGN_UNDEFINED

      static final int ALIGN_UNDEFINED
      A possible value for paragraph alignment. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right.
      See Also:
    • ALIGN_LEFT

      static final int ALIGN_LEFT
      A possible value for paragraph alignment. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right.
      See Also:
    • ALIGN_CENTER

      static final int ALIGN_CENTER
      A possible value for paragraph alignment. This specifies that the text is aligned to the center and extra whitespace should be placed equally on the left and right.
      See Also:
    • ALIGN_RIGHT

      static final int ALIGN_RIGHT
      A possible value for paragraph alignment. This specifies that the text is aligned to the right indent and extra whitespace should be placed on the left.
      See Also:
    • ALIGN_JUSTIFIED

      static final int ALIGN_JUSTIFIED
      A possible value for paragraph alignment. This specifies that extra whitespace should be spread out through the rows of the paragraph with the text lined up with the left and right indent except on the last line which should be aligned to the left.
      See Also:
    • ALIGN_TOP

      static final int ALIGN_TOP
      A possible value for vertical alignment.
      See Also:
    • ALIGN_MIDDLE

      static final int ALIGN_MIDDLE
      A possible value for vertical alignment.
      See Also:
    • ALIGN_BOTTOM

      static final int ALIGN_BOTTOM
      A possible value for vertical alignment.
      See Also:
    • ALIGN_BASELINE

      static final int ALIGN_BASELINE
      A possible value for vertical alignment.
      See Also:
    • ALIGN_JUSTIFIED_ALL

      static final int ALIGN_JUSTIFIED_ALL
      Does the same as ALIGN_JUSTIFIED but the last line is also spread out.
      See Also:
    • CCITTG4

      static final int CCITTG4
      Pure two-dimensional encoding (Group 4)
      See Also:
    • CCITTG3_1D

      static final int CCITTG3_1D
      Pure one-dimensional encoding (Group 3, 1-D)
      See Also:
    • CCITTG3_2D

      static final int CCITTG3_2D
      Mixed one- and two-dimensional encoding (Group 3, 2-D)
      See Also:
    • CCITT_BLACKIS1

      static final int CCITT_BLACKIS1
      A flag indicating whether 1-bits are to be interpreted as black pixels and 0-bits as white pixels,
      See Also:
    • CCITT_ENCODEDBYTEALIGN

      static final int CCITT_ENCODEDBYTEALIGN
      A flag indicating whether the filter expects extra 0-bits before each encoded line so that the line begins on a byte boundary.
      See Also:
    • CCITT_ENDOFLINE

      static final int CCITT_ENDOFLINE
      A flag indicating whether end-of-line bit patterns are required to be present in the encoding.
      See Also:
    • CCITT_ENDOFBLOCK

      static final int CCITT_ENDOFBLOCK
      A flag indicating whether the filter expects the encoded data to be terminated by an end-of-block pattern, overriding the Rows parameter. The use of this flag will set the key /EndOfBlock to false.
      See Also:
  • Method Details

    • process

      boolean process(ElementListener listener)
      Processes the element by adding it (or the different parts) to an ElementListener.
      Parameters:
      listener - an ElementListener
      Returns:
      true if the element was processed successfully
    • type

      int type()
      Gets the type of the text element.
      Returns:
      a type
    • isContent

      boolean isContent()
      Checks if this element is a content object. If not, it's a metadata object.
      Returns:
      true if this is a 'content' element; false if this is a 'metadata' element
      Since:
      iText 2.0.8
    • isNestable

      boolean isNestable()
      Checks if this element is nestable.
      Returns:
      true if this element can be nested inside other elements.
      Since:
      iText 2.0.8
    • getChunks

      ArrayList<Element> getChunks()
      Gets all the chunks in this element.
      Returns:
      an ArrayList
    • toString

      String toString()
      Gets the content of the text element.
      Overrides:
      toString in class Object
      Returns:
      a type