This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.swing.text.html
class ObjectView
- All Implemented Interfaces:
- SwingConstants
public class ObjectView
extends ComponentView
Component decorator that implements the view interface
for <object> elements.
This view will try to load the class specified by the
classid
attribute. If possible, the Classloader
used to load the associated Document is used.
This would typically be the same as the ClassLoader
used to load the EditorKit. If the document's
ClassLoader is null, Class.forName
is used.
If the class can successfully be loaded, an attempt will
be made to create an instance of it by calling
Class.newInstance
. An attempt will be made
to narrow the instance to type java.awt.Component
to display the object.
This view can also manage a set of parameters with limitations.
The parameters to the <object> element are expected to
be present on the associated elements attribute set as simple
strings. Each bean property will be queried as a key on
the AttributeSet, with the expectation that a non-null value
(of type String) will be present if there was a parameter
specification for the property. Reflection is used to
set the parameter. Currently, this is limited to a very
simple single parameter of type String.
A simple example HTML invocation is:
<object classid="javax.swing.JLabel">
<param name="text" value="sample text">
</object>
Constructor Summary |
Creates a new ObjectView object.
|
Method Summary |
protected Component |
Create the component.
|
Methods inherited from class javax.swing.text.View |
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getPreferredSpan, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, modelToView, paint, preferenceChanged, remove, removeAll, removeUpdate, replace, setParent, setSize, updateChildren, updateLayout, viewToModel, viewToModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectView
public ObjectView(Element elem)
-
Creates a new ObjectView object.
- Parameters:
elem
- the element to decorate
createComponent
protected Component createComponent()
-
Create the component. The classid is used
as a specification of the classname, which
we try to load.
- Overrides:
createComponent
in class ComponentView
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.