AsyncBoxView
public class AsyncBoxView.ChildLocator extends Object
Modifier and Type | Field | 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 | Description |
---|---|
ChildLocator() |
construct a child locator. |
Modifier and Type | Method | Description |
---|---|---|
void |
childChanged |
Notification that a child changed. |
protected Shape |
getChildAllocation |
Fetch the allocation to use for a child view. |
Shape |
getChildAllocation |
Fetch the allocation to use for a child view. |
int |
getViewIndexAtPoint |
Fetches the child view index at the given point. |
protected int |
getViewIndexAtVisualOffset |
Locate the view responsible for an offset into the box along the major axis. |
void |
paintChildren |
Paint the children that intersect the clip area. |
protected void |
setAllocation |
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 ChildLocator()
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
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/text/AsyncBoxView.ChildLocator.html