|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.text.View
javax.swing.text.GlyphView
javax.swing.text.LabelView
javax.swing.text.html.InlineView
public class InlineView
Renders HTML content (identified by HTML.Tag.CONTENT). This is
basically a LabelView that is adjusted to understand styles defined
by stylesheets.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.text.GlyphView |
|---|
GlyphView.GlyphPainter |
| Field Summary |
|---|
| Fields inherited from class javax.swing.text.View |
|---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
InlineView(Element element)
Creates a new InlineView that renders the specified element. |
|
| Method Summary | |
|---|---|
View |
breakView(int axis,
int offset,
float pos,
float len)
Tries to break the view near the specified view span len. |
void |
changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Receives notification that attributes have changed in the document in a location that this view is responsible for. |
AttributeSet |
getAttributes()
Returns the attributes that are used for rendering. |
int |
getBreakWeight(int axis,
float pos,
float len)
Determines how well the specified view location is suitable for inserting a line break. |
float |
getMinimumSpan(int axis)
Returns the minimum span for the specified axis. |
protected StyleSheet |
getStyleSheet()
Returns the stylesheet used by this view. |
void |
insertUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Receives notification that something was inserted into the document in a location that this view is responsible for. |
void |
removeUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Receives notification that something was removed from the document in a location that this view is responsible for. |
protected void |
setPropertiesFromAttributes()
Loads the character style properties from the stylesheet. |
| Methods inherited from class javax.swing.text.LabelView |
|---|
getBackground, getFont, getFontMetrics, getForeground, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setBackground, setStrikeThrough, setSubscript, setSuperscript, setUnderline |
| Methods inherited from class javax.swing.text.GlyphView |
|---|
checkPainter, clone, createFragment, getAlignment, getEndOffset, getGlyphPainter, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText, modelToView, paint, setGlyphPainter, viewToModel |
| Methods inherited from class javax.swing.text.View |
|---|
append, dump, forwardUpdate, forwardUpdateToView, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getParent, getResizeWeight, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InlineView(Element element)
InlineView that renders the specified element.
element - the element for this view| Method Detail |
|---|
public void insertUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
insertUpdate in class GlyphViewe - the document eventa - the current allocation of this viewf - the view factory for creating new views
public void removeUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
removeUpdate in class GlyphViewe - the document eventa - the current allocation of this viewf - the view factory for creating new views
public void changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
setPropertiesFromAttributes().
changedUpdate in class LabelViewe - the document eventa - the current allocation of this viewf - the view factory for creating new viewspublic AttributeSet getAttributes()
getAttributes in class View
public int getBreakWeight(int axis,
float pos,
float len)
GlyphViewaxis is View.Y_AXIS, then
this method forwards to the superclass, if axis is
View.X_AXIS then this method returns
View.ExcellentBreakWeight if there is a suitable break location
(usually whitespace) within the specified view span, or
View.GoodBreakWeight if not.
getBreakWeight in class GlyphViewaxis - the axis along which the break weight is requestedpos - the starting view locationlen - the length of the span at which the view should be broken
public View breakView(int axis,
int offset,
float pos,
float len)
GlyphViewlen.
The glyph view can only be broken in the X direction. For Y direction it
returns itself.
breakView in class GlyphViewaxis - the axis for breaking, may be View.X_AXIS or
View.Y_AXISoffset - the model location where the fragment should startpos - the view position along the axis where the fragment startslen - the desired length of the fragment view
this if breaking was not
possibleprotected void setPropertiesFromAttributes()
setPropertiesFromAttributes in class LabelViewprotected StyleSheet getStyleSheet()
HTMLDocument that is rendered by this view.
public float getMinimumSpan(int axis)
getMinimumSpan in class Viewaxis - the axis
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||