Package com.storedobject.office
Class ODT.Element
java.lang.Object
com.storedobject.office.ODT.Element
- Direct Known Subclasses:
ODT.Image,ODT.InputTableRow,ODT.Table,ODT.TableRow,ODT.TextElement
Represents an abstract base class for document elements. This class provides
functionalities for interacting with and manipulating elements within a document,
such as retrieving sections and tables, as well as removing an element from the output.
It acts as a foundation for more specific element types like sections and tables etc.
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionfinal ODT.TableCellgetCell()Retrieves the table cell where this element is located.final ODT.Document<?> Retrieves the document associated with this element.getName()Retrieves the name of the element.final ODT.ElementGets the parent element of this element.final ODT.TableCellGet the cell where this element is located.final ODT.TableRowGet the table row where this element is located.final ODT.SectionGet the section where this element is located.final ODT.TableGet the table where this element is located.booleanremove()Removes this element from the output.
-
Method Details
-
getName
-
remove
public boolean remove()Removes this element from the output.- Returns:
- Returns
trueunless the element was already removed.
-
getParent
Gets the parent element of this element.- Returns:
- Parent element. It is a null for top-level elements.
-
getCell
Retrieves the table cell where this element is located. It could be this element itself.- Returns:
- The current table cell if this element is a
TableCell; otherwise, returns the parent table cell. If this element is not located within a table cell, this method returns null.
-
getParentCell
Get the cell where this element is located.- Returns:
- Table cell. If it is not located in a table, this returns null.
-
getParentRow
Get the table row where this element is located.- Returns:
- Table row. If it is not located in a table, this returns null.
-
getParentTable
Get the table where this element is located.- Returns:
- Table. If it is not located in a table, this returns null.
-
getParentSection
Get the section where this element is located.- Returns:
- Section. If it is not located inside a section, this returns null.
-
getDocument
Retrieves the document associated with this element.- Returns:
- The
Document<?>instance associated with this element.
-