Home » openjdk-7 » javax » swing » text » [javadoc | source]
javax.swing.text
public static class: FlowView.FlowStrategy [javadoc | source]
java.lang.Object
   javax.swing.text.FlowView$FlowStrategy

Direct Known Subclasses:
    TextLayoutStrategy

Strategy for maintaining the physical form of the flow. The default implementation is completely stateless, and recalculates the entire flow if the layout is invalid on the given FlowView. Alternative strategies can be implemented by subclassing, and might perform incrementatal repair to the layout or alternative breaking behavior.
Field Summary
 Position damageStart     
 Vector<View> viewBuffer     
Method from javax.swing.text.FlowView$FlowStrategy Summary:
addDamage,   adjustRow,   changedUpdate,   createView,   getLogicalView,   insertUpdate,   layout,   layoutRow,   removeUpdate,   reparentViews,   unsetDamage
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.FlowView$FlowStrategy Detail:
  void addDamage(FlowView fv,
    int offset) 
 protected  void adjustRow(FlowView fv,
    int rowIndex,
    int desiredSpan,
    int x) 
    Adjusts the given row if possible to fit within the layout span. By default this will try to find the highest break weight possible nearest the end of the row. If a forced break is encountered, the break will be positioned there.
 public  void changedUpdate(FlowView fv,
    DocumentEvent e,
    Rectangle alloc) 
    Gives notification from the document that attributes were changed in a location that this view is responsible for.
 protected View createView(FlowView fv,
    int startOffset,
    int spanLeft,
    int rowIndex) 
    Creates a view that can be used to represent the current piece of the flow. This can be either an entire view from the logical view, or a fragment of the logical view.
 protected View getLogicalView(FlowView fv) 
    This method gives flow strategies access to the logical view of the FlowView.
 public  void insertUpdate(FlowView fv,
    DocumentEvent e,
    Rectangle alloc) 
    Gives notification that something was inserted into the document in a location that the given flow view is responsible for. The strategy should update the appropriate changed region (which depends upon the strategy used for repair).
 public  void layout(FlowView fv) 
    Update the flow on the given FlowView. By default, this causes all of the rows (child views) to be rebuilt to match the given constraints for each row. This is called by a FlowView.layout to update the child views in the flow.
 protected int layoutRow(FlowView fv,
    int rowIndex,
    int pos) 
    Creates a row of views that will fit within the layout span of the row. This is called by the layout method. This is implemented to fill the row by repeatedly calling the createView method until the available span has been exhausted, a forced break was encountered, or the createView method returned null. If the remaining span was exhaused, the adjustRow method will be called to perform adjustments to the row to try and make it fit into the given span.
 public  void removeUpdate(FlowView fv,
    DocumentEvent e,
    Rectangle alloc) 
    Gives notification that something was removed from the document in a location that the given flow view is responsible for.
  void reparentViews(View pool,
    int startPos) 
  void unsetDamage()