javax.swing.text.html

Class ListView

public class ListView extends BlockView

A View to render HTML lists, like the <ul> and <ol> tags.
Constructor Summary
ListView(Element el)
Creates a new ListView for the specified element.
Method Summary
floatgetAlignment(int axis)
Returns the alignment of this view along the specified axis.
voidpaint(Graphics g, Shape allocation)
Paints the ListView.
protected voidpaintChild(Graphics g, Rectangle a, int index)
Paints the child with the specified index into the specified allocation.
protected voidsetPropertiesFromAttributes()
Fetches this view's properties from the style attributes of this view's element.

Constructor Detail

ListView

public ListView(Element el)
Creates a new ListView for the specified element.

Parameters: el the element to create a list view for

Method Detail

getAlignment

public float getAlignment(int axis)
Returns the alignment of this view along the specified axis. This returns 0.5 unconditionally.

Parameters: axis the axis

Returns: the alignment of this view along the specified axis

paint

public void paint(Graphics g, Shape allocation)
Paints the ListView.

Parameters: g the graphics context to use for painting allocation the allocation given to this view

paintChild

protected void paintChild(Graphics g, Rectangle a, int index)
Paints the child with the specified index into the specified allocation. This implementation forwards to the list painter fetched from the {@link StyleSheet} and then calls super.paintChild(g, a, index).

Parameters: g the graphics context to use a the allocation for the child index the child index

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Fetches this view's properties from the style attributes of this view's element. This forwards to super and then fetches a {@link StyleSheet.ListPainter} from the stylesheet suitable for painting the list.