sferyx.administration.renderers
Class CustomTableView

java.lang.Object
  extended by javax.swing.text.View
      extended by sferyx.administration.renderers.CustomTableView
All Implemented Interfaces:
javax.swing.SwingConstants

public class CustomTableView
extends javax.swing.text.View

CustomTableView is used to handle in a customized way the table elements. It adds dashed borders to the invisible tables (those with border=0) and also paints the selection of the cells.


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
CustomTableView(javax.swing.text.Element elem, javax.swing.text.View view, boolean paintInvisibleCells)
           
 
Method Summary
 float getAlignment(int axis)
           
 javax.swing.text.View getAttachedView()
           
 java.awt.Color getBorderColor(javax.swing.text.AttributeSet attribs)
           
 java.lang.String getBorderStlyeValue(javax.swing.text.AttributeSet attribs, java.lang.Object attribute_class)
           
 java.awt.Stroke getBorderStroke(java.awt.Stroke stroke, int borderWidth, java.lang.String style)
           
 int getBorderThiknessValue(javax.swing.text.AttributeSet attribs, java.lang.Object attribute_class, javax.swing.text.Element elem)
           
 java.awt.Color getBottomBorderColor(javax.swing.text.AttributeSet attribs)
           
 java.lang.String getBottomBorderStyle(javax.swing.text.AttributeSet attribs)
           
 int getCellBottomBorderSize(javax.swing.text.AttributeSet attribs, javax.swing.text.Element elem)
           
 int getCellLeftBorderSize(javax.swing.text.AttributeSet attribs, javax.swing.text.Element elem)
           
 int getCellRightBorderSize(javax.swing.text.AttributeSet attribs, javax.swing.text.Element elem)
           
 int getCellTopBorderSize(javax.swing.text.AttributeSet attribs, javax.swing.text.Element elem)
           
 java.awt.Color getColor(javax.swing.text.AttributeSet attribs, java.lang.Object attribute_class)
           
 int getHeight()
           
 java.awt.Color getLeftBorderColor(javax.swing.text.AttributeSet attribs)
           
 java.lang.String getLeftBorderStyle(javax.swing.text.AttributeSet attribs)
           
 float getMaximumSpan(int axis)
           
 float getMinimumSpan(int axis)
           
 float getPreferredSpan(int param)
           
 java.awt.Color getRightBorderColor(javax.swing.text.AttributeSet attribs)
           
 java.lang.String getRightBorderStyle(javax.swing.text.AttributeSet attribs)
           
 java.awt.Color getTopBorderColor(javax.swing.text.AttributeSet attribs)
           
 java.lang.String getTopBorderStyle(javax.swing.text.AttributeSet attribs)
           
 int getWidth()
           
 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 paintTableBorder(javax.swing.text.View cellView, java.awt.Rectangle childRect, java.awt.Graphics g)
           
 int viewToModel(float param, float param1, java.awt.Shape shape, javax.swing.text.Position.Bias[] bias)
           
 
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomTableView

public CustomTableView(javax.swing.text.Element elem,
                       javax.swing.text.View view,
                       boolean paintInvisibleCells)
Method Detail

getAttachedView

public javax.swing.text.View getAttachedView()

paint

public void paint(java.awt.Graphics g,
                  java.awt.Shape allocation)
Specified by:
paint in class javax.swing.text.View

paintTableBorder

public void paintTableBorder(javax.swing.text.View cellView,
                             java.awt.Rectangle childRect,
                             java.awt.Graphics g)

getBorderStroke

public java.awt.Stroke getBorderStroke(java.awt.Stroke stroke,
                                       int borderWidth,
                                       java.lang.String style)

getBorderColor

public java.awt.Color getBorderColor(javax.swing.text.AttributeSet attribs)

getTopBorderColor

public java.awt.Color getTopBorderColor(javax.swing.text.AttributeSet attribs)

getBottomBorderColor

public java.awt.Color getBottomBorderColor(javax.swing.text.AttributeSet attribs)

getRightBorderColor

public java.awt.Color getRightBorderColor(javax.swing.text.AttributeSet attribs)

getLeftBorderColor

public java.awt.Color getLeftBorderColor(javax.swing.text.AttributeSet attribs)

getColor

public java.awt.Color getColor(javax.swing.text.AttributeSet attribs,
                               java.lang.Object attribute_class)

getTopBorderStyle

public java.lang.String getTopBorderStyle(javax.swing.text.AttributeSet attribs)

getBottomBorderStyle

public java.lang.String getBottomBorderStyle(javax.swing.text.AttributeSet attribs)

getLeftBorderStyle

public java.lang.String getLeftBorderStyle(javax.swing.text.AttributeSet attribs)

getRightBorderStyle

public java.lang.String getRightBorderStyle(javax.swing.text.AttributeSet attribs)

getBorderStlyeValue

public java.lang.String getBorderStlyeValue(javax.swing.text.AttributeSet attribs,
                                            java.lang.Object attribute_class)

getCellTopBorderSize

public int getCellTopBorderSize(javax.swing.text.AttributeSet attribs,
                                javax.swing.text.Element elem)

getCellRightBorderSize

public int getCellRightBorderSize(javax.swing.text.AttributeSet attribs,
                                  javax.swing.text.Element elem)

getCellLeftBorderSize

public int getCellLeftBorderSize(javax.swing.text.AttributeSet attribs,
                                 javax.swing.text.Element elem)

getBorderThiknessValue

public int getBorderThiknessValue(javax.swing.text.AttributeSet attribs,
                                  java.lang.Object attribute_class,
                                  javax.swing.text.Element elem)

getCellBottomBorderSize

public int getCellBottomBorderSize(javax.swing.text.AttributeSet attribs,
                                   javax.swing.text.Element elem)

getWidth

public int getWidth()

getHeight

public int getHeight()

getMaximumSpan

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

getMinimumSpan

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

getPreferredSpan

public float getPreferredSpan(int param)
Specified by:
getPreferredSpan in class javax.swing.text.View

modelToView

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

getAlignment

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

viewToModel

public int viewToModel(float param,
                       float param1,
                       java.awt.Shape shape,
                       javax.swing.text.Position.Bias[] bias)
Specified by:
viewToModel in class javax.swing.text.View