java.lang.Object | |
↳ | javax.swing.text.FlowView.FlowStrategy |
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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gives notification from the document that attributes were changed
in a location that this view is responsible for.
| |||||||||||
Gives notification that something was inserted into the document
in a location that the given flow view is responsible for.
| |||||||||||
Update the flow on the given FlowView.
| |||||||||||
Gives notification that something was removed from the document
in a location that the given flow view is responsible for.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adjusts the given row if possible to fit within the
layout span.
| |||||||||||
Creates a view that can be used to represent the current piece
of the flow.
| |||||||||||
This method gives flow strategies access to the logical
view of the FlowView.
| |||||||||||
Creates a row of views that will fit within the
layout span of the row.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Gives notification from the document that attributes were changed in a location that this view is responsible for.
fv | the FlowView containing the changes |
---|---|
e | the DocumentEvent describing the changes
done to the Document |
alloc | Bounds of the View |
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).
e | the change information from the associated document |
---|---|
alloc | the current allocation of the view inside of the insets. This value will be null if the view has not yet been displayed. |
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.
fv | the view to reflow |
---|
Gives notification that something was removed from the document in a location that the given flow view is responsible for.
e | the change information from the associated document |
---|---|
alloc | the current allocation of the view inside of the insets. |
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.
rowIndex | the row to adjust to the current layout span. |
---|---|
desiredSpan | the current layout span >= 0 |
x | the location r starts at. |
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.
fv | the view holding the flow |
---|---|
startOffset | the start location for the view being created |
spanLeft | the about of span left to fill in the row |
rowIndex | the row the view will be placed into |
This method gives flow strategies access to the logical view of the FlowView.
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.
rowIndex | the index of the row to fill in with views. The row is assumed to be empty on entry. |
---|---|
pos | The current position in the children of this views element from which to start. |