|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | 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 | +--javax.swing.text.html.ParagraphView
Displays the a paragraph, and uses css attributes for its configuration.
Fields inherited from class javax.swing.text.ParagraphView |
firstLineIndent |
Fields inherited from class javax.swing.text.View |
BadBreakWeight,
ExcellentBreakWeight,
ForcedBreakWeight,
GoodBreakWeight,
X_AXIS,
Y_AXIS |
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. |
void |
changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for. |
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.BoxView |
baselineLayout,
baselineRequirements,
calculateMajorAxisRequirements,
childAllocation,
getChildAllocation,
getHeight,
getOffset,
getResizeWeight,
getSpan,
getViewAtPoint,
getWidth,
isAfter,
isAllocationValid,
isBefore,
layoutMajorAxis,
layoutMinorAxis,
modelToView,
paintChild,
preferenceChanged,
replace,
setSize,
viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
append,
getBottomInset,
getInsideAllocation,
getLeftInset,
getNextEastWestVisualPositionFrom,
getNextVisualPositionFrom,
getRightInset,
getTopInset,
getView,
getViewCount,
insert,
modelToView,
removeAll,
setInsets,
setParagraphInsets |
Methods inherited from class javax.swing.text.View |
breakView,
createFragment,
getBreakWeight,
getContainer,
getDocument,
getElement,
getEndOffset,
getParent,
getStartOffset,
getViewFactory,
modelToView,
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.
parent
- the new parent, or null if the view is
being removed from a parent it was previously added
topublic AttributeSet getAttributes()
public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
e
- 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)
protected void setPropertiesFromAttributes()
protected StyleSheet getStyleSheet()
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
public boolean isVisible()
public void paint(Graphics g, Shape a)
g
- the rendering surface to usea
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
public float getPreferredSpan(int axis)
axis
- may be either View.X_AXIS or View.Y_AXIStext.ParagraphView#getPreferredSpan
public float getMinimumSpan(int axis)
axis
- may be either View.X_AXIS or View.Y_AXIStext.ParagraphView#getMinimumSpan
public float getMaximumSpan(int axis)
axis
- may be either View.X_AXIS or View.Y_AXIStext.ParagraphView#getMaximumSpan
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |