public class ListView extends BlockView
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor | Description | 
|---|---|
| ListView(Element elem) | Creates a new view that represents a list element. | 
| Modifier and Type | Method | 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, setParentbaselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, modelToView, preferenceChanged, replace, setAxis, setSize, viewToModelgetBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsetsappend, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModelpublic ListView(Element elem)
elem - the element to create a view forpublic float getAlignment(int axis)
getAlignment in class BlockViewaxis - may be either X_AXIS or Y_AXISView.getPreferredSpan(int)public void paint(Graphics g, Shape allocation)
paint in class BlockViewg - 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 BoxViewg - the graphics contextalloc - the allocated region to render the child intoindex - the index of the childprotected void setPropertiesFromAttributes()
BlockViewsetPropertiesFromAttributes 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, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.