Extension SDK

oracle.jdeveloper.model
Class JavaClassNode

java.lang.Object
  extended byoracle.ide.model.DefaultDisplayable
      extended byoracle.ide.model.DefaultElement
          extended byoracle.ide.model.DefaultDocument
              extended byoracle.ide.model.DefaultNode
                  extended byoracle.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
           
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Fields inherited from interface oracle.ide.model.Category
UNDEFINED
 
Constructor Summary
JavaClassNode()
           
 
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.DefaultNode
equalsImpl, setURL
 
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 oracle.ide.model.DefaultElement
getAttributes, getChildren, getData, mayHaveChildren
 
Methods inherited from class oracle.ide.model.DefaultDisplayable
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.Document
getTimestamp, isNew, isReadOnly, open, save
 
Methods inherited from interface oracle.ide.model.Locatable
getURL, setURL
 
Methods inherited from interface oracle.ide.model.Element
getAttributes, getChildren, mayHaveChildren
 
Methods inherited from interface oracle.ide.model.Data
getData
 
Methods inherited from interface oracle.ide.model.Displayable
getLongLabel, getShortLabel, getToolTipText, toString
 
Methods inherited from interface oracle.ide.addin.Subject
attach, detach, notifyObservers
 
Methods inherited from interface oracle.ide.model.Dirtyable
isDirty, markDirty
 
Methods inherited from interface oracle.ide.model.LazyLoadable
isOpen
 

Field Detail

EXT

public static final java.lang.String EXT
See Also:
Constant Field Values
Constructor Detail

JavaClassNode

public JavaClassNode()
Method Detail

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()

Extension SDK

 

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