|
|||||||||
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
javax.swing.text.html.ParagraphView
public class ParagraphView
Renders a paragraph in HTML. This is a subclass of
ParagraphView
with some adjustments for
understanding stylesheets.
Nested Class Summary |
---|
Nested classes/interfaces 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 element)
Creates a new ParagraphView for the specified element. |
Method Summary | |
---|---|
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
Calculates the minor axis requirements of this view. |
AttributeSet |
getAttributes()
Returns the attributes used by this view. |
float |
getMaximumSpan(int axis)
Returns the maximum span of this view. |
float |
getMinimumSpan(int axis)
Returns the minimum span of this view. |
float |
getPreferredSpan(int axis)
Returns the preferred span of this view. |
protected StyleSheet |
getStyleSheet()
Returns the stylesheet used by this view. |
boolean |
isVisible()
Determines if this view is visible or not. |
void |
paint(Graphics g,
Shape a)
Paints this view. |
void |
setParent(View parent)
Sets the parent of this view. |
protected void |
setPropertiesFromAttributes()
Loads the visual properties of the ParagraphView from the element's attributes and the stylesheet of the HTML document. |
Methods inherited from class javax.swing.text.ParagraphView |
---|
adjustRow, breakView, changedUpdate, createRow, findOffsetToCharactersInString, getAlignment, getBreakWeight, getClosestPositionTo, getLayoutView, getLayoutViewCount, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent, setJustification, setLineSpacing |
Methods inherited from class javax.swing.text.FlowView |
---|
getFlowAxis, getFlowSpan, getFlowStart, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate |
Methods inherited from class javax.swing.text.BoxView |
---|
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, flipEastAndWestAtEnds, 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, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets |
Methods inherited from class javax.swing.text.View |
---|
append, breakView, createFragment, dump, 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 element)
element
- the elementMethod Detail |
---|
public void setParent(View parent)
setPropertiesFromAttributes()
in
order to load the stylesheet attributes.
setParent
in class CompositeView
parent
- the parent view to setpublic 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 axisr
- the SizeRequirements object to be used as return parameter;
if null
a new one will be created
public boolean isVisible()
isVisible
in class View
public void paint(Graphics g, Shape a)
paint
in class BoxView
g
- the graphics objecta
- the current allocation of this viewpublic float getPreferredSpan(int axis)
0
, otherwise the super class is called.
getPreferredSpan
in class BoxView
axis
- the axis
public float getMinimumSpan(int axis)
0
, otherwise the super class is called.
getMinimumSpan
in class BoxView
axis
- the axis
public float getMaximumSpan(int axis)
0
, otherwise the super class is called.
getMaximumSpan
in class BoxView
axis
- the axis
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |