Extension SDK 10.1.2

oracle.ide.model
Class DefaultElement

java.lang.Object
  extended byoracle.ide.model.DefaultDisplayable
      extended byoracle.ide.model.DefaultElement
All Implemented Interfaces:
Data, Displayable, Element
Direct Known Subclasses:
DataElement, DefaultDocument, DefaultFolder

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.

See Also:
Element, oracle.ide.marshal, oracle.ide.marshal.xml

Constructor Summary
DefaultElement()
          Creates a new DefaultElement instance.
 
Method Summary
 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.
 
Methods inherited from class oracle.ide.model.DefaultDisplayable
getIcon, getLongLabel, getShortLabel, getToolTipText, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Displayable
getIcon, getLongLabel, getShortLabel, getToolTipText, toString
 

Constructor Detail

DefaultElement

public DefaultElement()
Creates a new DefaultElement instance.

Subclasses that are designed to operate as a JavaBean must supply a default constructor.

Method Detail

getData

public java.lang.Object getData()
Part of the Data interface. This implementation returns this.

Specified by:
getData in interface Data
Returns:
the data object associated with this Data instance.
See Also:
Data.getData()

mayHaveChildren

public boolean mayHaveChildren()
Part of the Element interface. This implementation always returns false.

Specified by:
mayHaveChildren in interface Element
Returns:
true if this Element may contain child Elements.
See Also:
Element.mayHaveChildren()

getChildren

public java.util.Iterator getChildren()
Part of the Element interface. This implementation always returns null.

Specified by:
getChildren in interface Element
Returns:
an Iterator over any child Elements contained by this Element. If there are no children, null is returned.
See Also:
Element.getChildren()

getAttributes

public Attributes getAttributes()
Part of the Element interface. This implementation always returns ElementAttributes.DELETEABLE.

Specified by:
getAttributes in interface Element
See Also:
Element.getAttributes()

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.