
CHAPTER 31
Thejavax.swing.text.html Package
The javax.swing .text.html package defines classes to support the display and editing
of HTML documents. The key class is HTMLEditorKit, which is used to customize a
javax.swing .JEditorPane component to work with HTML. Figure 31-1 shows the class
hierarchy of this package. See Chapter 3, Swing Programming Topics, for a discus-
sion and example of using the HTMLEditorKit.
BlockV iew Ja va 1.2
javax.swing .text.html
This View implementation displays HTML block elements and can handle CSS attributes
for those elements.
public class BlockV iew extends BoxVie w {
// Public Constructors
public BlockV iew(javax.swing .text.Element elem, int axis);
// Public Methods Overriding BoxView
public float getAlignment(int axis);
public int getResizeWeight(int axis);
public void paint(java.awt.Graphics g, java.awt.Shape allocation);
// Protected Methods Overriding BoxView
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r);
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r);
// Public Methods Overriding CompositeView
public void changedUpdate(javax.swing .event.DocumentEvent changes, java.awt.Shape a,Vie wFactory f);
// Public Methods Overriding View
public AttributeSet getAttributes();
// Protected Instance Methods
protected StyleSheet getStyleSheet();
protected void setProper tiesFromAttributes();
}
javax.swing. ...