java.lang.Object | +--javax.swing.text.View | +--javax.swing.text.CompositeView | +--javax.swing.text.BoxView | +--javax.swing.text.FlowView
Safe: A View that tries to flow it's children into some partially constrained space. This can be used to build things like paragraphs, pages, etc. The flow is made up of the following pieces of functionality.
Viewprotected View
layoutPool
protected javax.swing.text.FlowView.FlowStrategy
strategy
majorAllocValid, majorAxis, majorOffsets, majorRequest, majorReqValid, majorSpan, majorSpans, minorAllocValid, minorOffsets, minorRequest, minorReqValid, minorSpan, minorSpans, tempRect
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, sharedBiasReturn, X_AXIS, Y_AXIS
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
protected SizeRequirements
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
void
changedUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
protected abstract View
createRow()
int
getFlowSpan(int index)
int
getFlowStart(int index)
protected int
getViewIndexAtPosition(int pos)
void
insertUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
void
removeUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, checkRequests, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getSpanOnAxis, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, setSpanOnAxis, updateChildSizes, updateLayoutArray, viewToModel
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
protected int layoutSpan
protected View layoutPool
protected javax.swing.text.FlowView.FlowStrategy strategy
public FlowView(Element elem, int axis)
elem - the element that this view is responsible foraxis - may be either View.X_AXIS or View.Y_AXISpublic int getFlowAxis()
FlowStrategy.
public int getFlowSpan(int index)
index - the index of the row being updated.
This should be a value>= 0 and < getViewCount().getFlowStart(int)public int getFlowStart(int index)
index - the index of the row being updated.
This should be a value>= 0 and < getViewCount().getFlowSpan(int)protected abstract View createRow()
protected void loadChildren(ViewFactory f)
setParent method.
This is reimplemented to not load any children directly
(as they are created in the process of formatting).
If the layoutPool variable is null, an instance of
LogicalView is created to represent the logical view
that is used in the process of formatting.
loadChildren in class CompositeViewf - the view factoryCompositeView.setParent(javax.swing.text.View)protected int getViewIndexAtPosition(int pos)
getViewIndexAtPosition in class CompositeViewpos - the position>= 0
protected void layout(int width, int height)
width - the width to lay out against>= 0. This is
the width inside of the inset area.height - the height to lay out against>= 0 This
is the height inside of the inset area.protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
calculateMinorAxisRequirements in class BoxViewaxis - the axis being studiedr - the SizeRequirements object;
if null one will be created
SizeRequirements objectjavax.swing.SizeRequirementspublic void insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
insertUpdate in class Viewchanges - the change information from the associated documenta - the current allocation of the viewf - the factory to use to rebuild if the view has childrenView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
removeUpdate in class Viewchanges - the change information from the associated documenta - the current allocation of the viewf - the factory to use to rebuild if the view has childrenView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
changedUpdate in class Viewchanges - the change information from the associated documenta - the current allocation of the viewf - the factory to use to rebuild if the view has childrenView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)