DefaultDocumentElement Class
- public class DefaultDocumentElement
extends DefaultTreeElement
implements IDocumentElement
This class provides a default implementation of the IDocumentElement interface. It simply
stores an underlying IDocument that it returns
-
Hierarchy
-
Object
DefaultElement
DefaultTreeElement
DefaultDocumentElement
-
All Implemented Interfaces
-
IDocumentElement
, IElement
, ITreeElement
-
Direct Known Subclasses
-
DefaultSourceElement
public void |
-
addChild (ITreeElement child)
- This implementation calls the parent method then sets the document on
the child element to match the current element
|
public IDocument |
-
getDocument ()
- Returns the document with which this element is associated or contained within
|
public void |
-
setDocument (IDocument document)
- Sets the document to which this element belongs.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDocumentElement
public DefaultDocumentElement()
- Empty constructor
addChild(ITreeElement) Method
public void addChild(ITreeElement
child)
This implementation calls the parent method then sets the document on
the child element to match the current element
-
Overrides
-
DefaultTreeElement.addChild(ITreeElement)
Parameters
-
child
- node to add as a child
getDocument() Method
public IDocument
getDocument()
Returns the document with which this element is associated or contained within
Returns
- document object for this element
setDocument(IDocument) Method
public void setDocument(IDocument
document)
Sets the document to which this element belongs. This will also enumerate the children and
set the document for them.
Parameters
-
document
- The document that owns this element