public class DefaultElement extends DefaultDisplayable implements Element
DefaultElement is a complete, default implementation of the Element interface. This is a convenient starting point for the implementation of data classes which can be integrated with the IDE framework.
If a subclass of DefaultElement adheres to the JavaBeans API, it can also interoperate with the IDE's marshalling framework, which is used for persistence. Such a subclass can be persisted automatically (i.e. no additional persistence code needs to be written), so long as the subclass implementation follows the guidelines of the marshalling framework. For details, see the documentation for the oracle.ide.marshal package and its subpackages.
A JavaBean also has the advantage of interoperating with the property inspector. Newer IDE APIs are also being considered which leverage off the JavaBeans API, so implementing a DefaultElement subclass to follow the JavaBeans API will also result in compatibility with future features.
Element, oracle.ide.marshal, oracle.ide.marshal.xml| Constructor and Description |
|---|
DefaultElement()
Creates a new
DefaultElement instance. |
| Modifier and Type | Method and Description |
|---|---|
Attributes |
getAttributes()
Part of the
Element interface. |
java.util.Iterator |
getChildren()
Part of the
Element interface. |
java.lang.Object |
getData()
Part of the
Data interface. |
boolean |
mayHaveChildren()
Part of the
Element interface. |
getIcon, getLongLabel, getShortLabel, getToolTipText, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIcon, getLongLabel, getShortLabel, getToolTipText, toStringpublic DefaultElement()
DefaultElement instance.
Subclasses that are designed to operate as a JavaBean must supply a default constructor.
public java.lang.Object getData()
Data interface. This implementation returns this.public boolean mayHaveChildren()
Element interface. This implementation always returns false.mayHaveChildren in interface Elementtrue if this Element may contain child Elements.Element.mayHaveChildren()public java.util.Iterator getChildren()
Element interface. This implementation always returns null.getChildren in interface ElementIterator over any child Elements contained by this Element. If there are no children, null is returned.Element.getChildren()public Attributes getAttributes()
Element interface. This implementation always returns ElementAttributes.DELETEABLE.getAttributes in interface ElementElement.getAttributes()