|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.View javax.swing.text.CompositeView javax.swing.text.BoxView javax.swing.text.ParagraphView.Row
Internally created view that has the purpose of holding the views that represent the children of the paragraph that have been arranged in rows.
Field Summary |
Fields inherited from class javax.swing.text.BoxView |
majorAllocValid, majorAxis, majorOffsets, majorRequest, majorReqValid, majorSpan, majorSpans, minorAllocValid, minorOffsets, minorRequest, minorReqValid, minorSpan, minorSpans, tempRect |
Fields inherited from class javax.swing.text.CompositeView |
|
Fields inherited from class javax.swing.text.View |
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, sharedBiasReturn, X_AXIS, Y_AXIS |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
(package private) |
ParagraphView.Row(Element elem)
|
Method Summary | |
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
Calculates the size requirements for the minor axis axis . |
float |
getAlignment(int axis)
Determines the desired alignment for this view along an axis. |
AttributeSet |
getAttributes()
Fetches the attributes to use when rendering. |
protected short |
getBottomInset()
Gets the bottom inset. |
int |
getEndOffset()
Fetches the portion of the model for which this view is responsible. |
protected short |
getLeftInset()
Gets the left inset. |
int |
getStartOffset()
Range represented by a row in the paragraph is only a subset of the total range of the paragraph element. |
protected int |
getViewIndexAtPosition(int pos)
Fetches the child view index representing the given position in the model. |
protected void |
layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents). |
protected void |
loadChildren(ViewFactory f)
This is reimplemented to do nothing since the paragraph fills in the row with its needed children. |
Shape |
modelToView(int pos,
Shape a,
Position.Bias b)
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
Methods inherited from class javax.swing.text.BoxView |
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, checkRequests, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getSpanOnAxis, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, paint, paintChild, preferenceChanged, replace, setAxis, setSize, setSpanOnAxis, updateChildSizes, updateLayoutArray, viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
getInsideAllocation, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent |
Methods inherited from class javax.swing.text.View |
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getGraphics, getParent, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
ParagraphView.Row(Element elem)
Method Detail |
protected void loadChildren(ViewFactory f)
loadChildren
in class CompositeView
f
- the view factoryCompositeView.setParent(javax.swing.text.View)
public AttributeSet getAttributes()
getAttributes
in class View
public float getAlignment(int axis)
BoxView
getAlignment
in class BoxView
axis
- may be either View.X_AXIS
or View.Y_AXIS
public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
modelToView
in class BoxView
pos
- the position to converta
- the allocated region to render into
BadLocationException
- if the given position does not represent a
valid location in the associated documentView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public int getStartOffset()
getStartOffset
in class View
View#getRange
public int getEndOffset()
View
getEndOffset
in class View
View.getEndOffset()
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
This is implemented to do a baseline layout of the children by calling BoxView.baselineLayout.
layoutMinorAxis
in class BoxView
targetSpan
- the total span given to the view, which
whould be used to layout the children.axis
- the axis being layed out.offsets
- the offsets from the origin of the view for
each of the child views. This is a return value and is
filled in by the implementation of this method.spans
- the span of each child view. This is a return
value and is filled in by the implementation of this method.
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
BoxView
axis
.
calculateMinorAxisRequirements
in class BoxView
axis
- the axis being studiedr
- the SizeRequirements
object;
if null
one will be created
SizeRequirements
objectSizeRequirements
protected int getViewIndexAtPosition(int pos)
getViewIndexAtPosition
in class CompositeView
pos
- the position >= 0
protected short getLeftInset()
getLeftInset
in class CompositeView
protected short getBottomInset()
CompositeView
getBottomInset
in class CompositeView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |