DefaultDocumentElement Class

com.bea.ide.document
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

Field Summary

   
Fields from  com.bea.ide.element.DefaultTreeElement
_parent, _vChildren
 

Constructor Summary

DefaultDocumentElement()

Empty constructor
 

Method Summary

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  com.bea.ide.element.DefaultTreeElement
children, getChild, getChildCount, getParent, removeChild
 
Methods from  com.bea.ide.element.DefaultElement
getProperty, getPropertyDescriptors, setProperty
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.document.IDocumentElement
getDocument
 
Methods from interface com.bea.ide.element.IElement
getProperty, getPropertyDescriptors, setProperty
 
Methods from interface com.bea.ide.element.ITreeElement
children, getChild, getChildCount, getParent
 

Constructor Detail

DefaultDocumentElement

public DefaultDocumentElement()
Empty constructor
 

Method Detail

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