oracle.jdeveloper.model
Class JavaClassNode
java.lang.Object
oracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DefaultDocument
oracle.ide.model.DefaultNode
oracle.jdeveloper.model.JavaClassNode
- All Implemented Interfaces:
- Category, Data, Dirtyable, Displayable, Document, Element, JavaNode, LazyLoadable, Locatable, Node, Subject, TextDocument
- public class JavaClassNode
- extends DefaultNode
- implements TextDocument, JavaNode
The JavaNode interface represents a Java class element in the JDeveloper
browser. A JavaNode
could be either a .class file or a .java
file; however, JDeveloper normally represents a .java file with the
JavaSourceNode
interface, which extends JavaNode
.
In addition to providing the usual Node
features, a
JavaNode
provides access to both a code-level view (through
the JOT subsystem) and a component view (through the CMT subsystem) of the
Java class.
- See Also:
JavaSourceNode
Field Summary |
static java.lang.String |
EXT
|
Method Summary |
TextBuffer |
acquireTextBuffer()
Requests the data from the Document in the format of a TextBuffer
instance so that it can be used by the code editor. |
void |
close()
Closes the Document and unloads any associated data. |
int |
getCategory()
Get the bit field identifying the different categories this
data node falls under. |
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this
Displayable . |
java.io.InputStream |
getInputStream()
Gets an InputStream that can be used to read the contents
of this object. |
void |
releaseTextBuffer()
Informs the document that the previously acquired TextBuffer instance
is no longer needed. |
void |
reopen()
|
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getToolTipText, getURL, isDirty, isNew, isOpen, isReadOnly, markDirty, notifyObservers, open, 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 |
EXT
public static final java.lang.String EXT
- See Also:
- Constant Field Values
JavaClassNode
public JavaClassNode()
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
- Returns:
- the Icon for this node instance
- See Also:
Displayable.getIcon()
getCategory
public int getCategory()
- Get the bit field identifying the different categories this
data node falls under.
- Specified by:
getCategory
in interface Category
- Overrides:
getCategory
in class DefaultNode
- Returns:
- the category types.
reopen
public void reopen()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Description copied from interface:
Document
- Gets an
InputStream
that can be used to read the contents
of this object.
- Specified by:
getInputStream
in interface Document
- Overrides:
getInputStream
in class DefaultDocument
- Throws:
java.io.IOException
- if an I/O error occurs when trying to open
the InputStream
.- See Also:
Document.getInputStream()
acquireTextBuffer
public TextBuffer acquireTextBuffer()
- Description copied from interface:
TextDocument
- Requests the data from the Document in the format of a TextBuffer
instance so that it can be used by the code editor. Note that
the acquisition and release of TextBuffer instances are reference
counted - this is to allow TextDocument implementations the
freedom to drop the use of the TextBuffer instance when it is no
longer needed and revert to a more "compressed" form of storage.
- Specified by:
acquireTextBuffer
in interface TextDocument
- Returns:
- the TextBuffer instance for accessing this Document in text form
releaseTextBuffer
public void releaseTextBuffer()
- Description copied from interface:
TextDocument
- Informs the document that the previously acquired TextBuffer instance
is no longer needed. This frees up the need for the Document to
maintain the TextBuffer instance.
- Specified by:
releaseTextBuffer
in interface TextDocument
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()
Copyright ©1997, 2003, Oracle. All rights reserved.