public class ParagraphView extends ParagraphView
FlowView.FlowStrategy
firstLineIndent
layoutPool, layoutSpan, strategy
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 |
---|
ParagraphView(Element elem)
构建了一个给定元素内。
|
Modifier and Type | Method and Description |
---|---|
protected SizeRequirements |
calculateMinorAxisRequirements(int axis, SizeRequirements r)
沿小轴计算段落的需要。
|
AttributeSet |
getAttributes()
读取属性时要使用的渲染。
|
float |
getMaximumSpan(int axis)
沿着一个轴确定该视图的最大跨度。
|
float |
getMinimumSpan(int axis)
沿着一个轴确定该视图的最小间距。
|
float |
getPreferredSpan(int axis)
确定此视图的首选跨度。
|
protected StyleSheet |
getStyleSheet() |
boolean |
isVisible()
指示是否显示该视图。
|
void |
paint(Graphics g, Shape a)
使用给定的渲染表面和表面上的区域。
|
void |
setParent(View parent)
为此视图建立父视图。
|
protected void |
setPropertiesFromAttributes()
设置段落的CSS属性而不是发现styleconstants值(即
|
breakView, changedUpdate, createRow, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowSpan, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent, setJustification, setLineSpacing
getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
public ParagraphView(Element elem)
elem
-这一观点负责元
public void setParent(View parent)
这是实现了父类以及调用setPropertiesFromAttributes
方法设置段落属性的CSS属性。这个调用是在这个时候作出的,以确保通过家长视图属性向上解决的能力。
public AttributeSet getAttributes()
getAttributes
方法重写,继承类
View
protected void setPropertiesFromAttributes()
setPropertiesFromAttributes
方法重写,继承类
ParagraphView
protected StyleSheet getStyleSheet()
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
如果该段显式指定了大小要求,则使用该要求。否则,使用父类的ParagraphView
要求。
如果axis
参数不View.X_AXIS
也View.Y_AXIS
,IllegalArgumentException
抛出。如果r
参数null,
新SizeRequirements
对象被创建,否则提供SizeRequirements
对象返回。
calculateMinorAxisRequirements
方法重写,继承类
ParagraphView
axis
-短轴
r
-输入
SizeRequirements
对象
SizeRequirements
对象
IllegalArgumentException
-如果
axis
参数无效
SizeRequirements
public boolean isVisible()
public void paint(Graphics g, Shape a)
paint
方法重写,继承类
ParagraphView
g
-绘制表面使用
a
-分配区域进行渲染
View.paint(java.awt.Graphics, java.awt.Shape)
public float getPreferredSpan(int axis)
getPreferredSpan
方法重写,继承类
BoxView
axis
-可能是view.x_axis或view.y_axis
BoxView.getPreferredSpan(int)
public float getMinimumSpan(int axis)
getMinimumSpan
方法重写,继承类
BoxView
axis
-可能是
View.X_AXIS
或
View.Y_AXIS
BoxView.getMinimumSpan(int)
public float getMaximumSpan(int axis)
getMaximumSpan
方法重写,继承类
BoxView
axis
-可能是
View.X_AXIS
或
View.Y_AXIS
BoxView.getMaximumSpan(int)
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.