public class AsyncBoxView.ChildLocator extends Object
Modifier and Type | Field and Description |
---|---|
protected Rectangle |
childAlloc
用于子分配的形状,以避免产生大量的垃圾。
|
protected Rectangle |
lastAlloc
最后看到的分配(当更改被刷新时重新绘制)。
|
protected AsyncBoxView.ChildState |
lastValidOffset
上次偏移计算的位置有效。
|
Constructor and Description |
---|
ChildLocator()
构建一个子定位器。
|
Modifier and Type | Method and Description |
---|---|
void |
childChanged(AsyncBoxView.ChildState cs)
通知孩子改变了。
|
protected Shape |
getChildAllocation(int index)
获取用于子视图的分配。
|
Shape |
getChildAllocation(int index, Shape a)
获取用于子视图的分配。
|
int |
getViewIndexAtPoint(float x, float y, Shape a)
在给定点获取子视图索引。
|
protected int |
getViewIndexAtVisualOffset(float targetOffset)
将负责偏移的视图定位到沿主轴的框中。
|
void |
paintChildren(Graphics g)
绘制与剪辑区域相交的孩子。
|
protected void |
setAllocation(Shape a)
将当前分配的形状复制到用于存储当前分配的Rectangle中。
|
protected AsyncBoxView.ChildState lastValidOffset
protected Rectangle lastAlloc
protected Rectangle childAlloc
public void childChanged(AsyncBoxView.ChildState cs)
public void paintChildren(Graphics g)
public Shape getChildAllocation(int index, Shape a)
public int getViewIndexAtPoint(float x, float y, Shape a)
x
- X坐标> = 0
y
- Y坐标> = 0
a
- 分配给视图
protected Shape getChildAllocation(int index)
protected void setAllocation(Shape a)
protected int getViewIndexAtVisualOffset(float targetOffset)
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.