Extension SDK 10.1.2

oracle.ide.inspector
Class DefaultInspectable

java.lang.Object
  extended byoracle.ide.inspector.DefaultInspectable
All Implemented Interfaces:
Inspectable
Direct Known Subclasses:
JProjectInspectable

public class DefaultInspectable
extends java.lang.Object
implements Inspectable

DefaultInspectable is a default implementation of the Inspectable interface. For most data types this implementation should be sufficient and will be used to describe instances of any data types which implenent SupportsInspection but for which no explicit Inspectable has been registered with the InspectorFactory.

The target of this implementation is considered to be the data associated with the first element of the selection found in the Context provided (i.e. Context.getSelection()[0].getData()). In the event of an empty selection, the target is considered to be the data associated with the Document of the Context (i.e. Context.getDocument().getData()).

The PropertyModel of this implementation is an instance of DefaultModel constructed upon the target.

The Customizer of this implementation is the Customizer, if any, provided by the BeanInfo, if found, for the Class of the target.

No additional tab pages are provided by this implementation.


Field Summary
protected  oracle.bali.inspector.PropertyModel propertyModel
          The model describing the target.
protected  java.lang.Object target
          The target being described.
 
Constructor Summary
DefaultInspectable()
          Constructor.
 
Method Summary
 java.awt.Component[] getAdditionalTabPages()
          Get any additional tab pages applicable to the target.
 java.beans.Customizer getCustomizer()
          Get any Customizer applicable to the target object.
 oracle.bali.inspector.PropertyModel getPropertyModel()
          Get a PropertyModel describing the target object.
 java.lang.Object getTarget()
          Get the target object.
 void setContext(Context context)
          Initialize from the selection of the given Context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected java.lang.Object target
The target being described.


propertyModel

protected oracle.bali.inspector.PropertyModel propertyModel
The model describing the target.

Constructor Detail

DefaultInspectable

public DefaultInspectable()
Constructor.

Method Detail

setContext

public void setContext(Context context)
Initialize from the selection of the given Context.

Specified by:
setContext in interface Inspectable
Parameters:
context - the Context from which to initialize.

getTarget

public java.lang.Object getTarget()
Get the target object.

Specified by:
getTarget in interface Inspectable
Returns:
the target object.

getPropertyModel

public oracle.bali.inspector.PropertyModel getPropertyModel()
Get a PropertyModel describing the target object.

Specified by:
getPropertyModel in interface Inspectable
Returns:
a DefaultModel describing the target object.

getCustomizer

public java.beans.Customizer getCustomizer()
Get any Customizer applicable to the target object.

Specified by:
getCustomizer in interface Inspectable
Returns:
a Customizer as found in the BeanInfo of the Class of the target, or null.

getAdditionalTabPages

public java.awt.Component[] getAdditionalTabPages()
Get any additional tab pages applicable to the target. This implementation simply returns null.

Specified by:
getAdditionalTabPages in interface Inspectable
Returns:
an array of GUI pages, or null.

Extension SDK

 

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