public class AsyncBoxView.ChildLocator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Rectangle |
childAlloc
A shape to use for the child allocation to avoid creating a lot of garbage.
|
protected Rectangle |
lastAlloc
The last seen allocation (for repainting when changes are flushed upward).
|
protected AsyncBoxView |
lastValidOffset
The location of the last offset calculation that is valid.
|
| Constructor and Description |
|---|
ChildLocator()
construct a child locator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
childChanged(AsyncBoxView
Notification that a child changed.
|
protected Shape |
getChildAllocation(int index)
Fetch the allocation to use for a child view.
|
Shape |
getChildAllocation(int index, Shape
Fetch the allocation to use for a child view.
|
int |
getViewIndexAtPoint(float x, float y, Shape
Fetches the child view index at the given point.
|
protected int |
getViewIndexAtVisualOffset(float targetOffset)
Locate the view responsible for an offset into the box along the major axis.
|
void |
paintChildren(Graphics
Paint the children that intersect the clip area.
|
protected void |
setAllocation(Shape
Copy the currently allocated shape into the Rectangle used to store the current allocation.
|
protected AsyncBoxView.ChildState lastValidOffset
protected RectanglelastAlloc
protected RectanglechildAlloc
public void childChanged(AsyncBoxView.ChildState cs)
public void paintChildren(Graphicsg)
public ShapegetChildAllocation(int index, Shape a)
public int getViewIndexAtPoint(float x,
float y,
Shape a)
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocation to the View
protected ShapegetChildAllocation(int index)
protected void setAllocation(Shapea)
protected int getViewIndexAtVisualOffset(float targetOffset)