Package adams.doc.docbook
Class Section
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- adams.doc.xml.AbstractTag
-
- adams.doc.xml.AbstractComplexTag
-
- adams.doc.docbook.Section
-
- All Implemented Interfaces:
Serializable
,Cloneable
,MutableTreeNode
,TreeNode
public class Section extends AbstractComplexTag
Represents the "section" tag.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doValidate()
Hook method for validating/fixing the XML tree.protected void
removeParagraphs(boolean onlyEmpty)
Removes "para" elements.void
setContent(String content)
Sets the content that gets enclosed in "para" tags.-
Methods inherited from class adams.doc.xml.AbstractComplexTag
appendContent, hasContent, toXML
-
Methods inherited from class adams.doc.xml.AbstractTag
appendEndTag, appendStartTag, doInsert, 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
-
Section
public Section()
Initializes the tag.
-
Section
public Section(String title)
Initializes the tag.- Parameters:
title
- the title of this section
-
-
Method Detail
-
removeParagraphs
protected void removeParagraphs(boolean onlyEmpty)
Removes "para" elements.- Parameters:
onlyEmpty
- whether to remove only empty paragraphs
-
setContent
public void setContent(String content)
Sets the content that gets enclosed in "para" tags. Lines are automatically split at line feeds and added as separate "para" tags.- Parameters:
content
- the content to add
-
doValidate
protected void doValidate()
Hook method for validating/fixing the XML tree.
Inserts a dummy paragraph if no nested section paragraphs available.- Overrides:
doValidate
in classAbstractTag
-
-