com.inet.html.views
Class TableBoxPainter

java.lang.Object
  extended by com.inet.html.views.BackgroundPainter
      extended by com.inet.html.views.BoxPainter
          extended by com.inet.html.views.TableBoxPainter
All Implemented Interfaces:
IBackgroundPainter, IBoxPainter

public class TableBoxPainter
extends BoxPainter

This is a modification of the normal box painter. It has to be used for table with collapsing borders to draw borders outside the cell.


Field Summary
 
Fields inherited from interface com.inet.html.views.IBoxPainter
EMPTY_INSETS, PAINT_MODE_CENTER, PAINT_MODE_LEFTEDGE, PAINT_MODE_NORMAL, PAINT_MODE_RIGHTEDGE
 
Constructor Summary
TableBoxPainter(BoxView view)
          Creates table box a painter for the given table cell view
 
Method Summary
 java.awt.Insets getPaddingDefined()
          Flags which of the padding sides are defined by css and which may be set by the table.
 java.awt.Insets getPaintInsets()
          Returns the paint insets of the table box
 void paint(java.awt.Graphics g, int x, int y, int width, int height, int paintMode, BoxView paintRef)
          This method is overridden to do nothing.
 void paintBorders(java.awt.Graphics g, int x, int y, int width, int height)
          Paints ONLY the Borders of this box.
 void setCollapseMode(boolean isCollapseMode)
          Set whether border-collapse is enabled
 
Methods inherited from class com.inet.html.views.BoxPainter
createBoxPainter, createBoxPainter, createBoxPainter, getBorderBottomColor, getBorderInsets, getBorderLeftColor, getBorderRightColor, getBorderStyles, getBorderTopColor, getBottomBorderPadding, getLeftBorderPadding, getMargins, getPadding, getRightBorderPadding, getTopBorderPadding, getTotalHeightGain, getTotalLeftGain, getTotalTopGain, getTotalWidthGain, getView, isRelevant, paint, setBorderBottomColor, setBorderInsets, setBorderInsets, setBorderLeftColor, setBorderRightColor, setBorderStyles, setBorderStyles, setBorderTopColor, setMargins, setMargins, setPadding, setPadding, updateRelativeValues, updateRelevance
 
Methods inherited from class com.inet.html.views.BackgroundPainter
getBackgroundValue, getElement, getLastPaint, getReferenceView, isInitDone, paintBackground, setBackgroundValue, setInitDone, setLastPaint, setReferenceView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.inet.html.views.IBackgroundPainter
getBackgroundValue, getElement, getLastPaint, getReferenceView, isInitDone, paintBackground, setBackgroundValue, setInitDone, setLastPaint, setReferenceView
 

Constructor Detail

TableBoxPainter

public TableBoxPainter(BoxView view)
Creates table box a painter for the given table cell view

Parameters:
view - the table cell
Method Detail

getPaintInsets

public java.awt.Insets getPaintInsets()
Returns the paint insets of the table box

Returns:
the paint insets of the table box

paintBorders

public void paintBorders(java.awt.Graphics g,
                         int x,
                         int y,
                         int width,
                         int height)
Paints ONLY the Borders of this box. The borders will centered on the edges of the box if collapse mode is enabled

Parameters:
g - The graphics to paint on
x - The x-coordinate
y - The y-coordinate
width - The width of the Box
height - The height of the box

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y,
                  int width,
                  int height,
                  int paintMode,
                  BoxView paintRef)
This method is overridden to do nothing. The paint-cycle of a collapse table differs to the normal paint order. Therefore it cannot be allowed to let the view paint it's box

Specified by:
paint in interface IBoxPainter
Overrides:
paint in class BoxPainter
Parameters:
g - Graphics, not used
x - X-coordinate, not used
y - Y-coordinate, not used
width - Width of the box, not used
height - Height of the box, not used
paintMode - the border paint mode
paintRef - the coordinate reference for inline background images
See Also:
IBoxPainter.PAINT_MODE_NORMAL, IBoxPainter.PAINT_MODE_LEFTEDGE, IBoxPainter.PAINT_MODE_CENTER, IBoxPainter.PAINT_MODE_RIGHTEDGE

setCollapseMode

public void setCollapseMode(boolean isCollapseMode)
Set whether border-collapse is enabled

Parameters:
isCollapseMode - the border-collapse flag

getPaddingDefined

public java.awt.Insets getPaddingDefined()
Flags which of the padding sides are defined by css and which may be set by the table. Holds an 0 for every not-set padding and 1 one for every set.

Returns:
the insets with the defined borders