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
Modifier and Type | Method and Description |
---|---|
float |
getAlignment(int axis)
计算列表的所需形状。
|
void |
paint(Graphics g, Shape allocation)
使用给定的渲染表面和表面上的区域。
|
protected void |
paintChild(Graphics g, Rectangle alloc, int index)
描绘了一个孩子;被paint()。
|
protected void |
setPropertiesFromAttributes()
更新来自属性的任何缓存值。
|
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
的元素创建了一个视图
public float getAlignment(int axis)
getAlignment
方法重写,继承类
BlockView
axis
-可能是x_axis或y_axis
View.getPreferredSpan(int)
public void paint(Graphics g, Shape allocation)
paint
方法重写,继承类
BlockView
g
-绘制表面使用
allocation
-分配区域进行渲染
View.paint(java.awt.Graphics, java.awt.Shape)
protected void paintChild(Graphics g, Rectangle alloc, int index)
paintChild
方法重写,继承类
BoxView
g
-图形上下文
alloc
-分配区域使孩子
index
-孩子的指标
protected void setPropertiesFromAttributes()
BlockView
setPropertiesFromAttributes
方法重写,继承类
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, 2014, Oracle and/or its affiliates. All rights reserved.