sferyx.administration.renderers
Class CustomParagraphView
java.lang.Object
javax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.FlowView
javax.swing.text.ParagraphView
javax.swing.text.html.ParagraphView
sferyx.administration.renderers.CustomParagraphView
- All Implemented Interfaces:
- javax.swing.SwingConstants, javax.swing.text.TabExpander, CSSLayoutViews
public class CustomParagraphView
- extends javax.swing.text.html.ParagraphView
- implements CSSLayoutViews
Improved/customized rendering for paragraphs.
Nested classes/interfaces inherited from class javax.swing.text.FlowView |
javax.swing.text.FlowView.FlowStrategy |
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 |
CustomParagraphView(javax.swing.text.Element elem)
Creates a new instance of CustomParagraphView |
Method Summary |
protected void |
adjustChildParagraphsLayout(javax.swing.text.View parentView,
int targetSpan)
|
void |
adjustChildRowsLayout()
|
void |
adjustChildRowsLayout(int index)
|
void |
adjustChildRowsLayout(int index,
int[] offsets,
int[] spans)
|
void |
adjustChildRowsLayoutForAllInferiorRows(int index)
|
void |
adjustChildRowsLayoutForAllRows()
|
void |
adjustChildRowsLayoutForAllSuperiorRows(int index)
|
protected void |
adjustParagraphLayout(javax.swing.text.View parentView,
int myIndex,
int targetSpan,
int[] offsets,
int[] spans)
|
protected void |
baselineLayout(int targetSpan,
int axis,
int[] offsets,
int[] spans)
|
protected javax.swing.SizeRequirements |
calculateMinorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
|
void |
changedUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
javax.swing.text.View |
createRow()
|
javax.swing.text.View |
findImageChildView()
|
int |
getAbsoluteX()
|
int |
getAbsoluteY()
|
javax.swing.text.AttributeSet |
getAttributes()
|
protected short |
getBottomInset()
|
int |
getBottomMargin()
|
int |
getBottomPadding()
|
java.awt.Shape |
getChildAllocation(int index,
java.awt.Shape a)
|
int |
getFlowSpan(int index)
|
float |
getHeightCSSValue()
|
int |
getInternalVerticalSpan()
|
float |
getJustification()
|
javax.swing.text.View |
getLayoutPool()
|
short |
getLeftInset()
|
int |
getLeftMargin()
|
int |
getLeftPadding()
|
int |
getLeftRightBorderInset()
|
float |
getMaximumSpan(int axis)
|
float |
getMinimumSpan(int axis)
|
float |
getMinimumSpan1(int axis)
|
int |
getMyIndex()
|
int |
getMyOffset()
|
int |
getMyOffset1()
|
protected int |
getNextEastWestVisualPositionFrom(int pos,
javax.swing.text.Position.Bias b,
java.awt.Shape a,
int direction,
javax.swing.text.Position.Bias[] biasRet)
|
int |
getOffset(int axis,
int childIndex)
|
float |
getPreferredSpan(int axis)
|
short |
getRightInset()
|
int |
getRightMargin()
|
int |
getRightPadding()
|
int |
getSpan(int axis,
int childIndex)
|
short |
getSuperBottomInset()
|
short |
getSuperLeftInset()
|
short |
getSuperRightInset()
|
short |
getSuperTopInset()
|
int |
getTopBottomBorderInset()
|
protected short |
getTopInset()
|
int |
getTopMargin()
|
int |
getTopPadding()
|
javax.swing.text.View |
getViewAtPoint(int x,
int y,
java.awt.Rectangle alloc)
|
float |
getWidthCSSValue()
|
int |
indexOfView(javax.swing.text.View v)
|
void |
insertUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
boolean |
isAbsolutePositioning()
|
boolean |
isLeftAlignedView(javax.swing.text.View view)
|
boolean |
isRelativePositioning()
|
boolean |
isRightAlignedView(javax.swing.text.View view)
|
boolean |
isVisible()
|
protected void |
layout(int width,
int height)
|
protected void |
layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
|
protected void |
layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
|
protected void |
loadChildren(javax.swing.text.ViewFactory f)
|
void |
paint(java.awt.Graphics g,
java.awt.Shape allocation)
|
void |
removeUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
void |
setInsets(short top,
short left,
short bottom,
short right)
|
protected void |
setJustification(int j)
|
void |
setLeftInsetAndUpdate(short leftInset)
|
protected void |
setLineSpacing(float ls)
|
protected void |
setParagraphInsets(javax.swing.text.AttributeSet attr)
|
void |
setParent(javax.swing.text.View parent)
|
protected void |
setPropertiesFromAttributes()
|
void |
setRightInsetAndUpdate(short rightInset)
|
protected void |
updateLayout(javax.swing.event.DocumentEvent.ElementChange ec,
javax.swing.event.DocumentEvent e,
java.awt.Shape a)
|
Methods inherited from class javax.swing.text.html.ParagraphView |
getStyleSheet |
Methods inherited from class javax.swing.text.ParagraphView |
adjustRow, breakView, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent |
Methods inherited from class javax.swing.text.FlowView |
getFlowAxis, getViewIndexAtPosition |
Methods inherited from class javax.swing.text.BoxView |
baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getHeight, getResizeWeight, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
getInsideAllocation, getNextVisualPositionFrom, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView |
Methods inherited from class javax.swing.text.View |
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, modelToView, remove, removeAll, updateChildren, viewToModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
targetSpanX
public int targetSpanX
CustomParagraphView
public CustomParagraphView(javax.swing.text.Element elem)
- Creates a new instance of CustomParagraphView
setPropertiesFromAttributes
protected void setPropertiesFromAttributes()
- Overrides:
setPropertiesFromAttributes
in class javax.swing.text.html.ParagraphView
setParagraphInsets
protected void setParagraphInsets(javax.swing.text.AttributeSet attr)
- Overrides:
setParagraphInsets
in class javax.swing.text.CompositeView
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
- Overrides:
changedUpdate
in class javax.swing.text.ParagraphView
getAttributes
public javax.swing.text.AttributeSet getAttributes()
- Overrides:
getAttributes
in class javax.swing.text.html.ParagraphView
isAbsolutePositioning
public boolean isAbsolutePositioning()
- Specified by:
isAbsolutePositioning
in interface CSSLayoutViews
isRelativePositioning
public boolean isRelativePositioning()
- Specified by:
isRelativePositioning
in interface CSSLayoutViews
getAbsoluteX
public int getAbsoluteX()
- Specified by:
getAbsoluteX
in interface CSSLayoutViews
getAbsoluteY
public int getAbsoluteY()
- Specified by:
getAbsoluteY
in interface CSSLayoutViews
isVisible
public boolean isVisible()
- Overrides:
isVisible
in class javax.swing.text.html.ParagraphView
setParent
public void setParent(javax.swing.text.View parent)
- Overrides:
setParent
in class javax.swing.text.html.ParagraphView
getRightMargin
public int getRightMargin()
- Specified by:
getRightMargin
in interface CSSLayoutViews
getLeftMargin
public int getLeftMargin()
- Specified by:
getLeftMargin
in interface CSSLayoutViews
getTopMargin
public int getTopMargin()
- Specified by:
getTopMargin
in interface CSSLayoutViews
getBottomMargin
public int getBottomMargin()
- Specified by:
getBottomMargin
in interface CSSLayoutViews
getRightPadding
public int getRightPadding()
getLeftPadding
public int getLeftPadding()
getTopPadding
public int getTopPadding()
getBottomPadding
public int getBottomPadding()
getViewAtPoint
public javax.swing.text.View getViewAtPoint(int x,
int y,
java.awt.Rectangle alloc)
- Overrides:
getViewAtPoint
in class javax.swing.text.BoxView
getOffset
public int getOffset(int axis,
int childIndex)
- Overrides:
getOffset
in class javax.swing.text.BoxView
getSpan
public int getSpan(int axis,
int childIndex)
- Overrides:
getSpan
in class javax.swing.text.BoxView
paint
public void paint(java.awt.Graphics g,
java.awt.Shape allocation)
- Overrides:
paint
in class javax.swing.text.html.ParagraphView
createRow
public javax.swing.text.View createRow()
- Overrides:
createRow
in class javax.swing.text.ParagraphView
getChildAllocation
public java.awt.Shape getChildAllocation(int index,
java.awt.Shape a)
- Overrides:
getChildAllocation
in class javax.swing.text.BoxView
findImageChildView
public javax.swing.text.View findImageChildView()
setLeftInsetAndUpdate
public void setLeftInsetAndUpdate(short leftInset)
setRightInsetAndUpdate
public void setRightInsetAndUpdate(short rightInset)
getTopInset
protected short getTopInset()
- Overrides:
getTopInset
in class javax.swing.text.CompositeView
getBottomInset
protected short getBottomInset()
- Overrides:
getBottomInset
in class javax.swing.text.CompositeView
updateLayout
protected void updateLayout(javax.swing.event.DocumentEvent.ElementChange ec,
javax.swing.event.DocumentEvent e,
java.awt.Shape a)
- Overrides:
updateLayout
in class javax.swing.text.View
getLeftInset
public short getLeftInset()
- Overrides:
getLeftInset
in class javax.swing.text.CompositeView
getRightInset
public short getRightInset()
- Overrides:
getRightInset
in class javax.swing.text.CompositeView
indexOfView
public int indexOfView(javax.swing.text.View v)
getSuperLeftInset
public short getSuperLeftInset()
getSuperRightInset
public short getSuperRightInset()
getSuperTopInset
public short getSuperTopInset()
getSuperBottomInset
public short getSuperBottomInset()
setInsets
public void setInsets(short top,
short left,
short bottom,
short right)
- Overrides:
setInsets
in class javax.swing.text.CompositeView
adjustParagraphLayout
protected void adjustParagraphLayout(javax.swing.text.View parentView,
int myIndex,
int targetSpan,
int[] offsets,
int[] spans)
adjustChildParagraphsLayout
protected void adjustChildParagraphsLayout(javax.swing.text.View parentView,
int targetSpan)
adjustChildRowsLayout
public void adjustChildRowsLayout(int index,
int[] offsets,
int[] spans)
adjustChildRowsLayout
public void adjustChildRowsLayout()
adjustChildRowsLayoutForAllRows
public void adjustChildRowsLayoutForAllRows()
adjustChildRowsLayoutForAllSuperiorRows
public void adjustChildRowsLayoutForAllSuperiorRows(int index)
adjustChildRowsLayoutForAllInferiorRows
public void adjustChildRowsLayoutForAllInferiorRows(int index)
adjustChildRowsLayout
public void adjustChildRowsLayout(int index)
getInternalVerticalSpan
public int getInternalVerticalSpan()
getMyIndex
public int getMyIndex()
getMyOffset
public int getMyOffset()
getMyOffset1
public int getMyOffset1()
getHeightCSSValue
public float getHeightCSSValue()
getWidthCSSValue
public float getWidthCSSValue()
getTopBottomBorderInset
public int getTopBottomBorderInset()
getLeftRightBorderInset
public int getLeftRightBorderInset()
getMaximumSpan
public float getMaximumSpan(int axis)
- Overrides:
getMaximumSpan
in class javax.swing.text.html.ParagraphView
getMinimumSpan
public float getMinimumSpan(int axis)
- Overrides:
getMinimumSpan
in class javax.swing.text.html.ParagraphView
getPreferredSpan
public float getPreferredSpan(int axis)
- Overrides:
getPreferredSpan
in class javax.swing.text.html.ParagraphView
getMinimumSpan1
public float getMinimumSpan1(int axis)
insertUpdate
public void insertUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
- Overrides:
insertUpdate
in class javax.swing.text.FlowView
removeUpdate
public void removeUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
- Overrides:
removeUpdate
in class javax.swing.text.FlowView
getFlowSpan
public int getFlowSpan(int index)
- Overrides:
getFlowSpan
in class javax.swing.text.ParagraphView
layoutMinorAxis
protected void layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
- Overrides:
layoutMinorAxis
in class javax.swing.text.BoxView
getNextEastWestVisualPositionFrom
protected int getNextEastWestVisualPositionFrom(int pos,
javax.swing.text.Position.Bias b,
java.awt.Shape a,
int direction,
javax.swing.text.Position.Bias[] biasRet)
throws javax.swing.text.BadLocationException
- Overrides:
getNextEastWestVisualPositionFrom
in class javax.swing.text.CompositeView
- Throws:
javax.swing.text.BadLocationException
baselineLayout
protected void baselineLayout(int targetSpan,
int axis,
int[] offsets,
int[] spans)
- Overrides:
baselineLayout
in class javax.swing.text.BoxView
calculateMinorAxisRequirements
protected javax.swing.SizeRequirements calculateMinorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
- Overrides:
calculateMinorAxisRequirements
in class javax.swing.text.html.ParagraphView
loadChildren
protected void loadChildren(javax.swing.text.ViewFactory f)
- Overrides:
loadChildren
in class javax.swing.text.FlowView
layout
protected void layout(int width,
int height)
- Overrides:
layout
in class javax.swing.text.FlowView
layoutMajorAxis
protected void layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
- Overrides:
layoutMajorAxis
in class javax.swing.text.BoxView
setLineSpacing
protected void setLineSpacing(float ls)
- Overrides:
setLineSpacing
in class javax.swing.text.ParagraphView
setJustification
protected void setJustification(int j)
- Overrides:
setJustification
in class javax.swing.text.ParagraphView
getJustification
public float getJustification()
isLeftAlignedView
public boolean isLeftAlignedView(javax.swing.text.View view)
isRightAlignedView
public boolean isRightAlignedView(javax.swing.text.View view)
getLayoutPool
public javax.swing.text.View getLayoutPool()