oracle.jdeveloper.model
Class ImageNode
java.lang.Object
oracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DefaultDocument
oracle.ide.model.DefaultNode
oracle.jdeveloper.model.ImageNode
- All Implemented Interfaces:
- Category, Data, Dirtyable, Displayable, Document, Element, LazyLoadable, Locatable, Node, Subject
- Direct Known Subclasses:
- GifImageNode, JpegImageNode, PngImageNode
- public class ImageNode
- extends DefaultNode
Node
subclass for image files. This class
should be instantiated only through a subclass and not directly.
Method Summary |
void |
close()
Closes the Document and unloads any associated data. |
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this
Displayable . |
java.awt.Image |
getImage()
|
boolean |
isDirty()
True if the data in the object has been modified. |
boolean |
isNew()
Returns true if the document's data has never been
saved. |
void |
markDirty(boolean dirty)
Marks the data with the specified dirty state. |
void |
open()
Opens the Document and loads any associated data
into the appropriate data structures. |
void |
setURL(java.net.URL url)
Sets the URL associated with this DefaultNode and
recaches the DefaultNode in the NodeFactory with
the new URL so that subsequent queries for the
DefaultNode will return successfully. |
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getToolTipText, getURL, isOpen, isReadOnly, notifyObservers, refreshTimestamp, save, setOpen, setTimestampDirectly |
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 |
ImageNode
protected ImageNode()
ImageNode
protected ImageNode(java.net.URL url)
getImage
public java.awt.Image getImage()
open
public void open()
throws java.io.IOException
- 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 DefaultDocument
- Throws:
java.io.IOException
- See Also:
Document.open()
close
public void close()
throws java.io.IOException
- Description copied from interface:
Document
- Closes the
Document
and unloads any associated data.
When this method returns, the state of the Document
object should be equivalent to when the Document
object has just been instantiated but not yet opened.
- Specified by:
close
in interface Document
- Overrides:
close
in class DefaultDocument
- Throws:
java.io.IOException
- See Also:
Document.close()
isNew
public boolean isNew()
- Description copied from interface:
Document
- Returns
true
if the document's data has never been
saved.
- Specified by:
isNew
in interface Document
- Overrides:
isNew
in class DefaultDocument
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 DefaultDisplayable
- See Also:
Displayable.getIcon()
isDirty
public boolean isDirty()
- Description copied from interface:
Dirtyable
- True if the data in the object has been modified.
- Specified by:
isDirty
in interface Dirtyable
- Overrides:
isDirty
in class DefaultDocument
markDirty
public void markDirty(boolean dirty)
- Description copied from interface:
Dirtyable
- Marks the data with the specified dirty state. This
method is called
markDirty(...)
instead of
setDirty(...)
so that the JavaBeans
Introspector
will not
mistakenly identify "dirty" as a JavaBean property.
- Specified by:
markDirty
in interface Dirtyable
- Overrides:
markDirty
in class DefaultDocument
setURL
public void setURL(java.net.URL url)
- Description copied from class:
DefaultNode
- Sets the
URL
associated with this DefaultNode
and
recaches the DefaultNode
in the NodeFactory
with
the new URL
so that subsequent queries for the
DefaultNode
will return successfully.
- Specified by:
setURL
in interface Locatable
- Overrides:
setURL
in class DefaultNode
- See Also:
Locatable.setURL(URL)
,
DefaultDocument.setURL(URL)
Copyright ©1997, 2003, Oracle. All rights reserved.