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
- 所有已实现的接口:
-
SwingConstants
用于显示HTML列表的视图实现
-
Field Summary
Fields declared in class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields declared in 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
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getAlignment
(int axis) 计算列表的期望形状。void
使用给定的渲染表面和该表面上的区域进行渲染。protected void
paintChild
(Graphics g, Rectangle alloc, int index) 绘制其中一个子项;由paint()调用。Methods declared in class javax.swing.text.html.BlockView
calculateMajorAxisRequirements, calculateMinorAxisRequirements, getAttributes, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getStyleSheet, layoutMinorAxis, setParent, setPropertiesFromAttributes
Methods declared in class javax.swing.text.BoxView
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
Methods declared in class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets
Methods declared in class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
-
Constructor Details
-
ListView
创建一个代表列表元素的新视图。- 参数:
-
elem
- 要为其创建视图的元素
-
-
Method Details
-
getAlignment
public float getAlignment(int axis) 计算列表的期望形状。- 覆盖:
-
getAlignment
在类BlockView
- 参数:
-
axis
- 可以是X_AXIS或Y_AXIS - 返回:
- 所需的跨度
- 参见:
-
paint
使用给定的渲染表面和该表面上的区域进行渲染。 -
paintChild
绘制其中一个子项;由paint()调用。默认情况下只是这样做,但子类可以使用这个方法相对于子项绘制其他内容。- 覆盖:
-
paintChild
在类BoxView
- 参数:
-
g
- 图形上下文 -
alloc
- 要将子项渲染到的分配区域 -
index
- 子项的索引
-