Class TextDocumentPart

java.lang.Object
com.pnfsoftware.jeb.core.output.text.impl.TextDocumentPart
All Implemented Interfaces:
ITextDocumentPart

public class TextDocumentPart extends Object implements ITextDocumentPart
A simple implementation for a text document part.
  • Field Details

    • EMPTY

      public static final TextDocumentPart EMPTY
      An empty part with an empty line and an anchor pointing to that line
  • Constructor Details

    • TextDocumentPart

      public TextDocumentPart(List<ILine> lines, List<IAnchor> anchors)
      Create a new part with the given lines and anchors.
      Parameters:
      lines - a list of lines
      anchors - a list of anchors
  • Method Details

    • getLines

      public List<ILine> getLines()
      Description copied from interface: ITextDocumentPart
      Get the lines within that part. The lines may span over one or more anchors.
      Specified by:
      getLines in interface ITextDocumentPart
      Returns:
      the list of lines
    • getAnchors

      public List<IAnchor> getAnchors()
      Description copied from interface: ITextDocumentPart
      Get the anchors within that part. The last anchor object may be used to specify the first anchor id of the next, contiguous part. It is especially useful in cases where a line spans multiple anchor ids.
      Specified by:
      getAnchors in interface ITextDocumentPart
      Returns:
      the list of anchors