public class ListView extends BlockView
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
ListView(Element elem)
Creates a new view that represents a list element.
|
Modifier and Type | Method and Description |
---|---|
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.
|
calculateMajorAxisRequirements, calculateMinorAxisRequirements, changedUpdate, getAttributes, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getStyleSheet, layoutMinorAxis, setParent
baselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, modelToView, preferenceChanged, replace, setAxis, setSize, viewToModel
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
public ListView(Element elem)
elem
- the element to create a view forpublic float getAlignment(int axis)
getAlignment
in class BlockView
axis
- may be either X_AXIS or Y_AXISView.getPreferredSpan(int)
public void paint(Graphics g, Shape allocation)
paint
in class BlockView
g
- the rendering surface to useallocation
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
protected void paintChild(Graphics g, Rectangle alloc, int index)
paintChild
in class BoxView
g
- the graphics contextalloc
- the allocated region to render the child intoindex
- the index of the childprotected void setPropertiesFromAttributes()
BlockView
setPropertiesFromAttributes
in class BlockView
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.