Class Table

java.lang.Object
com.independentsoft.office.odf.Table
All Implemented Interfaces:
ICellContent, IContentElement, IIndexContent, ITextContent, IHeaderFooterContent

public class Table extends Object implements ITextContent, IHeaderFooterContent
Represents the root element for the table.
  • Constructor Details

    • Table

      public Table()
      Initializes a new instance of the Table class.
    • Table

      public Table(String name)
      Initializes a new instance of the Table class.
      Parameters:
      name - the name
    • Table

      public Table(InternalXMLStreamReader reader) throws XMLStreamException
      Instantiates a new table.
      Parameters:
      reader - the reader
      Throws:
      XMLStreamException - the xML stream exception
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Parameters:
      parent - the new parent
    • clone

      public Table clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface ICellContent
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IHeaderFooterContent
      Specified by:
      clone in interface IIndexContent
      Specified by:
      clone in interface ITextContent
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Table object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getHeaderRows

      public List<Row> getHeaderRows()
      Contains collection of header rows in the table.
      Returns:
      the header rows
    • getTableRows

      public List<Row> getTableRows()
      Contains collection of table rows in the table.
      Returns:
      the table rows
    • getRows

      public List<Row> getRows()
      Contains collection of rows in the table.
      Returns:
      the rows
    • getHeaderColumns

      public List<Column> getHeaderColumns()
      Contains collection of header columns in the table.
      Returns:
      the header columns
    • getTableColumns

      public List<Column> getTableColumns()
      Contains collection of table columns in the table.
      Returns:
      the table columns
    • getColumns

      public List<Column> getColumns()
      Contains collection of columns in the table.
      Returns:
      the columns
    • getForms

      public OfficeForms getForms()
      Gets the container for form elements.
      Returns:
      the forms
    • setForms

      public void setForms(OfficeForms forms)
      Sets the container for form elements.
      Parameters:
      forms - the new forms
    • getScenario

      public Scenario getScenario()
      Gets the scenario for display on the table.
      Returns:
      the scenario
    • setScenario

      public void setScenario(Scenario scenario)
      Sets the scenario for display on the table.
      Parameters:
      scenario - the new scenario
    • getName

      public String getName()
      Gets the name of the table.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name of the table.
      Parameters:
      name - the new name
    • getStyle

      public String getStyle()
      Gets the style.
      Returns:
      the style
    • setStyle

      public void setStyle(String style)
      Sets the style.
      Parameters:
      style - the new style
    • getPrintRanges

      public String getPrintRanges()
      Gets the print ranges of the table.
      Returns:
      the prints the ranges
    • setPrintRanges

      public void setPrintRanges(String printRanges)
      Sets the print ranges of the table.
      Parameters:
      printRanges - the new prints the ranges
    • isProtected

      public boolean isProtected()
      Specifies whether the table is protected from editing.
      Returns:
      true, if is protected
    • setProtected

      public void setProtected(boolean isProtected)
      Specifies whether the table is protected from editing.
      Parameters:
      isProtected - the new protected
    • isPrintable

      public boolean isPrintable()
      Specifies if the table will be printed.
      Returns:
      true, if is printable
    • setPrintable

      public void setPrintable(boolean isPrintable)
      Specifies if the table will be printed.
      Parameters:
      isPrintable - the new printable
    • isSubtable

      public boolean isSubtable()
      Specifies if a nested table is a subtable.
      Returns:
      true, if is subtable
    • setSubtable

      public void setSubtable(boolean isSubtable)
      Specifies if a nested table is a subtable.
      Parameters:
      isSubtable - the new subtable
    • get

      public Cell get(int column, int row)
      Gets the.
      Parameters:
      column - the column
      row - the row
      Returns:
      the cell
    • set

      public void set(int column, int row, Cell cell)
      Sets the.
      Parameters:
      column - the column
      row - the row
      cell - the cell
    • get

      public Cell get(String column, int row)
      Gets the.
      Parameters:
      column - the column
      row - the row
      Returns:
      the cell
    • set

      public void set(String column, int row, Cell cell)
      Sets the.
      Parameters:
      column - the column
      row - the row
      cell - the cell
    • get

      public Cell get(String position)
      Gets the.
      Parameters:
      position - the position
      Returns:
      the cell
    • set

      public void set(String position, Cell cell)
      Sets the.
      Parameters:
      position - the position
      cell - the cell
    • get

      public Cell get(CellPosition position)
      Gets the.
      Parameters:
      position - the position
      Returns:
      the cell
    • set

      public void set(CellPosition position, Cell cell)
      Sets the.
      Parameters:
      position - the position
      cell - the cell
    • getShapes

      public List<Shape> getShapes()
      Contains all the elements that represent graphic shapes that are anchored on the table where this element occurs.
      Returns:
      the shapes