public class

ListView

extends BlockView
java.lang.Object
   ↳ javax.swing.text.View
     ↳ javax.swing.text.CompositeView
       ↳ javax.swing.text.BoxView
         ↳ javax.swing.text.html.BlockView
           ↳ javax.swing.text.html.ListView

Class Overview

A view implementation to display an html list

Summary

[Expand]
Inherited Constants
From class javax.swing.text.View
From interface javax.swing.SwingConstants
Public Constructors
ListView(Element elem)
Creates a new view that represents a list element.
Public Methods
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 Methods
void paintChild(Graphics g, Rectangle alloc, int index)
Paints one of the children; called by paint().
void setPropertiesFromAttributes()
Update any cached values that come from attributes.
[Expand]
Inherited Methods
From class javax.swing.text.html.BlockView
From class javax.swing.text.BoxView
From class javax.swing.text.CompositeView
From class javax.swing.text.View
From class java.lang.Object

Public Constructors

public ListView (Element elem)

Creates a new view that represents a list element.

Parameters
elem the element to create a view for

Public Methods

public float getAlignment (int axis)

Calculates the desired shape of the list.

Parameters
axis may be either X_AXIS or Y_AXIS
Returns
  • the desired span

public void paint (Graphics g, Shape allocation)

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

Parameters
g the rendering surface to use
allocation the allocated region to render into

Protected Methods

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.

Parameters
g the graphics context
alloc the allocated region to render the child into
index the index of the child

protected void setPropertiesFromAttributes ()

Update any cached values that come from attributes.