Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
static class: BasicHTML.Renderer [javadoc | source]

All Implemented Interfaces:

Root text view that acts as an HTML renderer.
Fields inherited from javax.swing.text.View:
BadBreakWeight,  GoodBreakWeight,  ExcellentBreakWeight,  ForcedBreakWeight,  X_AXIS,  Y_AXIS,  sharedBiasReturn
 Renderer(JComponent c,
    ViewFactory f,
    View v) 
Method from javax.swing.plaf.basic.BasicHTML$Renderer Summary:
getAlignment,   getAttributes,   getContainer,   getDocument,   getElement,   getEndOffset,   getMaximumSpan,   getMinimumSpan,   getPreferredSpan,   getStartOffset,   getView,   getViewCount,   getViewFactory,   modelToView,   modelToView,   paint,   preferenceChanged,   setParent,   setSize,   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.plaf.basic.BasicHTML$Renderer Detail:
 public float getAlignment(int axis) 
    Determines the desired alignment for this view along an axis.
 public AttributeSet getAttributes() 
    Fetches the attributes to use when rendering. At the root level there are no attributes. If an attribute is resolved up the view hierarchy this is the end of the line.
 public Container getContainer() 
    Fetches the container hosting the view. This is useful for things like scheduling a repaint, finding out the host components font, etc. The default implementation of this is to forward the query to the parent view.
 public Document getDocument() 
    Returns the document model underlying the view.
 public Element getElement() 
    Gets the element that this view is mapped to.
 public int getEndOffset() 
    Returns the ending offset into the model for this view.
 public float getMaximumSpan(int axis) 
    Determines the maximum span for this view along an axis.
 public float getMinimumSpan(int axis) 
    Determines the minimum span for this view along an axis.
 public float getPreferredSpan(int axis) 
    Determines the preferred span for this view along an axis.
 public int getStartOffset() 
    Returns the starting offset into the model for this view.
 public View getView(int n) 
    Gets the n-th view in this container.
 public int getViewCount() 
    Returns the number of views in this view. Since this view simply wraps the root of the view hierarchy it has exactly one child.
 public ViewFactory getViewFactory() 
    Fetches the factory to be used for building the various view fragments that make up the view that represents the model. This is what determines how the model will be represented. This is implemented to fetch the factory provided by the associated EditorKit.
 public Shape modelToView(int pos,
    Shape a,
    Bias b) throws BadLocationException 
    Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
 public Shape modelToView(int p0,
    Bias b0,
    int p1,
    Bias b1,
    Shape a) throws BadLocationException 
    Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
 public  void paint(Graphics g,
    Shape allocation) 
    Renders the view.
 public  void preferenceChanged(View child,
    boolean width,
    boolean height) 
    Specifies that a preference has changed. Child views can call this on the parent to indicate that the preference has changed. The root view routes this to invalidate on the hosting component.

    This can be called on a different thread from the event dispatching thread and is basically unsafe to propagate into the component. To make this safe, the operation is transferred over to the event dispatching thread for completion. It is a design goal that all view methods be safe to call without concern for concurrency, and this behavior helps make that true.

 public  void setParent(View parent) 
    Sets the view parent.
 public  void setSize(float width,
    float height) 
    Sets the view size.
 public int viewToModel(float x,
    float y,
    Shape a,
    Bias[] bias) 
    Provides a mapping from the view coordinate space to the logical coordinate space of the model.