Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.AsyncBoxView.ChildState
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 | |
AsyncBoxView.ChildState(View v)
Construct a child status. |
Method Summary | |
View |
getChildView()
Fetch the child view this record represents |
float |
getMajorOffset()
Get the offset along the major axis |
float |
getMajorSpan()
What is the span along the major axis. |
float |
getMinorOffset()
What is the offset along the minor axis |
float |
getMinorSpan()
What is the span along the minor axis. |
boolean |
isLayoutValid()
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 |
public AsyncBoxView.ChildState(View v)
Method Detail |
public View getChildView()
public void run()
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:
run
in interface Runnable
java.lang.Runnable
Thread.run()
public float getMinorSpan()
public float getMinorOffset()
public float getMajorSpan()
public float getMajorOffset()
public void setMajorOffset(float offs)
public void preferenceChanged(boolean width, boolean height)
width
- true if the width preference has changedheight
- true if the height preference has changedJComponent.revalidate()
public boolean isLayoutValid()
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.