public static class FlowView.FlowStrategy extends Object
| Constructor and Description |
|---|
FlowStrategy()
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustRow(FlowView
Adjusts the given row if possible to fit within the layout span.
|
void |
changedUpdate(FlowView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
|
protected View |
createView(FlowView
Creates a view that can be used to represent the current piece of the flow.
|
protected View |
getLogicalView(FlowView
This method gives flow strategies access to the logical view of the FlowView.
|
void |
insertUpdate(FlowView
Gives notification that something was inserted into the document in a location that the given flow view is responsible for.
|
void |
layout(FlowView
Update the flow on the given FlowView.
|
protected int |
layoutRow(FlowView
Creates a row of views that will fit within the layout span of the row.
|
void |
removeUpdate(FlowView
Gives notification that something was removed from the document in a location that the given flow view is responsible for.
|
public void insertUpdate(FlowViewfv, DocumentEvent e, Rectangle alloc)
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.
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void removeUpdate(FlowViewfv, DocumentEvent e, Rectangle alloc)
e - the change information from the associated document
alloc - the current allocation of the view inside of the insets.
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void changedUpdate(FlowViewfv, DocumentEvent e, Rectangle alloc)
fv - the
FlowView containing the changes
e - the
DocumentEvent describing the changes done to the Document
alloc - Bounds of the View
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
protected ViewgetLogicalView(FlowView fv)
public void layout(FlowViewfv)
fv - the view to reflow
protected int layoutRow(FlowViewfv, int rowIndex, int pos)
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.
protected void adjustRow(FlowViewfv, int rowIndex, int desiredSpan, int x)
rowIndex - the row to adjust to the current layout span.
desiredSpan - the current layout span >= 0
x - the location r starts at.
protected ViewcreateView(FlowView fv, int startOffset, int spanLeft, int rowIndex)
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