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)
cs
- the child statepublic void paintChildren(Graphics g)
g
- the rendering surface to usepublic Shape getChildAllocation(int index, Shape a)
index
- the child indexa
- the allocationpublic 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)
index
- the indexprotected void setAllocation(Shape a)
a
- the allocationprotected int getViewIndexAtVisualOffset(float targetOffset)
targetOffset
- the target offset 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, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait