Package no.uib.jsparklines.extra
Class HtmlLinksRenderer
java.lang.Object
no.uib.jsparklines.extra.HtmlLinksRenderer
- All Implemented Interfaces:
TableCellRenderer
public class HtmlLinksRenderer extends Object implements TableCellRenderer
Table cell renderer using different HTML tag colors for selected and not
selected rows. For example the default blue color can be used for not
selected rows, while a white color can be used for the selected rows.
Supported input: String objects. Other object types are rendered using the
DefaultTableCellRenderer.
Note that the renderer assumes that the HTML tags include the font color tag setting the color to one of the two colors provided in the constructor.
- Author:
- Harald Barsnes
-
Constructor Summary
Constructors Constructor Description HtmlLinksRenderer(String selectedRowFontColor, String notSelectedRowFontColor)
Default constructor. -
Method Summary
Modifier and Type Method Description Component
getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
-
Constructor Details
-
HtmlLinksRenderer
Default constructor.- Parameters:
selectedRowFontColor
- the color to use for the HTML tags for the selected rows, in HTML color code, i.e., #FFFFFF for white.notSelectedRowFontColor
- the color to use for the HTML tags for the rows that are not selected, in HTML color code, i.e., #000000 for black.
-
-
Method Details
-
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)- Specified by:
getTableCellRendererComponent
in interfaceTableCellRenderer
-