APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.text.html

public Class ListView

extends BlockView
Class Inheritance
Imports
java.util.Enumeration, java.awt.*, javax.swing.text.*

A view implementation to display an html list
Author
Timothy Prinzing

Field Summary

Modifier and TypeField and Description
private StyleSheet.ListPainter

Constructor Summary

AccessConstructor and Description
public
ListView(Element
the element to create a view for
elem
)

Creates a new view that represents a list element.

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the desired span
getAlignment
(int axis)

Overrides javax.swing.text.html.BlockView.getAlignment.

Calculates the desired shape of the list.

public void
paint(Graphics
the rendering surface to use
g
,
Shape
the allocated region to render into
allocation
)

Overrides javax.swing.text.html.BlockView.paint.

Renders using the given rendering surface and area on that surface.

protected void
paintChild(Graphics
the graphics context
g
,
Rectangle
the allocated region to render the child into
alloc
,
int
the index of the child
index
)

Overrides javax.swing.text.BoxView.paintChild.

Paints one of the children; called by paint().

protected void
setPropertiesFromAttributes()

Overrides javax.swing.text.html.BlockView.setPropertiesFromAttributes.

Update any cached values that come from attributes.

Inherited from javax.swing.text.html.BlockView:
calculateMajorAxisRequirementscalculateMinorAxisRequirementschangedUpdategetAttributesgetMaximumSpangetMinimumSpangetPreferredSpangetResizeWeightgetStyleSheetisPercentagelayoutMinorAxissetParentspanSetFromAttributes

Field Detail

listPainterback to summary
private StyleSheet.ListPainter listPainter

Constructor Detail

ListViewback to summary
public ListView(Element elem)

Creates a new view that represents a list element.

Parameters
elem:Element

the element to create a view for

Method Detail

getAlignmentback to summary
public float getAlignment(int axis)

Overrides javax.swing.text.html.BlockView.getAlignment.

Calculates the desired shape of the list.

Returns:float

the desired span

See Also
View#getPreferredSpan
paintback to summary
public void paint(Graphics g, Shape allocation)

Overrides javax.swing.text.html.BlockView.paint.

Renders using the given rendering surface and area on that surface.

Parameters
g:Graphics

the rendering surface to use

allocation:Shape

the allocated region to render into

See Also
View#paint
paintChildback to summary
protected void paintChild(Graphics g, Rectangle alloc, int index)

Overrides javax.swing.text.BoxView.paintChild.

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.

Parameters
g:Graphics

the graphics context

alloc:Rectangle

the allocated region to render the child into

index:int

the index of the child

setPropertiesFromAttributesback to summary
protected void setPropertiesFromAttributes()

Overrides javax.swing.text.html.BlockView.setPropertiesFromAttributes.

Doc from javax.swing.text.html.BlockView.setPropertiesFromAttributes.

Update any cached values that come from attributes.