|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
javax.swing.table.DefaultTableCellRenderer
com.sciapp.renderers.DefaultRenderer
com.sciapp.renderers.DateRenderer
public class DateRenderer
DateRenderer is a TableCellRenderer suitable for rendering Date objects.
DateRenderer uses an internal DateFormat object to render Date objects.
By default, dates are aligned to the left of the cell.
The appearance of the cell can be controlled by modifying the properties of the internal
DateFormat, an instance of which can be acquired with getDateFormat
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.table.DefaultTableCellRenderer |
---|
DefaultTableCellRenderer.UIResource |
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
JLabel.AccessibleJLabel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected DateFormat |
formatter
The date format instance |
Fields inherited from class com.sciapp.renderers.DefaultRenderer |
---|
evenColor, oddColor, space, spacing |
Fields inherited from class javax.swing.table.DefaultTableCellRenderer |
---|
noFocusBorder |
Fields inherited from class javax.swing.JLabel |
---|
labelFor |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DateRenderer()
Constructs a default DateRenderer. |
|
DateRenderer(DateFormat df)
Constructs a default DateRenderer having df as the DateFormat instance
that will render the cells. |
Method Summary | |
---|---|
DateFormat |
getDateFormat()
Returns the internal DateFormat object used to render the Dates. |
void |
setDateFormat(DateFormat df)
Assigns a new DateFormat object. |
protected void |
setValue(Object value)
Sets the String object for the cell being rendered to
value . |
Methods inherited from class com.sciapp.renderers.DefaultRenderer |
---|
getEvenColor, getOddColor, getSpacing, getTableCellRendererComponent, setEvenColor, setOddColor, setSpaces, setSpacing, setText |
Methods inherited from class javax.swing.table.DefaultTableCellRenderer |
---|
firePropertyChange, firePropertyChange, isOpaque, repaint, repaint, revalidate, setBackground, setForeground, updateUI, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DateFormat formatter
Constructor Detail |
---|
public DateRenderer()
public DateRenderer(DateFormat df)
df
as the DateFormat instance
that will render the cells.
Method Detail |
---|
public DateFormat getDateFormat()
public void setDateFormat(DateFormat df)
df
- the DateFormat object to assignprotected void setValue(Object value)
String
object for the cell being rendered to
value
.
setValue
in class DefaultTableCellRenderer
value
- the string value for this cell; if value is
null
it sets the text value to an empty stringJLabel.setText(java.lang.String)
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |