sferyx.administration.renderers
Class CustomLayoutBoxView

java.lang.Object
  extended by javax.swing.text.View
      extended by javax.swing.text.CompositeView
          extended by javax.swing.text.BoxView
              extended by javax.swing.text.html.BlockView
                  extended by sferyx.administration.renderers.CustomLayoutBoxView
All Implemented Interfaces:
javax.swing.SwingConstants, CSSLayoutViews
Direct Known Subclasses:
CustomBlockView, CustomBlockXMLTagView, CustomTableCelView

public class CustomLayoutBoxView
extends javax.swing.text.html.BlockView
implements CSSLayoutViews

CustomBlockView, could be used to personalize the xml tags.


Field Summary
 
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
CustomLayoutBoxView(javax.swing.text.Element elem, int axis)
          Creates a new instance of CustomBlockView
 
Method Summary
protected  void adjustAllParagraphsLayout(int targetSpan, int[] offsets, int[] spans)
           
protected  void adjustParagraphLayout(javax.swing.text.View parentView, int myIndex, int targetSpan, int[] offsets, int[] spans, javax.swing.text.View thisView)
           
protected  javax.swing.SizeRequirements calculateMajorAxisRequirements(int axis, javax.swing.SizeRequirements r)
           
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)
           
protected  void childAllocation(int index, java.awt.Rectangle alloc)
           
