javax.swing.text.html

Class ListView

Implemented Interfaces:
SwingConstants

public class ListView
extends BlockView

A view implementation to display an html list

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

ListView(Element elem)
Creates a new view that represents a list element.

Method Summary

float
getAlignment(int axis)
Calculates the desired shape of the list.
void
paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface.
protected void
paintChild(Graphics g, Rectangle alloc, int index)
Paints one of the children; called by paint().
protected void
setPropertiesFromAttributes()
Update any cached values that come from attributes.

Methods inherited from class javax.swing.text.html.BlockView

calculateMajorAxisRequirements, calculateMinorAxisRequirements, changedUpdate, getAlignment, getAttributes, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getStyleSheet, layoutMinorAxis, paint, setParent, setPropertiesFromAttributes

Methods inherited from class javax.swing.text.BoxView

baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel

Methods inherited from class javax.swing.text.CompositeView

childAllocation, flipEastAndWestAtEnds, getBottomInset, getChildAllocation, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPoint, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, isAfter, isBefore, loadChildren, modelToView, modelToView, replace, setInsets, setParagraphInsets, setParent, viewToModel

Methods inherited from class javax.swing.text.View

Shape modelToView, 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, int viewToModel, isVisible, modelToView, modelToView, paint, preferenceChanged, remove, removeAll, removeUpdate, replace, setParent, setSize, updateChildren, updateLayout, viewToModel

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ListView

public ListView(Element elem)
Creates a new view that represents a list element.
Parameters:
elem - the element to create a view for

Method Details

getAlignment

public float getAlignment(int axis)
Calculates the desired shape of the list.
Overrides:
getAlignment in interface BlockView
Returns:
the desired span

paint

public void paint(Graphics g,
                  Shape allocation)
Renders using the given rendering surface and area on that surface.
Overrides:
paint in interface BlockView
Parameters:
g - the rendering surface to use
allocation - the allocated region to render into

paintChild

protected void paintChild(Graphics g,
                          Rectangle alloc,
                          int index)
Paints one of the children; called by paint(). By default that is all it does, but a subclass can use this to paint things relative to the child.
Overrides:
paintChild in interface BoxView
Parameters:
g - the graphics context
alloc - the allocated region to render the child into
index - the index of the child

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Update any cached values that come from attributes.
Overrides:
setPropertiesFromAttributes in interface BlockView