Class AsyncBoxView.ChildState
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AsyncBoxView
public class AsyncBoxView.ChildState extends Object implements Runnable
- Since:
- 1.3
Constructor Summary
Constructor | Description |
---|---|
ChildState |
Construct a child status. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
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 |
Mark preferences changed for this child. |
void |
run() |
Update the child state. |
void |
setMajorOffset |
This method should only be called by the ChildLocator, it is simply a convenient place to hold the cached location. |
Constructor Details
ChildState
public ChildState(View v)
- Parameters:
-
v
- the view - Since:
- 1.4
Method Details
getChildView
public View getChildView()
- Returns:
- the child view this record represents
run
public void run()
This acquires 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:
- The child may have been removed from the view hierarchy.
- The child may have been updated by a higher priority operation (i.e. the child may have become visible).
getMinorSpan
public float getMinorSpan()
- Returns:
- the span along the minor axis
getMinorOffset
public float getMinorOffset()
- Returns:
- the offset along the minor axis
getMajorSpan
public float getMajorSpan()
- Returns:
- the span along the major axis
getMajorOffset
public float getMajorOffset()
- Returns:
- the offset along the major axis
setMajorOffset
public void setMajorOffset(float offs)
- Parameters:
-
offs
- offsets
preferenceChanged
public void preferenceChanged(boolean width, boolean height)
- Parameters:
-
width
- true if the width preference has changed -
height
- true if the height preference has changed - See Also:
isLayoutValid
public boolean isLayoutValid()
- Returns:
- whether or not the child view been laid out.
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/AsyncBoxView.ChildState.html