|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.FlowView
javax.swing.text.ParagraphView
edu.northwestern.at.utils.swing.JustifiableTextParagraphView
public class JustifiableTextParagraphView
A paragraph view for styled text which can contain fully justified lines of text.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.text.FlowView |
|---|
javax.swing.text.FlowView.FlowStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.text.ParagraphView |
|---|
firstLineIndent |
| Fields inherited from class javax.swing.text.FlowView |
|---|
layoutPool, layoutSpan, strategy |
| Fields inherited from class javax.swing.text.View |
|---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, 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 | |
|---|---|
JustifiableTextParagraphView(javax.swing.text.Element elem)
Create a JustifiableParagraphView for a paragraph element. |
|
| Method Summary | |
|---|---|
protected javax.swing.text.View |
createRow()
Create a JustifiedTextRowView to hold a
a row's worth of children in a flow. |
int |
getFlowSpan(int index)
Fetch the constraining span to flow against for the given child index. |
protected void |
layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
Perform layout for the minor axis of the box. |
| Methods inherited from class javax.swing.text.ParagraphView |
|---|
adjustRow, breakView, changedUpdate, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, paint, setFirstLineIndent, setJustification, setLineSpacing, setPropertiesFromAttributes |
| Methods inherited from class javax.swing.text.FlowView |
|---|
calculateMinorAxisRequirements, getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate, setParent |
| Methods inherited from class javax.swing.text.BoxView |
|---|
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel |
| Methods inherited from class javax.swing.text.CompositeView |
|---|
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets |
| Methods inherited from class javax.swing.text.View |
|---|
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JustifiableTextParagraphView(javax.swing.text.Element elem)
elem - The paragraph text element.
JustifiableTextFlowStrategy is used as the
flow strategy. Each line of text in the paragraph
is stored in a JustifiedTextRowView.
| Method Detail |
|---|
protected javax.swing.text.View createRow()
JustifiedTextRowView to hold a
a row's worth of children in a flow.
createRow in class javax.swing.text.ParagraphViewJustifiedTextRowView. public int getFlowSpan(int index)
getFlowSpan in class javax.swing.text.ParagraphViewindex - The index of the view being queried.
index.
protected void layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
This is the same as the layout for a standard paragraph view except that we honor the first line indent attributed.
layoutMinorAxis in class javax.swing.text.BoxViewtargetSpan - The total span given to the view, which
should 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 here.spans - The span of each child view.
This is a return
value and is filled in here.
The offset and span for each child view is stored in the offsets and spans parameters.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||