public class AsyncBoxView.ChildLocator extends Object
Modifier and Type | Field | Description |
---|---|---|
protected java.awt.Rectangle |
childAlloc |
A shape to use for the child allocation to avoid
creating a lot of garbage.
|
protected java.awt.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 | Description |
---|---|
ChildLocator() |
construct a child locator.
|
Modifier and Type | Method | Description |
---|---|---|
void |
childChanged(AsyncBoxView.ChildState cs) |
Notification that a child changed.
|
protected java.awt.Shape |
getChildAllocation(int index) |
Fetch the allocation to use for a child view.
|
java.awt.Shape |
getChildAllocation(int index,
java.awt.Shape a) |
Fetch the allocation to use for a child view.
|
int |
getViewIndexAtPoint(float x,
float y,
java.awt.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(java.awt.Graphics g) |
Paint the children that intersect the clip area.
|
protected void |
setAllocation(java.awt.Shape a) |
Copy the currently allocated shape into the Rectangle
used to store the current allocation.
|
protected AsyncBoxView.ChildState lastValidOffset
protected java.awt.Rectangle lastAlloc
protected java.awt.Rectangle childAlloc
public void childChanged(AsyncBoxView.ChildState cs)
cs
- the child statepublic void paintChildren(java.awt.Graphics g)
g
- the rendering surface to usepublic java.awt.Shape getChildAllocation(int index, java.awt.Shape a)
index
- the child indexa
- the allocationpublic int getViewIndexAtPoint(float x, float y, java.awt.Shape a)
x
- the X coordinate >= 0y
- the Y coordinate >= 0a
- the allocation to the Viewprotected java.awt.Shape getChildAllocation(int index)
index
- the indexprotected void setAllocation(java.awt.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, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b151-2