javax.swing.text

Class AsyncBoxView.ChildState

public class AsyncBoxView.ChildState extends Object implements Runnable

Represents the layout state of a child view.
Constructor Summary
ChildState(View view)
Creates a new ChildState object for the specified child view.
Method Summary
ViewgetChildView()
Returns the child view for which this ChildState represents the layout state.
floatgetMajorOffset()
Returns the offset of the child view along the major layout axis.
floatgetMajorSpan()
Returns the span of the child view along the major layout axis.
floatgetMinorOffset()
Returns the offset of the child view along the minor layout axis.
floatgetMinorSpan()
Returns the span of the child view along the minor layout axis.
booleanisLayoutValid()
Returns true if the current layout information is valid, false otherwise.
voidpreferenceChanged(boolean width, boolean height)
Mark the preferences changed for that child.
voidrun()
Performs the layout update for the child view managed by this ChildState.
voidsetMajorOffset(float offset)
Sets the offset of the child view along the major layout axis.

Constructor Detail

ChildState

public 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

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

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

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

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

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

preferenceChanged

public void preferenceChanged(boolean width, boolean height)
Mark the preferences changed for that child. This forwards to {@link AsyncBoxView#preferenceChanged}.

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

run

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

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