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.ChildState |
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.ChildState cs)
Notification that a child changed.
|
protected Shape |
getChildAllocation(int index)
Fetch the allocation to use for a child view.
|
Shape |
getChildAllocation(int index,
Shape a)
Fetch the allocation to use for a child view.
|
int |
getViewIndexAtPoint(float x,
float y,
Shape a)
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 g)
Paint the children that intersect the clip area.
|
protected void |
setAllocation(Shape a)
Copy the currently allocated shape into the Rectangle
used to store the current allocation.
|
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
- the X coordinate >= 0y
- the Y coordinate >= 0a
- the allocation to the Viewprotected 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, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.