public class ParagraphView extends javax.swing.text.ParagraphView
ParagraphView with some adjustments for
understanding stylesheets.| Constructor and Description |
|---|
ParagraphView(javax.swing.text.Element element)
Creates a new ParagraphView for the specified element.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.SizeRequirements |
calculateMinorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
Calculates the minor axis requirements of this view.
|
javax.swing.text.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(java.awt.Graphics g,
java.awt.Shape a)
Paints this view.
|
void |
setParent(javax.swing.text.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(javax.swing.text.Element element)
element - the elementpublic void setParent(javax.swing.text.View parent)
setPropertiesFromAttributes() in
order to load the stylesheet attributes.setParent in class javax.swing.text.CompositeViewparent - the parent view to setpublic javax.swing.text.AttributeSet getAttributes()
getAttributes in class javax.swing.text.Viewprotected void setPropertiesFromAttributes()
setPropertiesFromAttributes in class javax.swing.text.ParagraphViewprotected StyleSheet getStyleSheet()
protected javax.swing.SizeRequirements calculateMinorAxisRequirements(int axis, javax.swing.SizeRequirements r)
calculateMinorAxisRequirements in class javax.swing.text.FlowViewaxis - the axisr - the SizeRequirements object to be used as return parameter;
if null a new one will be createdpublic boolean isVisible()
isVisible in class javax.swing.text.Viewpublic void paint(java.awt.Graphics g, java.awt.Shape a)
paint in class javax.swing.text.BoxViewg - the graphics objecta - the current allocation of this viewpublic float getPreferredSpan(int axis)
0, otherwise the super class is called.getPreferredSpan in class javax.swing.text.BoxViewaxis - the axispublic float getMinimumSpan(int axis)
0, otherwise the super class is called.getMinimumSpan in class javax.swing.text.BoxViewaxis - the axispublic float getMaximumSpan(int axis)
0, otherwise the super class is called.getMaximumSpan in class javax.swing.text.BoxViewaxis - the axis