FlowView.FlowStrategy (Java SE 15 & JDK 15) (original) (raw)

Enclosing class:

FlowView


public static class FlowView.FlowStrategy extends Object

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 incremental repair to the layout or alternative breaking behavior.

Since:

1.3

Constructors

Constructor Description
FlowStrategy()
Modifier and Type Method Description
protected void adjustRow​(FlowView fv, int rowIndex, int desiredSpan, int x) Adjusts the given row if possible to fit within the layout span.
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.
protected View getLogicalView​(FlowView fv) This method gives flow strategies access to the logical view of the FlowView.
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.
void layout​(FlowView fv) Update the flow on the given FlowView.
protected int layoutRow​(FlowView fv, int rowIndex, int pos) Creates a row of views that will fit within the layout span of the row.
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.

Methods declared in class java.lang.Object

[clone](../../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long,int%29)