Package adams.doc.docbook
Class InformalTable
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- adams.doc.xml.AbstractTag
-
- adams.doc.xml.AbstractComplexTag
-
- adams.doc.docbook.InformalTable
-
- All Implemented Interfaces:
Serializable
,Cloneable
,MutableTreeNode
,TreeNode
public class InformalTable extends AbstractComplexTag
Represents the "informaltable" tag.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractComplexTag
m_Body
the table body.protected AbstractComplexTag
m_Head
the table head.protected int
m_NumCols
the number of columns in the table.-
Fields inherited from class adams.doc.xml.AbstractComplexTag
m_AllowEmpty
-
Fields inherited from class adams.doc.xml.AbstractTag
m_Attributes
-
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
-
Constructor Summary
Constructors Constructor Description InformalTable(int numCols)
Initializes the tag.InformalTable(AbstractTag[] cells)
Initializes the tag.InformalTable(String[] cells)
Initializes the tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractComplexTag
addRow(AbstractComplexTag parent, AbstractTag[] cells)
Adds the row to the specified parent.protected AbstractComplexTag
addRow(AbstractComplexTag parent, String[] cells)
Adds the row to the specified parent.AbstractComplexTag
addRow(AbstractTag[] cells)
Adds the row to the body.AbstractComplexTag
addRow(String[] cells)
Adds the row to the body.AbstractComplexTag
getBody()
Returns the body element, which contains the row elements.AbstractComplexTag
getHead()
Returns the head element, which contains the row elements.int
getNumCols()
Returns the number of columns in the table.boolean
hasHead()
Checks whether a head element is available.-
Methods inherited from class adams.doc.xml.AbstractComplexTag
appendContent, hasContent, toXML
-
Methods inherited from class adams.doc.xml.AbstractTag
appendEndTag, appendStartTag, doInsert, doValidate, getAttribute, getIndentation, getTag, hasAttribute, insert, isValidChild, postInsert, preInsert, removeAttribute, setAttribute, toEntities, validate
-
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
-
-
-
-
Field Detail
-
m_Head
protected AbstractComplexTag m_Head
the table head.
-
m_Body
protected AbstractComplexTag m_Body
the table body.
-
m_NumCols
protected int m_NumCols
the number of columns in the table.
-
-
Constructor Detail
-
InformalTable
public InformalTable(int numCols)
Initializes the tag.- Parameters:
numCols
- the number of columns in the table
-
InformalTable
public InformalTable(String[] cells)
Initializes the tag.- Parameters:
cells
- the cells for the table header
-
InformalTable
public InformalTable(AbstractTag[] cells)
Initializes the tag.- Parameters:
cells
- the cells for the table header
-
-
Method Detail
-
getNumCols
public int getNumCols()
Returns the number of columns in the table.- Returns:
- the number of columns
-
hasHead
public boolean hasHead()
Checks whether a head element is available.- Returns:
- true if a head is available
-
getHead
public AbstractComplexTag getHead()
Returns the head element, which contains the row elements.- Returns:
- the head element, null if no head defined
-
getBody
public AbstractComplexTag getBody()
Returns the body element, which contains the row elements.- Returns:
- the body element
-
addRow
protected AbstractComplexTag addRow(AbstractComplexTag parent, String[] cells)
Adds the row to the specified parent.- Parameters:
parent
- the parent to add the row tocells
- the cells of the row- Returns:
- the row element
-
addRow
public AbstractComplexTag addRow(String[] cells)
Adds the row to the body.- Parameters:
cells
- the cells of the row- Returns:
- the row element
-
addRow
protected AbstractComplexTag addRow(AbstractComplexTag parent, AbstractTag[] cells)
Adds the row to the specified parent.- Parameters:
parent
- the parent to add the row tocells
- the cells of the row- Returns:
- the row element
-
addRow
public AbstractComplexTag addRow(AbstractTag[] cells)
Adds the row to the body.- Parameters:
cells
- the cells of the row- Returns:
- the row element
-
-