javax.swing.text.html
Class InlineView
java.lang.Object
   javax.swing.text.View
javax.swing.text.View
       javax.swing.text.GlyphView
javax.swing.text.GlyphView
           javax.swing.text.LabelView
javax.swing.text.LabelView
               javax.swing.text.html.InlineView
javax.swing.text.html.InlineView
- All Implemented Interfaces: 
- Cloneable, SwingConstants, TabableView
- public class InlineView- extends LabelView
Displays the inline element styles
 based upon css attributes.
 
 
 
 
| 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 elem)Constructs a new view wrapped on an element.
 | 
 
 
| Methods inherited from class javax.swing.text.LabelView | 
| getBackground, getFont, getFontMetrics, getForeground, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setStrikeThrough, setSubscript, setSuperscript, setUnderline | 
 
| Methods inherited from class javax.swing.text.GlyphView | 
| breakView, checkPainter, clone, createFragment, getAlignment, getEndOffset, getGlyphPainter, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText, insertUpdate, modelToView, paint, removeUpdate, setGlyphPainter, viewToModel | 
 
| Methods inherited from class javax.swing.text.View | 
| append, forwardUpdate, forwardUpdateToView, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel | 
 
 
 
InlineView
public InlineView(Element elem)
- Constructs a new view wrapped on an element.
 
- Parameters:
- elem- the element
changedUpdate
public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
- Gives notification from the document that attributes were changed
 in a location that this view is responsible for.
 
- 
- Overrides:
- changedUpdatein class- LabelView
 
- 
- Parameters:
- e- the change information from the associated document
- a- the current allocation of the view
- f- the factory to use to rebuild if the view has children
- See Also:
- View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
 
getAttributes
public AttributeSet getAttributes()
- Fetches the attributes to use when rendering.  This is
 implemented to multiplex the attributes specified in the
 model with a StyleSheet.
 
- 
- Overrides:
- getAttributesin class- View
 
- 
 
getBreakWeight
public int getBreakWeight(int axis,
                          float pos,
                          float len)
- Determines how attractive a break opportunity in 
 this view is.  This can be used for determining which
 view is the most attractive to call breakViewon in the process of formatting.  A view that represents
 text that has whitespace in it might be more attractive
 than a view that has no whitespace, for example.  The
 higher the weight, the more attractive the break.  A
 value equal to or lower thanBadBreakWeightshould not be considered for a break.  A value greater
 than or equal toForcedBreakWeightshould
 be broken.
 This is implemented to provide the default behavior
 of returning BadBreakWeightunless the length
 is greater than the length of the view in which case the 
 entire view represents the fragment.  Unless a view has
 been written to support breaking behavior, it is not
 attractive to try and break the view.  An example of
 a view that does support breaking isLabelView.
 An example of a view that uses break weight isParagraphView.
 
 
- 
- Overrides:
- getBreakWeightin class- GlyphView
 
- 
- Parameters:
- axis- may be either View.X_AXIS or View.Y_AXIS
- pos- the potential location of the start of the 
   broken view >= 0.  This may be useful for calculating tab
   positions.
- len- specifies the relative length from pos
   where a potential break is desired >= 0.
- Returns:
- the weight, which should be a value between
   ForcedBreakWeight and BadBreakWeight.
- See Also:
- LabelView,- ParagraphView,- View.BadBreakWeight,- View.GoodBreakWeight,- View.ExcellentBreakWeight,- View.ForcedBreakWeight
 
setPropertiesFromAttributes
protected void setPropertiesFromAttributes()
- Set the cached properties from the attributes.
 
- 
- Overrides:
- setPropertiesFromAttributesin class- LabelView
 
- 
 
getStyleSheet
protected StyleSheet getStyleSheet()
- 
 
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.