public abstract class FlowView extends BoxView
View
| Modifier and Type | Class and Description |
|---|---|
static class |
FlowView.FlowStrategy
保持流动的物理形式的策略。
|
| Modifier and Type | Field and Description |
|---|---|
protected View |
layoutPool
这些视图是表示此视图表示的元素的子元素的视图(逻辑视图转换为物理视图)。
|
protected int |
layoutSpan
创建对该流程的默认约束。
|
protected FlowView.FlowStrategy |
strategy
保持流更新的行为。
|
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| Modifier and Type | Method and Description |
|---|---|
protected SizeRequirements |
calculateMinorAxisRequirements(int axis, SizeRequirements r)
沿小轴计算要求。
|
void |
changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
从该视图负责的位置上更改属性的文档的通知。
|
protected abstract View |
createRow()
创建一个用于在流中容纳一一行的视图的视图。
|
int |
getFlowAxis()
取轴沿视图应该流淌。
|
int |
getFlowSpan(int index)
获取给定子索引的约束跨度。
|
int |
getFlowStart(int index)
获取流跨将开始的流轴的位置。
|
protected int |
getViewIndexAtPosition(int pos)
把孩子的观点代表了指数模型中的位置。
|
void |
insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
给出了一个在该视图负责的位置上插入到文档中的通知。
|
protected void |
layout(int width, int height)
勾画出孩子们。
|
protected void |
loadChildren(ViewFactory f)
加载所有的孩子来初始化视图。
|
void |
removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
给予通知,该视图是由该视图负责的位置中的某个文件被删除的。
|
void |
setParent(View parent)
设置视图的父视图。
|
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModelgetBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsetsappend, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModelprotected int layoutSpan
protected View layoutPool
protected FlowView.FlowStrategy strategy
public FlowView(Element elem, int axis)
elem -这一观点负责元
axis -可能是view.x_axis或view.y_axis
public int getFlowAxis()
FlowStrategy。
public int getFlowSpan(int index)
index -所更新的行的索引。这应该是一个价值> = 0 < getviewcount()。
getFlowStart(int)
public int getFlowStart(int index)
index -所更新的行的索引。这应该是一个价值> = 0 < getviewcount()。
getFlowSpan(int)
protected abstract View createRow()
protected void loadChildren(ViewFactory f)
setParent方法。这是重新实现不加载任何孩子(他们都是直接在格式化的过程中创建的)。如果layoutpool变量为空,logicalview的实例来表示,用于格式化过程的逻辑视图。
loadChildren 方法重写,继承类
CompositeView
f -看厂
CompositeView.setParent(javax.swing.text.View)
protected int getViewIndexAtPosition(int pos)
getViewIndexAtPosition 方法重写,继承类
CompositeView
pos --位置> = 0
protected void layout(int width,
int height)
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
calculateMinorAxisRequirements 方法重写,继承类
BoxView
axis -轴的研究
r -
SizeRequirements对象;如果
null将会创建一个
SizeRequirements对象初始化
SizeRequirements
public void insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
insertUpdate 方法重写,继承类
View
changes -从相关文档的变更信息
a -视图的当前配置
f -工厂用重建如果视图有孩子
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
removeUpdate 方法重写,继承类
View
changes -从相关文档的变更信息
a -视图的当前配置
f -工厂用重建如果视图有孩子
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
changedUpdate 方法重写,继承类
View
changes -从相关文档的变更信息
a -视图的当前配置
f -工厂用重建如果视图有孩子
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void setParent(View parent)
loadChildren方法调用。孩子们不应该被加载在构造函数中设置的因为父母的行为可能会导致他们去搜索的层次(例如获得主办
Container)。如果这种观点有孩子(该视图是从一个地方到另一个层次的),
loadChildren方法不会被调用。
setParent 方法重写,继承类
CompositeView
parent -视图的父,如果没有
null
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.