|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
javax.swing.text.View
![]()
![]()
![]()
javax.swing.text.AsyncBoxView

public class AsyncBoxView

A box that does layout asynchronously. This is useful to keep the GUI event thread moving by not doing any layout on it. The layout is done on a granularity of operations on the child views. After each child view is accessed for some part of layout (a potentially time consuming operation) the remaining tasks can be abandoned or a new higher priority task (i.e. to service a synchronous request or a visible area) can be taken on.
While the child view is being accessed a read lock is aquired on the associated document so that the model is stable while being accessed.
| Nested Class Summary | |
|---|---|
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. |
class |
AsyncBoxView.ChildState
A record representing the layout state of a child view. |
| Field Summary | |
|---|---|
protected AsyncBoxView.ChildLocator |
locator
Object that manages the offsets of the children. |
Fields inherited from class javax.swing.text.View ![]() |
|---|
BadBreakWeight |
Fields inherited from interface javax.swing.SwingConstants ![]() |
|---|
BOTTOM |
| Constructor Summary | |
|---|---|
AsyncBoxView
Construct a box view that does asynchronous layout. |
|
| Method Summary | |
|---|---|
protected AsyncBoxView.ChildState |
createChildState
New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more |
protected void |
flushRequirementChanges
Publish the changes in preferences upward to the parent view. |
float |
getBottomInset
Get the bottom part of the margin around the view. |
Shape |
getChildAllocation
Fetches the allocation for the given child view. |
protected AsyncBoxView.ChildState |
getChildState
Fetch the object representing the layout state of of the child at the given index. |
protected boolean |
getEstimatedMajorSpan
Is the major span currently estimated? |
protected float |
getInsetSpan
Fetch the span along an axis that is taken up by the insets. |
protected LayoutQueue |
getLayoutQueue
Fetch the queue to use for layout. |
float |
getLeftInset
Get the left part of the margin around the view. |
int |
getMajorAxis
Fetch the major axis (the axis the children are tiled along). |
float |
getMaximumSpan
Determines the maximum span for this view along an axis. |
float |
getMinimumSpan
Determines the minimum span for this view along an axis. |
int |
getMinorAxis
Fetch the minor axis (the axis orthoginal to the tiled axis). |
int |
getNextVisualPositionFrom
Provides a way to determine the next visually represented model location that one might place a caret. |
float |
getPreferredSpan
Determines the preferred span for this view along an axis. |
float |
getRightInset
Get the right part of the margin around the view. |
float |
getTopInset
Get the top part of the margin around the view. |
View |
getView
Gets the nth child view. |
int |
getViewCount
Returns the number of views in this view. |
int |
getViewIndex
Returns the child view index representing the given position in the model. |
protected int |
getViewIndexAtPosition
Fetches the child view index representing the given position in the model. |
protected void |
loadChildren
Loads all of the children to initialize the view. |
protected void |
majorRequirementChange
Requirements changed along the major axis. |
protected void |
minorRequirementChange
Requirements changed along the minor axis. |
Shape |
modelToView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
void |
paint
Render the view using the given allocation and rendering surface. |
void |
preferenceChanged
Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout. |
void |
replace
Calls the superclass to update the child views, and updates the status records for the children. |
void |
setBottomInset
Set the bottom part of the margin around the view. |
protected void |
setEstimatedMajorSpan
Set the estimatedMajorSpan property that determines if the major span should be treated as being estimated. |
void |
setLeftInset
Set the left part of the margin around the view. |
void |
setParent
Sets the parent of the view. |
void |
setRightInset
Set the right part of the margin around the view. |
void |
setSize
Sets the size of the view. |
void |
setTopInset
Set the top part of the margin around the view. |
protected void |
updateLayout
Update the layout in response to receiving notification of change from the model. |
int |
viewToModel
Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
Methods inherited from class javax.swing.text.View ![]() |
|---|
append |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
| Field Detail |
|---|

protected AsyncBoxView.ChildLocator![]()
![]()
locator
| Constructor Detail |
|---|

public AsyncBoxView(Element![]()