Home » openjdk-7 » javax » swing » text » html » [javadoc | source]
javax.swing.text.html
public class: InlineView [javadoc | source]
java.lang.Object
   javax.swing.text.View
      javax.swing.text.GlyphView
         javax.swing.text.LabelView
            javax.swing.text.html.InlineView

All Implemented Interfaces:
    TabableView, Cloneable, SwingConstants

Direct Known Subclasses:
    ImageLabelView, BRView

Displays the inline element styles based upon css attributes.
Fields inherited from javax.swing.text.GlyphView:
offset,  length,  impliedCR,  skipWidth,  expander,  x,  painter,  defaultPainter
Fields inherited from javax.swing.text.View:
BadBreakWeight,  GoodBreakWeight,  ExcellentBreakWeight,  ForcedBreakWeight,  X_AXIS,  Y_AXIS,  sharedBiasReturn
Constructor:
 public InlineView(Element elem) 
    Constructs a new view wrapped on an element.
    Parameters:
    elem - the element
Method from javax.swing.text.html.InlineView Summary:
breakView,   changedUpdate,   getAttributes,   getBreakWeight,   getStyleSheet,   insertUpdate,   removeUpdate,   setPropertiesFromAttributes
Methods from javax.swing.text.LabelView:
changedUpdate,   getBackground,   getFont,   getFontMetrics,   getForeground,   isStrikeThrough,   isSubscript,   isSuperscript,   isUnderline,   setBackground,   setPropertiesFromAttributes,   setStrikeThrough,   setSubscript,   setSuperscript,   setUnderline,   sync
Methods from javax.swing.text.GlyphView:
breakView,   changedUpdate,   checkPainter,   clone,   createFragment,   getAlignment,   getBackground,   getBreakWeight,   getEndOffset,   getFont,   getForeground,   getGlyphPainter,   getJustificationInfo,   getMinimumSpan,   getNextVisualPositionFrom,   getPartialSpan,   getPreferredSpan,   getStartOffset,   getTabExpander,   getTabbedSpan,   getText,   insertUpdate,   isStrikeThrough,   isSubscript,   isSuperscript,   isUnderline,   modelToView,   paint,   paintTextUsingColor,   removeUpdate,   setGlyphPainter,   viewToModel
Methods from 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 from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.html.InlineView Detail:
 public View breakView(int axis,
    int offset,
    float pos,
    float len) 
    Tries to break this view on the given axis. Refer to javax.swing.text.View#breakView for a complete description of this method.

    Behavior of this method is unspecified in case axis is neither View.X_AXIS nor View.Y_AXIS, and in case offset, pos, or len is null.

 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.
 public AttributeSet getAttributes() 
    Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet.
 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 breakView on 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 than BadBreakWeight should not be considered for a break. A value greater than or equal to ForcedBreakWeight should be broken.

    This is implemented to provide the default behavior of returning BadBreakWeight unless 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 is LabelView. An example of a view that uses break weight is ParagraphView.

 protected StyleSheet getStyleSheet() 
 public  void insertUpdate(DocumentEvent e,
    Shape a,
    ViewFactory f) 
    Gives notification that something was inserted into the document in a location that this view is responsible for. If either parameter is null, behavior of this method is implementation dependent.
 public  void removeUpdate(DocumentEvent e,
    Shape a,
    ViewFactory f) 
    Gives notification that something was removed from the document in a location that this view is responsible for. If either parameter is null, behavior of this method is implementation dependent.
 protected  void setPropertiesFromAttributes() 
    Set the cached properties from the attributes.