API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. AsyncBoxView View Source
Author(s)
Timothy Prinzing
Since
1.3
Version
1.18 04/07/06
Serial
Hierarchy
 Object
      View
          AsyncBoxView
Implements
Subclasses
Description
public class AsyncBoxView
  A box that does layout asynchronously.
See also:   
Constructors
public AsyncBoxView (Element elem, int axis)
  Construct a box view that does asynchronous layout.
Methods
Hide/Show inherited methods
public void append (View v) [Inherited From View]
  Appends a single child view.
public View breakView (int axis, int offset, float pos, float len) [Inherited From View]
  Tries to break this view on the given axis.
public void changedUpdate (DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected ChildState createChildState (View v)
New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more
public View createFragment (int p0, int p1) [Inherited From View]
  Creates a view that represents a portion of the element.
protected void flushRequirementChanges ()
  Publish the changes in preferences upward to the parent view.
protected void forwardUpdate (ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Forwards the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void forwardUpdateToView (View v, DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Forwards the DocumentEvent to the give child view.
public float getAlignment (int axis) [Inherited From View]
  Determines the desired alignment for this view along an axis.
public AttributeSet getAttributes () [Inherited From View]
  Fetches the attributes to use when rendering.
public float getBottomInset ()
Get the bottom part of the margin around the view.
public int getBreakWeight (int axis, float pos, float len) [Inherited From View]
  Determines how attractive a break opportunity in this view is.
public Shape getChildAllocation (int index, Shape a) [Overrides View]
  Fetches the allocation for the given child view.
protected ChildState getChildState (int index)
  Fetch the object representing the layout state of of the child at the given index.
public Container getContainer () [Inherited From View]
  Fetches the container hosting the view.
public Document getDocument () [Inherited From View]
  Fetches the model associated with the view.
public Element getElement () [Inherited From View]
  Fetches the structural portion of the subject that this view is mapped to.
public int getEndOffset () [Inherited From View]
  Fetches the portion of the model for which this view is responsible.
protected boolean getEstimatedMajorSpan ()
  Is the major span currently estimated?
public Graphics getGraphics () [Inherited From View]
  Fetch a Graphics for rendering.
protected float getInsetSpan (int axis)
  Fetch the span along an axis that is taken up by the insets.
protected LayoutQueue getLayoutQueue ()
Fetch the queue to use for layout.
public float getLeftInset ()
Get the left part of the margin around the view.
public int getMajorAxis ()
  Fetch the major axis (the axis the children are tiled along).
public float getMaximumSpan (int axis) [Overrides View]
  Determines the maximum span for this view along an axis.
public float getMinimumSpan (int axis) [Overrides View]
  Determines the minimum span for this view along an axis.
public int getMinorAxis ()
  Fetch the minor axis (the axis orthoginal to the tiled axis).
public int getNextVisualPositionFrom (int pos, Bias b, Shape a, int direction, Bias biasRet) throws BadLocationException [Overrides View]
  Provides a way to determine the next visually represented model location that one might place a caret.
public View getParent () [Inherited From View]
  Returns the parent of the view.
public float getPreferredSpan (int axis) [Specified in View]
  Determines the preferred span for this view along an axis.
public int getResizeWeight (int axis) [Inherited From View]
  Determines the resizability of the view along the given axis.
public float getRightInset ()
Get the right part of the margin around the view.
pack-private float getSpanOnAxis (int axis)
  Retrieves the size of the view along an axis.
public int getStartOffset () [Inherited From View]
  Fetches the portion of the model for which this view is responsible.
public String getToolTipText (float x, float y, Shape allocation) [Inherited From View]
  Returns the tooltip text at the specified location.
public float getTopInset ()
Get the top part of the margin around the view.
public View getView (int n) [Overrides View]
  Gets the nth child view.
public int getViewCount () [Overrides View]
  Returns the number of views in this view.
public ViewFactory getViewFactory () [Inherited From View]
  Fetches the ViewFactory implementation that is feeding the view hierarchy.
public int getViewIndex (float x, float y, Shape allocation) [Inherited From View]
  Returns the child view index representing the given position in the view.
public int getViewIndex (int pos, Bias b) [Overrides View]
  Returns the child view index representing the given position in the model.
protectedsynchronized int getViewIndexAtPosition (int pos, Bias b)
  Fetches the child view index representing the given position in the model.
public void insert (int offs, View v) [Inherited From View]
  Inserts a single child view.
public void insertUpdate (DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Gives notification that something was inserted into the document in a location that this view is responsible for.
public boolean isVisible () [Inherited From View]
  Returns a boolean that indicates whether the view is visible or not.
protected void loadChildren (ViewFactory f)
  Loads all of the children to initialize the view.
protectedsynchronized void majorRequirementChange (ChildState cs, float delta)
  Requirements changed along the major axis.
protectedsynchronized void minorRequirementChange (ChildState cs)
  Requirements changed along the minor axis.
public Shape modelToView (int p0, Bias b0, int p1, Bias b1, Shape a) throws BadLocationException [Inherited From View]
  Provides a mapping, for a given region, from the document model coordinate space to the view coordinate space.
@Deprecated
public Shape modelToView (int pos, Shape a) throws BadLocationException [Inherited From View]
  Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
public Shape modelToView (int pos, Shape a, Bias b) throws BadLocationException [Specified in View]
  Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
public void paint (Graphics g, Shape alloc) [Specified in View]
  Render the view using the given allocation and rendering surface.
publicsynchronized void preferenceChanged (View child, boolean width, boolean height) [Overrides View]
  Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
public void remove (int i) [Inherited From View]
  Removes one of the children at the given position.
public void removeAll () [Inherited From View]
  Removes all of the children.
public void removeUpdate (DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Gives notification that something was removed from the document in a location that this view is responsible for.
public void replace (int offset, int length, View views) [Overrides View]
  Calls the superclass to update the child views, and updates the status records for the children.
public void setBottomInset (float i)
  Set the bottom part of the margin around the view.
protected void setEstimatedMajorSpan (boolean isEstimated)
  Set the estimatedMajorSpan property that determines if the major span should be treated as being estimated.
public void setLeftInset (float i)
  Set the left part of the margin around the view.
public void setParent (View parent) [Overrides View]
  Sets the parent of the view.
public void setRightInset (float i)
  Set the right part of the margin around the view.
public void setSize (float width, float height) [Overrides View]
  Sets the size of the view.
pack-private void setSpanOnAxis (int axis, float span)
  Sets the size of the view along an axis.
public void setTopInset (float i)
  Set the top part of the margin around the view.
protected boolean updateChildren (ElementChange ec, DocumentEvent e, ViewFactory f) [Inherited From View]
  Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
protected void updateLayout (ElementChange ec, DocumentEvent e, Shape a) [Overrides View]
  Update the layout in response to receiving notification of change from the model.
@Deprecated
public int viewToModel (float x, float y, Shape a) [Inherited From View]
  Provides a mapping from the view coordinate space to the logical coordinate space of the model.
public int viewToModel (float x, float y, Shape a, Bias biasReturn) [Specified in View]
  Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Fields
Hide/Show inherited fields
pack-private int axis
The major axis against which the children are tiled.
publicfinalstatic int BadBreakWeight = "0" [Inherited From View]
  The weight to indicate a view is a bad break opportunity for the purpose of formatting.
pack-private float bottomInset
pack-private ChildState changing
  Child that is actively changing size.
pack-private boolean estimatedMajorSpan
Is the span along the major axis estimated?
publicfinalstatic int ExcellentBreakWeight = "2000" [Inherited From View]
  The weight to indicate a view supports breaking, and this represents a very attractive place to break.
pack-private Runnable flushTask
publicfinalstatic int ForcedBreakWeight = "3000" [Inherited From View]
  The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats its children by breaking them.
publicfinalstatic int GoodBreakWeight = "1000" [Inherited From View]
  The weight to indicate a view supports breaking, but better opportunities probably exist.
pack-private float leftInset
protected ChildLocator locator
  Object that manages the offsets of the children.
pack-private boolean majorChanged
pack-private float majorSpan
  Current span along the major axis.
pack-private boolean minorChanged
pack-private float minorSpan
  Current span along the minor axis.
pack-private ChildState minRequest
pack-private ChildState prefRequest
pack-private float rightInset
pack-privatefinalstatic Bias sharedBiasReturn [Inherited From View]
pack-private List stats
The children and their layout statistics.
pack-private float topInset
publicfinalstatic int X_AXIS = "0" [Inherited From View]
Axis for format/break operations.
publicfinalstatic int Y_AXIS = "1" [Inherited From View]
Axis for format/break operations.
Nested Classes
  AsyncBoxView.ChildLocator
A class to manage the effective position of the child views in a localized area while changes are being made around the localized area.
  AsyncBoxView.ChildState
A record representing the layout state of a child view.
  AsyncBoxView.FlushTask
Task to flush requirement changes upward
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar