org.jfree.ui

Class DateCellRenderer

public class DateCellRenderer extends DefaultTableCellRenderer

A table cell renderer that formats dates.

Author: David Gilbert

Constructor Summary
DateCellRenderer()
Default constructor.
DateCellRenderer(DateFormat formatter)
Creates a new renderer.
Method Summary
ComponentgetTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
Returns itself as the renderer.

Constructor Detail

DateCellRenderer

public DateCellRenderer()
Default constructor.

DateCellRenderer

public DateCellRenderer(DateFormat formatter)
Creates a new renderer.

Parameters: formatter the formatter.

Method Detail

getTableCellRendererComponent

public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
Returns itself as the renderer. Supports the TableCellRenderer interface.

Parameters: table the table. value the data to be rendered. isSelected a boolean that indicates whether or not the cell is selected. hasFocus a boolean that indicates whether or not the cell has the focus. row the (zero-based) row index. column the (zero-based) column index.

Returns: the component that can render the contents of the cell.