While the child view is being accessed a read lock is acquired on the associated document so that the model is stable while being accessed.
| Modifier and Type | Class and Description |
|---|---|
| public class | AsyncBoxView.
A class to manage the effective position of the child views in a localized area while changes are being made around the localized area. |
| public class | AsyncBoxView.
A record representing the layout state of a child view. |
| pack-priv class | AsyncBoxView.
Task to flush requirement changes upward |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | axis
The major axis against which the children are tiled. |
| pack-priv float | |
| pack-priv AsyncBoxView. | changing
Child that is actively changing size. |
| pack-priv boolean | estimatedMajorSpan
Is the span along the major axis estimated? |
| pack-priv Runnable | |
| pack-priv float | |
| protected AsyncBoxView. | locator
Object that manages the offsets of the children. |
| pack-priv boolean | |
| pack-priv float | majorSpan
Current span along the major axis. |
| pack-priv boolean | |
| pack-priv float | minorSpan
Current span along the minor axis. |
| pack-priv AsyncBoxView. | |
| pack-priv AsyncBoxView. | |
| pack-priv float | |
| pack-priv List | stats
The children and their layout statistics. |
| pack-priv float |
| Access | Constructor and Description |
|---|---|
| public | AsyncBoxView(Element
the element of the model to represent elem, int the axis to tile along. This can be
either X_AXIS or Y_AXIS. axis)Construct a box view that does asynchronous layout. |
| Modifier and Type | Method and Description |
|---|---|
| protected AsyncBoxView. | Returns: new child statethe view v)New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more. |
| protected void | |
| public float | Returns: the bottom part of the margin around the viewGet the bottom part of the margin around the view. |
| public Shape | Returns: the allocation to the childthe index of the child, >= 0 && < getViewCount() index, Shape the allocation to this view. a)Overrides javax. Fetches the allocation for the given child view. |
| protected AsyncBoxView. | Returns: the object representing the layout state of of the child at the given indexthe child index. This should be a
value >= 0 and < getViewCount(). index)Fetch the object representing the layout state of of the child at the given index. |
| protected boolean | Returns: whether or not the major span currently estimatedIs the major span currently estimated? |
| protected float | Returns: the span along an axis that is taken up by the insetsthe axis to determine the total insets along,
either X_AXIS or Y_AXIS. axis)Fetch the span along an axis that is taken up by the insets. |
| protected LayoutQueue | |
| public float | Returns: the left part of the margin around the viewGet the left part of the margin around the view. |
| public int | |
| public float | Returns: the span the view would like to be rendered into >= 0. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.may be either View.X_AXIS or View.Y_AXIS axis)Overrides javax. Determines the maximum span for this view along an axis. |
| public float | Returns: the span the view would like to be rendered into >= 0. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.may be either View.X_AXIS or View.Y_AXIS axis)Overrides javax. Determines the minimum span for this view along an axis. |
| public int | |
| public int | Returns: the location within the model that best represents the next location visual positionthe position to convert pos, Position.the allocated region to render into a, int the direction from the current position that can
be thought of as the arrow keys typically found on a keyboard;
this may be one of the following:
direction, Position.
an array contain the bias that was checked biasRetOverrides javax. Provides a way to determine the next visually represented model location that one might place a caret. |
| public float | Returns: the span the view would like to be rendered into >= 0. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.may be either View.X_AXIS or View.Y_AXIS axis)Implements abstract javax. Determines the preferred span for this view along an axis. |
| public float | Returns: the right part of the margin around the viewGet the right part of the margin around the view. |
| pack-priv float | Returns: the current span of the view along the given axis, >= 0may be either axis)View.X_AXIS or
View.Y_AXISRetrieves the size of the view along an axis. |
| public float | Returns: the top part of the margin around the viewGet the top part of the margin around the view. |
| public View | Returns: the viewthe number of the view to get, >= 0 && < getViewCount() n)Overrides javax. Gets the nth child view. |
| public int | Returns: the number of views >= 0Overrides javax. Returns the number of views in this view. |
| public int | Returns: index of the view representing the given position, or -1 if no view represents that positionthe position >= 0 pos, Position.Overrides javax. Returns the child view index representing the given position in the model. |
| protected synchronized int | Returns: index of the view representing the given position, or -1 if no view represents that positionthe position >= 0 pos, Position.the position bias bFetches the child view index representing the given position in the model. |
| protected void | |
| protected synchronized void | majorRequirementChange(AsyncBoxView.
the child state cs,the delta delta)Requirements changed along the major axis. |
| protected synchronized void | minorRequirementChange(AsyncBoxView.
the child state csRequirements changed along the minor axis. |
| public Shape | Returns: the bounding box of the given position is returnedthe position to convert >= 0 pos, Shape the allocated region to render into a, Position.the bias toward the previous character or the
next character represented by the offset, in case the
position is a boundary of two views. bImplements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
| public void | paint(Graphics
the rendering surface to use g, Shape the allocated region to render into alloc)Implements abstract javax. Render the view using the given allocation and rendering surface. |
| public synchronized void | preferenceChanged(View
the child view child, boolean true if the width preference has changed width, boolean true if the height preference has changed height)Overrides javax. Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout. |
| public void | replace(int
the starting offset into the child views >= 0 offset, int the number of existing views to replace >= 0 length, View[] the child views to insert views)Overrides javax. Calls the superclass to update the child views, and updates the status records for the children. |
| public void | |
| protected void | setEstimatedMajorSpan(boolean
new value for the estimatedMajorSpan property isEstimated)Set the estimatedMajorSpan property that determines if the major span should be treated as being estimated. |
| public void | |
| public void | setParent(View
the parent of the view, null if none parent)Overrides javax. Sets the parent of the view. |
| public void | |
| public void | setSize(float
the width >= 0 width, float the height >= 0 height)Overrides javax. Sets the size of the view. |
| pack-priv void | setSpanOnAxis(int
may be either axis, float View.X_AXIS or
View.Y_AXISthe span to layout to >= 0 span)Sets the size of the view along an axis. |
| public void | |
| protected void | updateLayout(DocumentEvent.
changes to the element this view is responsible
for (may be null if there were no changes). ec,the change information from the associated document e, Shape the current allocation of the view a)Overrides javax. Update the layout in response to receiving notification of change from the model. |
| public int | Returns: the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.the X coordinate >= 0 x, float the Y coordinate >= 0 y, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model. |