java.lang.Object
eu.svjatoslav.sixth.e3d.gui.textEditorComponent.Page

public class Page extends Object
A page in a text editor.
  • Field Details

  • Constructor Details

    • Page

      public Page()
  • Method Details

    • ensureMaxTextLine

      public void ensureMaxTextLine(int row)
    • getChar

      public char getChar(int row, int column)
      Returns the character at the specified location. If the location is out of bounds, returns a space.
      Returns:
      The character at the specified location.
    • getLine

      public TextLine getLine(int row)
      Returns the specified line.
      Parameters:
      row - The line number.
      Returns:
      The line.
    • getLineLength

      public int getLineLength(int row)
      Returns the length of the specified line.
      Parameters:
      row - The line number.
      Returns:
      The length of the line.
    • getLinesCount

      public int getLinesCount()
      Returns the number of lines in the page.
      Returns:
      The number of lines in the page.
    • getText

      public String getText()
      Returns the text of the page.
      Returns:
      The text of the page.
    • insertCharacter

      public void insertCharacter(int row, int col, char value)
    • insertLine

      public void insertLine(int row, TextLine textLine)
    • removeCharacter

      public void removeCharacter(int row, int col)
      Removes the specified character from the page.
      Parameters:
      row - The line number.
      col - The character number.
    • removeLine

      public void removeLine(int row)
      Removes the specified line from the page.
      Parameters:
      row - The line number.