|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.remotefileselector2.html.InformationServicesDateCellRenderer
public class InformationServicesDateCellRenderer
InformationServicesDateCellRenderer
is a class
that controls the way a date object is
rendered in a
TableView
component.
There are several constructors to offer many options
for controlling the visual display of the date.
The Modified Date
column of the InformationServicesSelector
detailsViewComponent and the Modified Date
column of the searchResultsComponent use this class to render
the date using MM/dd/yyyy as the
simple date format. The InformationServicesSelector
is a specific subclass of the RemoteFileSelector
.
DateFormat
,
SimpleDateFormat
Field Summary | |
---|---|
static InformationServicesDateCellRenderer |
defaultInstance
The default instance of InformationServicesDateCellRenderer created using the null constructor |
Fields inherited from interface com.sas.servlet.tbeans.HttpConstants |
---|
ALL, BASELINE, CHAR, COL, COLGROUP, JUSTIFY, MULTIPLE, NONE, ROW, ROWGROUP, SINGLE |
Constructor Summary | |
---|---|
InformationServicesDateCellRenderer()
Default Constructor sets up a date format that uses the SHORT style pattern for the date and time. |
|
InformationServicesDateCellRenderer(java.text.DateFormat df)
Constructor that accepts a date format. |
|
InformationServicesDateCellRenderer(int dateStyle,
int timeStyle,
java.util.Locale locale)
Constructor that accepts a style pattern for the date and the time. |
|
InformationServicesDateCellRenderer(int dateStyle,
java.util.Locale locale)
Constructor that accepts a style pattern for the date. |
|
InformationServicesDateCellRenderer(java.util.Locale locale)
Constructor that accepts a locale to use for the date. |
Method Summary | |
---|---|
java.text.DateFormat |
getDateFormat()
Returns the date format |
void |
setDateFormat(java.text.DateFormat df)
Sets the date format used by the renderer for displaying the date and time. |
void |
write(java.io.PrintWriter out,
AbstractBaseTableView tableview,
java.lang.Object value,
java.lang.String name,
ActionList actions)
Renders the date using the given dateFormat. |
Methods inherited from class com.sas.servlet.tbeans.tableview.html.DefaultTableCellRenderer |
---|
getTableCellContentsRenderer, setTableCellContentsRenderer |
Methods inherited from class com.sas.servlet.tbeans.tableview.html.BaseTableCell |
---|
getBgColor, getColSpan, getCustomAttributes, getHeaders, getHeight, getHeightPercentage, getHorizontalAlignment, getId, getLocale, getRowSpan, getScope, getStyleInfo, getVerticalAlignment, getWidth, getWidthPercentage, isHeader, isNoWrap, setBgColor, setColSpan, setCustomAttributes, setHeader, setHeaders, setHeight, setHeightPercentage, setHorizontalAlignment, setId, setLocale, setNoWrap, setRowSpan, setScope, setStyleInfo, setVerticalAlignment, setWidth, setWidthPercentage, writeBeginCell, writeEndCell |
Methods inherited from interface com.sas.servlet.tbeans.tableview.TableCellRenderer |
---|
getLocale, setLocale |
Methods inherited from interface com.sas.servlet.tbeans.tableview.TableCell |
---|
isHeader, setHeader, writeBeginCell, writeEndCell |
Field Detail |
---|
public static final InformationServicesDateCellRenderer defaultInstance
InformationServicesDateCellRenderer()
Constructor Detail |
---|
public InformationServicesDateCellRenderer()
SHORT
style pattern for the date and time.
public InformationServicesDateCellRenderer(java.util.Locale locale)
SHORT
style pattern for the date, and the time by default and uses the specified
locale.
locale
- the given localeDateFormat.getDateTimeInstance()
public InformationServicesDateCellRenderer(int dateStyle, java.util.Locale locale)
dateStyle
- controls the display of the date. It is the given dates
formatting style. Valid values are SHORT, MEDIUM, LONG,
and DEFAULT
.
DEFAULT
is the same as MEDIUM
.locale
- the given localeDateFormat.getDateTimeInstance()
public InformationServicesDateCellRenderer(int dateStyle, int timeStyle, java.util.Locale locale)
dateStyle
- controls the display of the date. It is the given dates
formatting style. Valid values are SHORT, MEDIUM, LONG,
and DEFAULT
.
DEFAULT
is the same as MEDIUM
.timeStyle
- controls the display of the time. It is the given time
formatting style. Valid values are SHORT, MEDIUM, LONG,
and DEFAULT
.
DEFAULT
is the same as MEDIUM
.locale
- the given localeDateFormat.getDateTimeInstance()
public InformationServicesDateCellRenderer(java.text.DateFormat df)
df
- date format to use for formating the dateSimpleDateFormat
Method Detail |
---|
public void setDateFormat(java.text.DateFormat df)
df
- date formatgetDateFormat()
public java.text.DateFormat getDateFormat()
setDateFormat(DateFormat)
public void write(java.io.PrintWriter out, AbstractBaseTableView tableview, java.lang.Object value, java.lang.String name, ActionList actions) throws java.io.IOException
Renders the date using the given dateFormat. The
value
is expected to be an
instance of Date
.
Write the entire table cell in the appropriate markup language. This method calls the writeBeginCell, writeEndCell and TableCellContentsRenderer.setCellRendererContentsValue methods.
write
in interface TableCell
write
in class DefaultTableCellRenderer
out
- the output streamtableview
- the instance of the tableview being written.value
- the value to display as the cell's contentsname
- the name to use for the contents componentactions
- an actionlist of all the valid actions for this cell
java.io.IOException
- Thrown if some type of I/O error occurs
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |