javax.swing.text
public static class FlowView.FlowStrategy extends Object
FlowView
into the real views.
Constructor Summary | |
---|---|
FlowStrategy()
Creates a new instance of FlowStragegy . |
Method Summary | |
---|---|
protected void | adjustRow(FlowView fv, int rowIndex, int desiredSpan, int x)
Tries to adjust the specified row to fit within the desired span. |
void | changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc)
Receives notification from a FlowView that some attributes
have changed in the document at a location that the
FlowView is responsible for.
|
protected View | createView(FlowView fv, int startOffset, int spanLeft, int rowIndex)
Creates physical views that form the rows of the flow view. |
protected View | getLogicalView(FlowView fv)
Returns the logical view of the managed FlowView .
|
void | insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc)
Receives notification from a FlowView that some content
has been inserted into the document at a location that the
FlowView is responsible for.
|
void | layout(FlowView fv)
Performs the layout for the whole view. |
protected int | layoutRow(FlowView fv, int rowIndex, int pos)
Lays out one row of the flow view. |
void | removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc)
Receives notification from a FlowView that some content
has been removed from the document at a location that the
FlowView is responsible for.
|
FlowStragegy
.Parameters: fv the flow view rowIndex the index of the row to be adjusted desiredSpan the layout span x the X location at which the row starts
FlowView
that some attributes
have changed in the document at a location that the
FlowView
is responsible for.
The default implementation simply calls {@link #layout}.
Parameters: fv the flow view that sends the notification e the document event describing the change alloc the current allocation of the flow view
null
(if it does
not fit in the available span and also cannot be broken down).
The default implementation fetches the logical view at the specified
startOffset
. If that view has a different startOffset than
specified in the argument, a fragment is created using
{@link View#createFragment(int, int)} that has the correct startOffset
and the logical view's endOffset.
Parameters: fv the flow view startOffset the start offset for the view to be created spanLeft the available span rowIndex the index of the row
Returns: a view to fill the row with, or null
if there
is no view or view fragment that fits in the available span
FlowView
.
Parameters: fv the flow view for which to return the logical view
Returns: the logical view of the managed FlowView
FlowView
that some content
has been inserted into the document at a location that the
FlowView
is responsible for.
The default implementation simply calls {@link #layout}.
Parameters: fv the flow view that sends the notification e the document event describing the change alloc the current allocation of the flow view
Parameters: fv the flow view for which we perform the layout
Parameters: fv the flow view for which we perform the layout rowIndex the index of the row pos the model position for the beginning of the row
Returns: the start position of the next row
FlowView
that some content
has been removed from the document at a location that the
FlowView
is responsible for.
The default implementation simply calls {@link #layout}.
Parameters: fv the flow view that sends the notification e the document event describing the change alloc the current allocation of the flow view