|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.5.0
javax.swing.text
|
||||||||||||||||||||||||||||||||
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
AsyncBoxView.ChildLocator()
construct a child locator. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AsyncBoxView.ChildState lastValidOffset
protected Rectangle lastAlloc
protected Rectangle childAlloc
| Constructor Detail |
|---|
public AsyncBoxView.ChildLocator()
| Method Detail |
|---|
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 View
protected Shape getChildAllocation(int index)
protected void setAllocation(Shape a)
protected int getViewIndexAtVisualOffset(float targetOffset)