ListView (Java 2 Platform SE 5.0) (original) (raw)


javax.swing.text.html

Class ListView

java.lang.Object extended by javax.swing.text.View extended by javax.swing.text.CompositeView extended by javax.swing.text.BoxView extended by javax.swing.text.html.BlockView extended by javax.swing.text.html.ListView

All 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](../../../../javax/swing/text/html/ListView.html#paint%28java.awt.Graphics, java.awt.Shape%29)(Graphics g,Shape allocation) Renders using the given rendering surface and area on that surface.
protected void [paintChild](../../../../javax/swing/text/html/ListView.html#paintChild%28java.awt.Graphics, java.awt.Rectangle, int%29)(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](../../../../javax/swing/text/html/BlockView.html#calculateMajorAxisRequirements%28int, javax.swing.SizeRequirements%29), [calculateMinorAxisRequirements](../../../../javax/swing/text/html/BlockView.html#calculateMinorAxisRequirements%28int, javax.swing.SizeRequirements%29), [changedUpdate](../../../../javax/swing/text/html/BlockView.html#changedUpdate%28javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory%29), getAttributes, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getStyleSheet, [layoutMinorAxis](../../../../javax/swing/text/html/BlockView.html#layoutMinorAxis%28int, int, int[], int[]%29), setParent
Methods inherited from class javax.swing.text.BoxView
[baselineLayout](../../../../javax/swing/text/BoxView.html#baselineLayout%28int, int, int[], int[]%29), [baselineRequirements](../../../../javax/swing/text/BoxView.html#baselineRequirements%28int, javax.swing.SizeRequirements%29), [childAllocation](../../../../javax/swing/text/BoxView.html#childAllocation%28int, java.awt.Rectangle%29), [flipEastAndWestAtEnds](../../../../javax/swing/text/BoxView.html#flipEastAndWestAtEnds%28int, javax.swing.text.Position.Bias%29), [forwardUpdate](../../../../javax/swing/text/BoxView.html#forwardUpdate%28javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory%29), getAxis, [getChildAllocation](../../../../javax/swing/text/BoxView.html#getChildAllocation%28int, java.awt.Shape%29), getHeight, [getOffset](../../../../javax/swing/text/BoxView.html#getOffset%28int, int%29), [getSpan](../../../../javax/swing/text/BoxView.html#getSpan%28int, int%29), [getViewAtPoint](../../../../javax/swing/text/BoxView.html#getViewAtPoint%28int, int, java.awt.Rectangle%29), getWidth, [isAfter](../../../../javax/swing/text/BoxView.html#isAfter%28int, int, java.awt.Rectangle%29), isAllocationValid, [isBefore](../../../../javax/swing/text/BoxView.html#isBefore%28int, int, java.awt.Rectangle%29), isLayoutValid, [layout](../../../../javax/swing/text/BoxView.html#layout%28int, int%29), layoutChanged, [layoutMajorAxis](../../../../javax/swing/text/BoxView.html#layoutMajorAxis%28int, int, int[], int[]%29), [modelToView](../../../../javax/swing/text/BoxView.html#modelToView%28int, java.awt.Shape, javax.swing.text.Position.Bias%29), [preferenceChanged](../../../../javax/swing/text/BoxView.html#preferenceChanged%28javax.swing.text.View, boolean, boolean%29), [replace](../../../../javax/swing/text/BoxView.html#replace%28int, int, javax.swing.text.View[]%29), setAxis, [setSize](../../../../javax/swing/text/BoxView.html#setSize%28float, float%29), [viewToModel](../../../../javax/swing/text/BoxView.html#viewToModel%28float, float, java.awt.Shape, javax.swing.text.Position.Bias[]%29)
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, [getNextEastWestVisualPositionFrom](../../../../javax/swing/text/CompositeView.html#getNextEastWestVisualPositionFrom%28int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]%29), [getNextNorthSouthVisualPositionFrom](../../../../javax/swing/text/CompositeView.html#getNextNorthSouthVisualPositionFrom%28int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]%29), [getNextVisualPositionFrom](../../../../javax/swing/text/CompositeView.html#getNextVisualPositionFrom%28int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]%29), getRightInset, getTopInset, getView, [getViewAtPosition](../../../../javax/swing/text/CompositeView.html#getViewAtPosition%28int, java.awt.Rectangle%29), getViewCount, [getViewIndex](../../../../javax/swing/text/CompositeView.html#getViewIndex%28int, javax.swing.text.Position.Bias%29), getViewIndexAtPosition, loadChildren, [modelToView](../../../../javax/swing/text/CompositeView.html#modelToView%28int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape%29), [setInsets](../../../../javax/swing/text/CompositeView.html#setInsets%28short, short, short, short%29), setParagraphInsets
Methods inherited from class javax.swing.text.View
append, [breakView](../../../../javax/swing/text/View.html#breakView%28int, int, float, float%29), [createFragment](../../../../javax/swing/text/View.html#createFragment%28int, int%29), [forwardUpdateToView](../../../../javax/swing/text/View.html#forwardUpdateToView%28javax.swing.text.View, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory%29), [getBreakWeight](../../../../javax/swing/text/View.html#getBreakWeight%28int, float, float%29), getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, [getToolTipText](../../../../javax/swing/text/View.html#getToolTipText%28float, float, java.awt.Shape%29), getViewFactory, [getViewIndex](../../../../javax/swing/text/View.html#getViewIndex%28float, float, java.awt.Shape%29), [insert](../../../../javax/swing/text/View.html#insert%28int, javax.swing.text.View%29), [insertUpdate](../../../../javax/swing/text/View.html#insertUpdate%28javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory%29), isVisible, [modelToView](../../../../javax/swing/text/View.html#modelToView%28int, java.awt.Shape%29), remove, removeAll, [removeUpdate](../../../../javax/swing/text/View.html#removeUpdate%28javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory%29), [updateChildren](../../../../javax/swing/text/View.html#updateChildren%28javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory%29), [updateLayout](../../../../javax/swing/text/View.html#updateLayout%28javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape%29), [viewToModel](../../../../javax/swing/text/View.html#viewToModel%28float, float, java.awt.Shape%29)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, [wait](../../../../java/lang/Object.html#wait%28long, int%29)
Constructor Detail

ListView

public ListView(Element elem)

Creates a new view that represents a list element.

Parameters:

elem - the element to create a view for

Method Detail

getAlignment

public float getAlignment(int axis)

Calculates the desired shape of the list.

Overrides:

[getAlignment](../../../../javax/swing/text/html/BlockView.html#getAlignment%28int%29) in class [BlockView](../../../../javax/swing/text/html/BlockView.html "class in javax.swing.text.html")

Parameters:

axis - may be either X_AXIS or Y_AXIS

Returns:

the desired span

See Also:

View.getPreferredSpan(int)


paint

public void paint(Graphics g, Shape allocation)

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

Overrides:

[paint](../../../../javax/swing/text/html/BlockView.html#paint%28java.awt.Graphics, java.awt.Shape%29) in class [BlockView](../../../../javax/swing/text/html/BlockView.html "class in javax.swing.text.html")

Parameters:

g - the rendering surface to use

allocation - the allocated region to render into

See Also:

[View.paint(java.awt.Graphics, java.awt.Shape)](../../../../javax/swing/text/View.html#paint%28java.awt.Graphics, java.awt.Shape%29)


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](../../../../javax/swing/text/BoxView.html#paintChild%28java.awt.Graphics, java.awt.Rectangle, int%29) in class [BoxView](../../../../javax/swing/text/BoxView.html "class in javax.swing.text")

Parameters:

g - the graphics context

alloc - the allocated region to render the child into

index - the index of the child


setPropertiesFromAttributes

protected void setPropertiesFromAttributes()

Description copied from class: [BlockView](../../../../javax/swing/text/html/BlockView.html#setPropertiesFromAttributes%28%29)

Update any cached values that come from attributes.

Overrides:

[setPropertiesFromAttributes](../../../../javax/swing/text/html/BlockView.html#setPropertiesFromAttributes%28%29) in class [BlockView](../../../../javax/swing/text/html/BlockView.html "class in javax.swing.text.html")



Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.