Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.AsyncBoxView.ChildLocator
public class AsyncBoxView.ChildLocator
A class to manage the effective position of the child views in a localized area while changes are being made around the localized area. The AsyncBoxView may be continuously changing, but the visible area needs to remain fairly stable until the layout thread decides to publish an update to the parent.
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)
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the