public class DateCellRenderer extends Object implements TableCellRenderer
TableCellRenderer for rendering objects
of type Calendar and Date.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Modifier and Type | Field and Description |
|---|---|
static String |
DATE_FORMAT
The pattern to use to format dates.
|
protected SimpleDateFormat |
sdf
The date formatter to use.
|
| Constructor and Description |
|---|
DateCellRenderer()
Default constructor.
|
DateCellRenderer(String pattern)
Create a new instance of the renderer that uses the specified pattern
to format dates.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
getTableCellRendererComponent(Table table,
Object value,
int column,
int row)
Return a
Label that displays the formatted
date value. |
public static final String DATE_FORMAT
protected final SimpleDateFormat sdf
public DateCellRenderer()
sdf.public DateCellRenderer(String pattern)
pattern - The pattern to use to format dates.public Component getTableCellRendererComponent(Table table, Object value, int column, int row)
Label that displays the formatted
date value.getTableCellRendererComponent in interface TableCellRenderertable - The table that is being rendered.value - The value that is to be rendered.column - The column index in the TableModel.row - The row index in the TableModel.TableCellRenderer.getTableCellRendererComponent(nextapp.echo.app.Table, java.lang.Object, int, int)