public class ParagraphView extends ParagraphView
ParagraphView
with some adjustments for
understanding stylesheets.FlowView.FlowStrategy
firstLineIndent
layoutPool, layoutSpan, strategy
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
ParagraphView(Element element)
Creates a new ParagraphView for the specified element.
|
Modifier and Type | Method and Description |
---|---|
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.
|
adjustRow, breakView, changedUpdate, createRow, findOffsetToCharactersInString, getAlignment, getBreakWeight, getClosestPositionTo, getLayoutView, getLayoutViewCount, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent, setJustification, setLineSpacing
getFlowAxis, getFlowSpan, getFlowStart, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate
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
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets
append, breakView, createFragment, dump, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
public ParagraphView(Element element)
element
- the elementpublic 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 createdpublic boolean isVisible()
public void paint(Graphics g, Shape a)
public float getPreferredSpan(int axis)
0
, otherwise the super class is called.getPreferredSpan
in class BoxView
axis
- the axispublic float getMinimumSpan(int axis)
0
, otherwise the super class is called.getMinimumSpan
in class BoxView
axis
- the axispublic float getMaximumSpan(int axis)
0
, otherwise the super class is called.getMaximumSpan
in class BoxView
axis
- the axis