ElegantJ Tables Java API Specification v1.1

com.elegantj.awt.table
Interface TableCellRenderer

All Known Implementing Classes:
ButtonTableCellRenderer, CheckboxTableCellRenderer, ChoiceTableCellRenderer, DefaultHeaderCellRenderer, DefaultTableCellRenderer, TextAreaTableCellRenderer, TextAreaWrapTableCellRenderer

public interface TableCellRenderer

TableCellRenderer provides the interface for the cell editor for the AWTTable any component which is implemented with TableCellRenderer will be set as a cell editor for the AWTTable


Method Summary
 java.awt.Color getBorderSelectionColor()
          Method which returns the border selection color for the renderer, The border selection color is color which is set when the cell of the table is selected i.e.
 java.awt.Component getTableCellRendererComponent(AWTTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
          Returns the component used for drawing the cell.
 void paint(java.awt.Graphics g)
          Must implement the method for the any cell renderer This paint method is considered for the rendering a cell
 void setBorderSelectionColor(java.awt.Color color)
          Method which sets the border selection color of the renderer, The border selection color is color which is set, when the cell of the table is selected i.e.
 

Method Detail

paint

public void paint(java.awt.Graphics g)
Must implement the method for the any cell renderer This paint method is considered for the rendering a cell


getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(AWTTable table,
                                                        java.lang.Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Returns the component used for drawing the cell. This method is used to configure the renderer appropriately before drawing.

Parameters:
table - the AWTTable that is asking the renderer to draw; can be null
value - the value of the cell to be rendered. It is up to the specific renderer to interpret and draw the value.
isSelected - true if the cell is to be rendered with the selection highlighted; otherwise false
hasFocus - if true, render cell appropriately. For example, put a special border on the cell, if the cell can be edited, render in the color used to indicate editing
row - the row index of the cell being drawn.
column - the column index of the cell being drawn

setBorderSelectionColor

public void setBorderSelectionColor(java.awt.Color color)
Method which sets the border selection color of the renderer, The border selection color is color which is set, when the cell of the table is selected i.e. the anchor cell's border is rendered with this color


getBorderSelectionColor

public java.awt.Color getBorderSelectionColor()
Method which returns the border selection color for the renderer, The border selection color is color which is set when the cell of the table is selected i.e. the anchor cell's border is rendered with this color


ElegantJ Tables Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.