|
JavaTM 2 Platform Std. Ed. v1.4.1 |
||||||||||
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.FlowView | +--javax.swing.text.ParagraphView | +--javax.swing.text.html.ParagraphView
Displays the a paragraph, and uses css attributes for its configuration.
Nested Class Summary |
Nested classes inherited from class javax.swing.text.FlowView |
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 | |
ParagraphView(Element elem)
Constructs a ParagraphView for the given element. |
Method Summary | |
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
Calculate the needs for the paragraph along the minor axis. |
AttributeSet |
getAttributes()
Fetches the attributes to use when rendering. |
float |
getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. |
float |
getMinimumSpan(int axis)
Determines the minimum span for this view along an axis. |
float |
getPreferredSpan(int axis)
Determines the preferred span for this view. |
protected StyleSheet |
getStyleSheet()
|
boolean |
isVisible()
Indicates whether or not this view should be displayed. |
void |
paint(Graphics g,
Shape a)
Renders using the given rendering surface and area on that surface. |
void |
setParent(View parent)
Establishes the parent view for this view. |
protected void |
setPropertiesFromAttributes()
Sets up the paragraph from css attributes instead of the values found in StyleConstants (i.e. |
Methods inherited from class javax.swing.text.ParagraphView |
adjustRow, breakView, changedUpdate, createRow, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowSpan, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent, setJustification, setLineSpacing |
Methods inherited from class javax.swing.text.FlowView |
getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate |
Methods inherited from class javax.swing.text.BoxView |
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, 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, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, 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 ParagraphView(Element elem)
elem
- the element that this view is responsible forMethod Detail |
public void setParent(View parent)
This is implemented to forward to the superclass as well as call the setPropertiesFromAttributes method to set the paragraph properties from the css attributes. The call is made at this time to ensure the ability to resolve upward through the parents view attributes.
setParent
in class CompositeView
parent
- the new parent, or null if the view is
being removed from a parent it was previously added
topublic AttributeSet getAttributes()
getAttributes
in class View
protected void setPropertiesFromAttributes()
setPropertiesFromAttributes
in class ParagraphView
protected StyleSheet getStyleSheet()
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
calculateMinorAxisRequirements
in class FlowView
axis
- the axis being studiedr
- the SizeRequirements
object;
if null
one will be created
SizeRequirements
objectSizeRequirements
public boolean isVisible()
isVisible
in class View
public void paint(Graphics g, Shape a)
paint
in class ParagraphView
g
- the rendering surface to usea
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
public float getPreferredSpan(int axis)
getPreferredSpan
in class BoxView
axis
- may be either View.X_AXIS or View.Y_AXIS
BoxView.getPreferredSpan(int)
public float getMinimumSpan(int axis)
getMinimumSpan
in class BoxView
axis
- may be either View.X_AXIS
or
View.Y_AXIS
BoxView.getMinimumSpan(int)
public float getMaximumSpan(int axis)
getMaximumSpan
in class BoxView
axis
- may be either View.X_AXIS
or
View.Y_AXIS
BoxView.getMaximumSpan(int)
|
JavaTM 2 Platform Std. Ed. v1.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.