This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text
class AsyncBoxView.ChildState

java.lang.Object extended by javax.swing.text.AsyncBoxView.ChildState
All Implemented Interfaces:
Runnable
Enclosing class:
AsyncBoxView

public class AsyncBoxView.ChildState
extends Object
implements Runnable

A record representing the layout state of a child view. It is runnable as a task on another thread. All access to the child view that is based upon a read-lock on the model should synchronize on this object (i.e. The layout thread and the GUI thread can both have a read lock on the model at the same time and are not protected from each other). Access to a child view hierarchy is serialized via synchronization on the ChildState instance.


Constructor Summary

          Construct a child status.
 
Method Summary
 View

          Fetch the child view this record represents
 float

          Get the offset along the major axis
 float

          What is the span along the major axis.
 float

          What is the offset along the minor axis
 float

          What is the span along the minor axis.
 boolean

          Has the child view been laid out.
 void
preferenceChanged(boolean width, boolean height)

          Mark preferences changed for this child.
 void
run()

          Update the child state.
 void
setMajorOffset(float offs)

          This method should only be called by the ChildLocator, it is simply a convenient place to hold the cached location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncBoxView.ChildState

public AsyncBoxView.ChildState(View v)
Construct a child status. This needs to start out as fairly large so we don't falsely begin with the idea that all of the children are visible.

Parameters:
v
Method Detail

getChildView

public View getChildView()
Fetch the child view this record represents


getMajorOffset

public float getMajorOffset()
Get the offset along the major axis


getMajorSpan

public float getMajorSpan()
What is the span along the major axis.


getMinorOffset

public float getMinorOffset()
What is the offset along the minor axis


getMinorSpan

public float getMinorSpan()
What is the span along the minor axis.


isLayoutValid

public boolean isLayoutValid()
Has the child view been laid out.


preferenceChanged

public void preferenceChanged(boolean width,
                              boolean height)
Mark preferences changed for this child.

Parameters:
width - true if the width preference has changed
height - true if the height preference has changed

run

public void run()
Update the child state. This should be called by the thread that desires to spend time updating the child state (intended to be the layout thread).

This aquires a read lock on the associated document for the duration of the update to ensure the model is not changed while it is operating. The first thing to do would be to see if any work actually needs to be done. The following could have conceivably happened while the state was waiting to be updated:

  1. The child may have been removed from the view hierarchy.
  2. The child may have been updated by a higher priority operation (i.e. the child may have become visible).


setMajorOffset

public void setMajorOffset(float offs)
This method should only be called by the ChildLocator, it is simply a convenient place to hold the cached location.

Parameters:
offs


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.