All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.swing.visuals.remotefileselector.informationservices
Class InformationServicesDateCellRenderer

    com.sas.swing.visuals.remotefileselector.informationservices.InformationServicesDateCellRenderer

All Implemented Interfaces:
  java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants, javax.swing.table.TableCellRenderer

    public class InformationServicesDateCellRenderer

implements javax.swing.table.TableCellRenderer

InformationServicesCellRenderer formats a date column's value.

Since:
  3.1
See Also:
  Serialized Form

Field Summary
`static InformationServicesDateCellRenderer` | `defaultInstance` A default instance of the class

Constructor Summary
`InformationServicesDateCellRenderer()` Default Constructor sets up a date format that uses the SHORT format 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 for the date and the time.
`InformationServicesDateCellRenderer(int dateStyle, java.util.Locale locale)` Constructor that accepts a style for the date.
`InformationServicesDateCellRenderer(java.util.Locale locale)` Constructor that accepts a locale to use for the date.

Method Summary
`java.text.DateFormat` | `getDateFormat()` Return the date format
`java.awt.Component` | `getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean cellHasFocus, int row, int column)` Renders the date value based on the current formatting options.
`void` | `setDateFormat(java.text.DateFormat df)` Set the date format and the sets the time zone to GMT.

Field Detail

### defaultInstance

    public static final InformationServicesDateCellRenderer defaultInstance

  A default instance of the class

Constructor Detail

### InformationServicesDateCellRenderer

    public InformationServicesDateCellRenderer()

  Default Constructor sets up a date format that uses the SHORT format for the date and time.

### InformationServicesDateCellRenderer

    public InformationServicesDateCellRenderer(int dateStyle,
                                               int timeStyle,
                                               java.util.Locale locale)

  Constructor that accepts a style for the date and the time. This constructor sets up a date format that uses the specified style for date and time and the specified locale.

  Parameters:
    `dateStyle` - a format style for the date portion
    `timeStyle` - a format style for the time portion
    `locale` - a locale for the data value
  See Also:
    `DateFormat`

### InformationServicesDateCellRenderer

    public InformationServicesDateCellRenderer(int dateStyle,
                                               java.util.Locale locale)

  Constructor that accepts a style for the date. This constructor sets up a date format the uses the specified style for the date and the specified locale.

  Parameters:
    `dateStyle` - a format style for the date portion
    `locale` - a locale for the data value
  See Also:
    `DateFormat`

### InformationServicesDateCellRenderer

    public InformationServicesDateCellRenderer(java.util.Locale locale)

  Constructor that accepts a locale to use for the date. This constructor setups up a date format that uses the SHORT style for the date, and the time by default and uses the specified locale.

  Parameters:
    `locale` - a locale for the data value
  See Also:
    `DateFormat`

### InformationServicesDateCellRenderer

    public InformationServicesDateCellRenderer(java.text.DateFormat df)

  Constructor that accepts a date format.

  Parameters:
    `df` - the DateFormat class to assign to this cell renderer
  See Also:
    `DateFormat`

Method Detail

### setDateFormat

    public void setDateFormat(java.text.DateFormat df)

  Set the date format and the sets the time zone to GMT.

  Parameters:
    `df` - the DateFormat class to assign to this cell renderer
  See Also:
    `getDateFormat()`

### getDateFormat

    public java.text.DateFormat getDateFormat()

  Return the date format

  Returns:
    the DateFormat class associated with this cell renderer
  See Also:
    `setDateFormat(DateFormat)`

### getTableCellRendererComponent

    public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                            java.lang.Object value,
                                                            boolean isSelected,
                                                            boolean cellHasFocus,
                                                            int row,
                                                            int column)

  Renders the date value based on the current formatting options.

  Specified by:
    `getTableCellRendererComponent` in interface `javax.swing.table.TableCellRenderer`
  Parameters:
    `table` - the table where the cell is displayed
    `value` - the value to format
    `isSelected` - whether the cell is selected
    `cellHasFocus` - whether the cell has focus
    `row` - the cell's row
    `column` - the cell's column
  Returns:
    the formatted value

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.