protected  void forwardUpdate(javax.swing.event.DocumentEvent.ElementChange ec, javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
           
 int getAbsoluteX_()
           
 int getAbsoluteX()
           
 int getAbsoluteY_()
           
 int getAbsoluteY()
           
 float getAlignment(int axis)
           
 javax.swing.text.AttributeSet getAttributes()
           
 short getBottomInset()
           
 int getBottomMargin()
           
 int getBottomPadding()
           
 java.awt.Shape getChildAllocation(int index, java.awt.Shape a)
           
 float getFloatingChildrenSpan(int axis)
           
 float getHeightCSSValue_()
           
 float getHeightCSSValue()
           
protected  java.awt.Rectangle getInsideAllocation(java.awt.Shape a)
           
 short getLeftInset()
           
 int getLeftMargin()
           
 int getLeftPadding()
           
 int getLeftRightBorderInset()
           
 float getMaximumSpan(int axis)
           
 float getMaxWidthCSSValue()
           
 float getMinimumSpan(int axis)
           
 float getMinWidthCSSValue()
           
 int getMyIndex()
           
 int getMyOffset()
           
 int getNextVisualPositionFrom(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)
           
 int getResizeWeight(int axis)
           
 short getRightInset()
           
 int getRightMargin()
           
 int getRightPadding()
           
 int getSpan(int axis, int childIndex)
           
 javax.swing.text.html.StyleSheet getStyleSheet()
           
 float getSuperPreferredSpan(int axis)
           
 int getTopBottomBorderInset()
           
 short getTopInset()
           
 int getTopMargin()
           
 int getTopPadding()
           
 javax.swing.text.View getView(int n)
           
protected  javax.swing.text.View getViewAtPoint(int x, int y, java.awt.Rectangle alloc)
           
protected  javax.swing.text.View getViewAtPointNormal(int x, int y, java.awt.Rectangle alloc)
           
 int getWidth()
           
 float getWidthCSSValue_()
           
 float getWidthCSSValue()
           
 void insertUpdate(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
           
 boolean isAbsolutePositioning()
           
 boolean isRelativePositioning()
           
 boolean isVisible()
           
protected  void layout(int width, int height)
           
 void layoutChanged(int axis)
           
protected  void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
           
protected  void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
           
protected  void layoutSuperMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans, int i, javax.swing.text.View v, int totalOffset)
           
protected  void loadChildren_(javax.swing.text.ViewFactory f)
           
protected  void loadChildren(javax.swing.text.ViewFactory f)
           
 java.awt.Shape modelToView(int pos, java.awt.Shape a, javax.swing.text.Position.Bias b)
           
 void paint(java.awt.Graphics g, java.awt.Shape allocation)
           
 void paintThisViewOnly(java.awt.Graphics g, java.awt.Shape allocation)
           
 void removeUpdate(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
           
protected  void replace_(int i, int e, javax.swing.text.View[] added)
           
 void setInsets(short top, short left, short bottom, short right)
           
 void setParent(javax.swing.text.View parent)
           
protected  void setPropertiesFromAttributes()
           
 void setSize(float width, float height)
           
protected  void updateLayout(javax.swing.event.DocumentEvent.ElementChange ec, javax.swing.event.DocumentEvent e, java.awt.Shape a)
           
 int viewToModel(float x, float y, java.awt.Shape a, javax.swing.text.Position.Bias[] bias)
           
 
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, flipEastAndWestAtEnds, getAxis, getHeight, isAfter, isAllocationValid, isBefore, isLayoutValid, paintChild, preferenceChanged, replace, setAxis
 
Methods inherited from class javax.swing.text.CompositeView
getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, modelToView, setParagraphInsets
 
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
 

Constructor Detail

CustomLayoutBoxView

public CustomLayoutBoxView(javax.swing.text.Element elem,
                           int axis)
Creates a new instance of CustomBlockView

Method Detail

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.html.BlockView

forwardUpdate

protected void forwardUpdate(javax.swing.event.DocumentEvent.ElementChange ec,
                             javax.swing.event.DocumentEvent e,
                             java.awt.Shape a,
                             javax.swing.text.ViewFactory f)
Overrides:
forwardUpdate in class javax.swing.text.BoxView

getAttributes

public javax.swing.text.AttributeSet getAttributes()
Overrides:
getAttributes in class javax.swing.text.html.BlockView

getStyleSheet

public javax.swing.text.html.StyleSheet getStyleSheet()
Overrides:
getStyleSheet in class javax.swing.text.html.BlockView

getView

public javax.swing.text.View getView(int n)
Overrides:
getView in class javax.swing.text.CompositeView

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

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()

getLeftRightBorderInset

public int getLeftRightBorderInset()

getTopBottomBorderInset

public int getTopBottomBorderInset()

getLeftInset

public short getLeftInset()
Overrides:
getLeftInset in class javax.swing.text.CompositeView

getRightInset

public short getRightInset()
Overrides:
getRightInset in class javax.swing.text.CompositeView

getTopInset

public short getTopInset()
Overrides:
getTopInset in class javax.swing.text.CompositeView

getBottomInset

public short getBottomInset()
Overrides:
getBottomInset in class javax.swing.text.CompositeView

setInsets

public void setInsets(short top,
                      short left,
                      short bottom,
                      short right)
Overrides:
setInsets in class javax.swing.text.CompositeView

getMyIndex

public int getMyIndex()

loadChildren_

protected void loadChildren_(javax.swing.text.ViewFactory f)

replace_

protected void replace_(int i,
                        int e,
                        javax.swing.text.View[] added)

loadChildren

protected void loadChildren(javax.swing.text.ViewFactory f)
Overrides:
loadChildren in class javax.swing.text.CompositeView

getInsideAllocation

protected java.awt.Rectangle getInsideAllocation(java.awt.Shape a)
Overrides:
getInsideAllocation in class javax.swing.text.CompositeView

layoutMinorAxis

protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Overrides:
layoutMinorAxis in class javax.swing.text.html.BlockView

adjustAllParagraphsLayout

protected void adjustAllParagraphsLayout(int targetSpan,
                                         int[] offsets,
                                         int[] spans)

adjustParagraphLayout

protected void adjustParagraphLayout(javax.swing.text.View parentView,
                                     int myIndex,
                                     int targetSpan,
                                     int[] offsets,
                                     int[] spans,
                                     javax.swing.text.View thisView)

getResizeWeight

public int getResizeWeight(int axis)
Overrides:
getResizeWeight in class javax.swing.text.html.BlockView

getAlignment

public float getAlignment(int axis)
Overrides:
getAlignment in class javax.swing.text.html.BlockView

layoutSuperMajorAxis

protected void layoutSuperMajorAxis(int targetSpan,
                                    int axis,
                                    int[] offsets,
                                    int[] spans,
                                    int i,
                                    javax.swing.text.View v,
                                    int totalOffset)

layoutMajorAxis

protected void layoutMajorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Overrides:
layoutMajorAxis in class javax.swing.text.BoxView

getHeightCSSValue_

public float getHeightCSSValue_()

getWidth

public int getWidth()
Overrides:
getWidth in class javax.swing.text.BoxView

getWidthCSSValue

public float getWidthCSSValue()

getHeightCSSValue

public float getHeightCSSValue()

getWidthCSSValue_

public float getWidthCSSValue_()

getMaxWidthCSSValue

public float getMaxWidthCSSValue()

getMinWidthCSSValue

public float getMinWidthCSSValue()

getFloatingChildrenSpan

public float getFloatingChildrenSpan(int axis)

getViewAtPoint

protected javax.swing.text.View getViewAtPoint(int x,
                                               int y,
                                               java.awt.Rectangle alloc)
Overrides:
getViewAtPoint in class javax.swing.text.BoxView

getViewAtPointNormal

protected javax.swing.text.View getViewAtPointNormal(int x,
                                                     int y,
                                                     java.awt.Rectangle alloc)

getMyOffset

public int getMyOffset()

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

getAbsoluteX_

public int getAbsoluteX_()

getAbsoluteY

public int getAbsoluteY()
Specified by:
getAbsoluteY in interface CSSLayoutViews

getAbsoluteY_

public int getAbsoluteY_()

paintThisViewOnly

public void paintThisViewOnly(java.awt.Graphics g,
                              java.awt.Shape allocation)

modelToView

public java.awt.Shape modelToView(int pos,
                                  java.awt.Shape a,
                                  javax.swing.text.Position.Bias b)
                           throws javax.swing.text.BadLocationException
Overrides:
modelToView in class javax.swing.text.BoxView
Throws:
javax.swing.text.BadLocationException

paint

public void paint(java.awt.Graphics g,
                  java.awt.Shape allocation)
Overrides:
paint in class javax.swing.text.html.BlockView

getNextVisualPositionFrom

public int getNextVisualPositionFrom(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:
getNextVisualPositionFrom in class javax.swing.text.CompositeView
Throws:
javax.swing.text.BadLocationException

childAllocation

protected void childAllocation(int index,
                               java.awt.Rectangle alloc)
Overrides:
childAllocation in class javax.swing.text.BoxView

getChildAllocation

public java.awt.Shape getChildAllocation(int index,
                                         java.awt.Shape a)
Overrides:
getChildAllocation in class javax.swing.text.BoxView

isVisible

public boolean isVisible()
Overrides:
isVisible in class javax.swing.text.View

viewToModel

public int viewToModel(float x,
                       float y,
                       java.awt.Shape a,
                       javax.swing.text.Position.Bias[] bias)
Overrides:
viewToModel in class javax.swing.text.BoxView

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.View

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.View

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

getMaximumSpan

public float getMaximumSpan(int axis)
Overrides:
getMaximumSpan in class javax.swing.text.html.BlockView

getSuperPreferredSpan

public float getSuperPreferredSpan(int axis)

getPreferredSpan

public float getPreferredSpan(int axis)
Overrides:
getPreferredSpan in class javax.swing.text.html.BlockView

getMinimumSpan

public float getMinimumSpan(int axis)
Overrides:
getMinimumSpan in class javax.swing.text.html.BlockView

layoutChanged

public void layoutChanged(int axis)
Overrides:
layoutChanged in class javax.swing.text.BoxView

layout

protected void layout(int width,
                      int height)
Overrides:
layout in class javax.swing.text.BoxView

setParent

public void setParent(javax.swing.text.View parent)
Overrides:
setParent in class javax.swing.text.html.BlockView

setSize

public void setSize(float width,
                    float height)
Overrides:
setSize in class javax.swing.text.BoxView

calculateMajorAxisRequirements

protected javax.swing.SizeRequirements calculateMajorAxisRequirements(int axis,
                                                                      javax.swing.SizeRequirements r)
Overrides:
calculateMajorAxisRequirements in class javax.swing.text.html.BlockView

calculateMinorAxisRequirements

protected javax.swing.SizeRequirements calculateMinorAxisRequirements(int axis,
                                                                      javax.swing.SizeRequirements r)
Overrides:
calculateMinorAxisRequirements in class javax.swing.text.html.BlockView

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Overrides:
setPropertiesFromAttributes in class javax.swing.text.html.BlockView