Package adams.doc.xml
Class AbstractComplexTag
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- adams.doc.xml.AbstractTag
-
- adams.doc.xml.AbstractComplexTag
-
- All Implemented Interfaces:
Serializable
,Cloneable
,MutableTreeNode
,TreeNode
- Direct Known Subclasses:
Article
,Book
,Chapter
,DefaultComplexTag
,Head
,Html
,InformalTable
,ItemizedList
,ListItem
,OrderedList
,OrderedList
,Part
,Section
,Table
,UnorderedList
public abstract class AbstractComplexTag extends AbstractTag
Ancestor for tags that have nested tags.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_AllowEmpty
whether to output empty tags.-
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 AbstractComplexTag(String tag)
Initializes the tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendContent(StringBuilder buffer)
Appends the content of the tag to the buffer.boolean
hasContent()
Checks whether there is any content to append.void
toXML(StringBuilder buffer)
Turns the XML tree into its string representation.-
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
-
-
-
-
Constructor Detail
-
AbstractComplexTag
public AbstractComplexTag(String tag)
Initializes the tag.- Parameters:
tag
- the name of the tag
-
-
Method Detail
-
hasContent
public boolean hasContent()
Checks whether there is any content to append.- Specified by:
hasContent
in classAbstractTag
- Returns:
- true if content available
-
appendContent
protected void appendContent(StringBuilder buffer)
Appends the content of the tag to the buffer.- Specified by:
appendContent
in classAbstractTag
- Parameters:
buffer
- the buffer to append the content to
-
toXML
public void toXML(StringBuilder buffer)
Turns the XML tree into its string representation.- Overrides:
toXML
in classAbstractTag
- Parameters:
buffer
- the buffer to append the tag to
-
-