Class PlaintextDataChunk


  • public class PlaintextDataChunk
    extends Object
    A data carrier to collect and store text data for the output.
    • Constructor Detail

      • PlaintextDataChunk

        protected PlaintextDataChunk​(String text,
                                     String font,
                                     boolean bold,
                                     boolean italic,
                                     boolean underline,
                                     boolean strikethrough,
                                     int x,
                                     int y,
                                     int w)
        Creates a new text data chunk.
        Parameters:
        text - the text that should be printed
        font - the font style for the text
        underline -
        strikethrough -
        x - the column where the text starts
        y - the row of the text
        w - the number of characters of the text that should be printed.
    • Method Detail

      • isUnderline

        public boolean isUnderline()
      • isStrikethrough

        public boolean isStrikethrough()
      • getText

        public String getText()
        Gets the text stored in this chunk.
        Returns:
        the text
      • isBold

        public boolean isBold()
      • isItalic

        public boolean isItalic()
      • getFont

        public String getFont()
      • getX

        public int getX()
        The column of the text start.
        Returns:
        the column of the first character.
      • getY

        public int getY()
        Gets the row where to print the text.
        Returns:
        the row.
      • getWidth

        public int getWidth()
        Gets the width of the text, the number of character which should be printed.
        Returns:
        the number of printable characters.