oracle.ide.gallery
Class GalleryXMLDataNode
java.lang.Object
oracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DefaultDocument
oracle.ide.model.DefaultNode
oracle.ide.model.XMLDataNode
oracle.ide.model.XMLDataContainer
oracle.ide.gallery.GalleryXMLDataNode
- All Implemented Interfaces:
- Category, Container, Data, Dirtyable, Displayable, Document, Element, Folder, LazyLoadable, Locatable, Node, Subject
- public class GalleryXMLDataNode
- extends XMLDataContainer
XMLDataContainer
subclass for the Object Gallery.
Method Summary |
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this
Displayable . |
java.lang.String |
getShortLabel()
Returns a short label that can be displayed to the user. |
protected java.lang.String |
getXMLRootElementName()
Returns the XML root element name that is to be used when writing
out the XML file. |
protected oracle.ide.marshal.xml.Object2Dom |
newObject2Dom()
Overrides template method defined in XMLDataNode by
associating the object gallery's public ID with Object2Dom. |
void |
open()
Opens the Document and loads any associated data
into the appropriate data structures. |
Methods inherited from class oracle.ide.model.XMLDataContainer |
add, add, canAdd, canRemove, containsChild, getDataFolder, mayHaveChildren, remove, remove, removeAll, removeAll, size |
Methods inherited from class oracle.ide.model.XMLDataNode |
close, getAttributes, getCategory, getChildren, getData, getDataCastPacketDirectly, getDefaultClass, getToolTipText, markDirty, reopen, save, setData, setDataCastPacketDirectly, setNodeInfo, setURL |
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getInputStream, getLongLabel, getSubject, getTimestamp, getTimestampDirectly, getURL, isDirty, isNew, isOpen, isReadOnly, notifyObservers, refreshTimestamp, setOpen, setTimestampDirectly, setURLDirectly |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.ide.model.Data |
getData |
GALLERY_ROOT_ELEMENT_NAME
protected static final java.lang.String GALLERY_ROOT_ELEMENT_NAME
- See Also:
- Constant Field Values
GalleryXMLDataNode
public GalleryXMLDataNode()
- Default Constructor
GalleryXMLDataNode
public GalleryXMLDataNode(java.net.URL url)
- Constructor.
- Parameters:
url
- the URL
to the gallery.xml
file.
open
public void open()
- Description copied from interface:
Document
- Opens the
Document
and loads any associated data
into the appropriate data structures. If the implementation
of this method completes successfully, the LazyLoadable.isOpen()
method should then return true
.
- Specified by:
open
in interface Document
- Overrides:
open
in class XMLDataNode
- See Also:
Object2Dom
getIcon
public javax.swing.Icon getIcon()
- Description copied from interface:
Displayable
- Returns an
Icon
that can be shown in association with this
Displayable
. Typically the icon will be used in a
tree control or list control. Therefore the icon must fit
naturally within the space normally given to items within those
controls. Such icons are usually 16x16 in size or, if there is a
one-pixel transparent padding around the edge, 18x18 in size. It
is strongly recommended that icons returned by this method be
either 16x16 or 18x18 in size. If null
is returned,
the control may show a default icon, or it may show no icon,
whichever is appropriate.
- Specified by:
getIcon
in interface Displayable
- Overrides:
getIcon
in class XMLDataNode
getShortLabel
public java.lang.String getShortLabel()
- Description copied from interface:
Displayable
- Returns a short label that can be displayed to the user.
Generally, the value of the returned
String
is considered
translatable and should therefore be placed in an appropriate
resource file. When possible, the returned label should be
reasonably short enough to show in the navigator or explorer
windows but long enough to clearly identify and distinguish the
Displayable
.
- Specified by:
getShortLabel
in interface Displayable
- Overrides:
getShortLabel
in class DefaultDocument
- See Also:
Displayable.getShortLabel()
getXMLRootElementName
protected java.lang.String getXMLRootElementName()
- Description copied from class:
XMLDataNode
- Returns the XML root element name that is to be used when writing
out the XML file. If a subclass needs to use a different XML root
element name than the default value provided here, then the
subclass sould override this method to return its XML root element
name. The
XMLDataNode.save(boolean)
method will use the subclass's
return value for this method when writing out the XML file.
When this method is overridden in a subclass, it is generally also
desirable to have the IDE be able to recognize the XML root element
name so that the IDE will instantiate the correct Node
class for the XML file. Refer to the javadoc for
XMLRecognizer
for details.
- Overrides:
getXMLRootElementName
in class XMLDataNode
- See Also:
XMLRecognizer
newObject2Dom
protected oracle.ide.marshal.xml.Object2Dom newObject2Dom()
- Overrides template method defined in
XMLDataNode
by
associating the object gallery's public ID with Object2Dom.
- Overrides:
newObject2Dom
in class XMLDataNode
Copyright © 1997, 2004, Oracle. All rights reserved.