public class ParagraphView extends ParagraphView
ParagraphView with some adjustments for
understanding stylesheets.FlowView.FlowStrategyfirstLineIndentlayoutPool, layoutSpan, strategyBadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISBOTTOM, 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, setLineSpacinggetFlowAxis, getFlowSpan, getFlowStart, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdatebaselineLayout, 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, viewToModelgetBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsetsappend, breakView, createFragment, dump, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModelpublic ParagraphView(Element element)
element - the elementpublic void setParent(View parent)
setPropertiesFromAttributes() in
order to load the stylesheet attributes.setParent in class CompositeViewparent - the parent view to setpublic AttributeSet getAttributes()
getAttributes in class Viewprotected void setPropertiesFromAttributes()
setPropertiesFromAttributes in class ParagraphViewprotected StyleSheet getStyleSheet()
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
calculateMinorAxisRequirements in class FlowViewaxis - 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 BoxViewaxis - the axispublic float getMinimumSpan(int axis)
0, otherwise the super class is called.getMinimumSpan in class BoxViewaxis - the axispublic float getMaximumSpan(int axis)
0, otherwise the super class is called.getMaximumSpan in class BoxViewaxis - the axis