SMACS

smacs.xngr.browser.viewer
Class XmlElementNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended bysmacs.xngr.browser.viewer.XmlElementNode
All Implemented Interfaces:
Cloneable, MutableTreeNode, Serializable, TreeNode
Direct Known Subclasses:
XmlCommentNode

public class XmlElementNode
extends DefaultMutableTreeNode

The node for the XML tree, containing an XML element.

Author:
Edwin Dankert
See Also:
Serialized Form

Nested Class Summary
 class XmlElementNode.AttributeName
           
 class XmlElementNode.AttributePrefix
           
 class XmlElementNode.AttributeValue
           
 class XmlElementNode.CommentText
           
 class XmlElementNode.ElementName
           
 class XmlElementNode.ElementPrefix
           
 class XmlElementNode.ElementValue
           
 class XmlElementNode.Line
           
 class XmlElementNode.NamespacePrefix
           
 class XmlElementNode.NamespaceURI
           
 class XmlElementNode.StyledElement
           
 
Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
XmlElementNode(Viewer viewer)
          Constructs the the XML element node.
XmlElementNode(Viewer viewer, ExchangerElement element)
          Constructs the node for the XML element.
XmlElementNode(Viewer viewer, ExchangerElement element, boolean end)
          Constructs the the XML element node.
 
Method Summary
 ExchangerElement getElement()
          Constructs the node for the XML element.
 XmlElementNode.Line[] getLines()
          Returns the formatted lines for this element.
 Viewer getViewer()
          Returns the viewer.
 boolean isEndTag()
           
protected  XmlElementNode.Line parseComment(Vector lines, XmlElementNode.Line current, Comment comment)
           
protected  XmlElementNode.Line parseCommentContent(Vector lines, XmlElementNode.Line current, String text)
           
protected  XmlElementNode.Line parseContent(Vector lines, XmlElementNode.Line current, String text)
          Create a styled version of the element content.
protected  XmlElementNode.Line parseElement(Vector lines, XmlElementNode.Line current, ExchangerElement elem)
           
protected  XmlElementNode.Line parseEndTag(Vector lines, XmlElementNode.Line current, Element elem)
          Create a styled version of the end-tag.
protected  XmlElementNode.Line parseMixedElement(Vector lines, XmlElementNode.Line current, ExchangerElement elem)
          Elements parsed here can be both mixed and normal but then contained in a mixed element
protected  XmlElementNode.Line parseStartTag(Vector lines, XmlElementNode.Line current, Element elem)
          Create a styled version of the start-tag.
 void update()
           
 
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, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlElementNode

public XmlElementNode(Viewer viewer,
                      ExchangerElement element)
Constructs the node for the XML element.


XmlElementNode

public XmlElementNode(Viewer viewer,
                      ExchangerElement element,
                      boolean end)
Constructs the the XML element node.


XmlElementNode

public XmlElementNode(Viewer viewer)
Constructs the the XML element node.

Method Detail

isEndTag

public boolean isEndTag()

update

public void update()

getLines

public XmlElementNode.Line[] getLines()
Returns the formatted lines for this element.


getViewer

public Viewer getViewer()
Returns the viewer.


getElement

public ExchangerElement getElement()
Constructs the node for the XML element.


parseElement

protected XmlElementNode.Line parseElement(Vector lines,
                                           XmlElementNode.Line current,
                                           ExchangerElement elem)

parseMixedElement

protected XmlElementNode.Line parseMixedElement(Vector lines,
                                                XmlElementNode.Line current,
                                                ExchangerElement elem)
Elements parsed here can be both mixed and normal but then contained in a mixed element


parseComment

protected XmlElementNode.Line parseComment(Vector lines,
                                           XmlElementNode.Line current,
                                           Comment comment)

parseStartTag

protected XmlElementNode.Line parseStartTag(Vector lines,
                                            XmlElementNode.Line current,
                                            Element elem)
Create a styled version of the start-tag.


parseContent

protected XmlElementNode.Line parseContent(Vector lines,
                                           XmlElementNode.Line current,
                                           String text)
Create a styled version of the element content.


parseCommentContent

protected XmlElementNode.Line parseCommentContent(Vector lines,
                                                  XmlElementNode.Line current,
                                                  String text)

parseEndTag

protected XmlElementNode.Line parseEndTag(Vector lines,
                                          XmlElementNode.Line current,
                                          Element elem)
Create a styled version of the end-tag.


SMACS