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

Represents the layout state of a child view.


Constructor Summary
AsyncBoxView.ChildState(View view)
          Creates a new ChildState object for the specified child view.
 
Method Summary
 View getChildView()
          Returns the child view for which this ChildState represents the layout state.
 float getMajorOffset()
          Returns the offset of the child view along the major layout axis.
 float getMajorSpan()
          Returns the span of the child view along the major layout axis.
 float getMinorOffset()
          Returns the offset of the child view along the minor layout axis.
 float getMinorSpan()
          Returns the span of the child view along the minor layout axis.
 boolean isLayoutValid()
          Returns true if the current layout information is valid, false otherwise.
 void preferenceChanged(boolean width, boolean height)
          Mark the preferences changed for that child.
 void run()
          Performs the layout update for the child view managed by this ChildState.
 void setMajorOffset(float offset)
          Sets the offset of the child view along the major layout axis.
 
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 view)
Creates a new ChildState object for the specified child view.

Parameters:
view - the child view for which to create the state record
Method Detail

getChildView

public View getChildView()
Returns the child view for which this ChildState represents the layout state.

Returns:
the child view for this child state object

isLayoutValid

public boolean isLayoutValid()
Returns true if the current layout information is valid, false otherwise.

Returns:
true if the current layout information is valid, false otherwise

run

public void run()
Performs the layout update for the child view managed by this ChildState.

Specified by:
run in interface Runnable

getMinorSpan

public float getMinorSpan()
Returns the span of the child view along the minor layout axis.

Returns:
the span of the child view along the minor layout axis

getMinorOffset

public float getMinorOffset()
Returns the offset of the child view along the minor layout axis.

Returns:
the offset of the child view along the minor layout axis

getMajorSpan

public float getMajorSpan()
Returns the span of the child view along the major layout axis.

Returns:
the span of the child view along the major layout axis

getMajorOffset

public float getMajorOffset()
Returns the offset of the child view along the major layout axis.

Returns:
the offset of the child view along the major layout axis

setMajorOffset

public void setMajorOffset(float offset)
Sets the offset of the child view along the major layout axis. This should only be called by the ChildLocator of that child view.

Parameters:
offset - the offset to set

preferenceChanged

public void preferenceChanged(boolean width,
                              boolean height)
Mark the preferences changed for that child. This forwards to AsyncBoxView.preferenceChanged(javax.swing.text.View, boolean, boolean).

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