|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JLabel | +--javax.swing.DefaultListCellRenderer | +--com.klg.jclass.swing.JCPopupCalendar.DateRenderer
The default renderer for the JCPopupCalendar.
Nested Class Summary |
Nested classes inherited from class javax.swing.DefaultListCellRenderer |
DefaultListCellRenderer.UIResource |
Nested classes inherited from class javax.swing.JLabel |
JLabel.AccessibleJLabel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected int |
calendarType
The type of calendar - either Date_TIME or DATE. |
protected DateFormat |
format
The format object to format dates. |
protected com.klg.jclass.swing.JCPopupCalendar |
popupCalendar
The parent popup calendar. |
Fields inherited from class javax.swing.DefaultListCellRenderer |
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 | |
JCPopupCalendar.DateRenderer(com.klg.jclass.swing.JCPopupCalendar popupCalendar,
int calendarType,
Date d)
Create a DateRenderer given its parent, the type of calendar, and an initial date. |
|
JCPopupCalendar.DateRenderer(com.klg.jclass.swing.JCPopupCalendar popupCalendar,
int calendarType,
Date d,
Locale l)
Create a DateRenderer given its parent, the type of calendar, an initial date, and a locale. |
Method Summary | |
int |
getCalendarType()
Get the calendar type for the renderer. |
DateFormat |
getFormat()
Return the format used by the renderer. |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
Return a component that has been configured to display the specified value. |
com.klg.jclass.swing.JCPopupCalendar |
getPopupCalendar()
Return the renderer's JCPopupCalendar parent. |
void |
setCalendarType(int calendarType)
Set the calendarType on the renderer. |
void |
setFormat(DateFormat df)
Set the format to use for the renderer. |
void |
setLocale(Locale locale)
Set the locale on the renderer. |
Methods inherited from class javax.swing.DefaultListCellRenderer |
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, repaint, repaint, revalidate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected com.klg.jclass.swing.JCPopupCalendar popupCalendar
protected int calendarType
protected DateFormat format
Constructor Detail |
public JCPopupCalendar.DateRenderer(com.klg.jclass.swing.JCPopupCalendar popupCalendar, int calendarType, Date d)
popupCalendar
- The parent popup calendarcalendarType
- The type of calendar. Must be one of
JCPopupCalendar.DATE_TIME or JCPopupCalendar.DATEd
- The initial date for the editorpublic JCPopupCalendar.DateRenderer(com.klg.jclass.swing.JCPopupCalendar popupCalendar, int calendarType, Date d, Locale l)
popupCalendar
- The parent popup calendar.calendarType
- The type of calendar. Must be one of
JCPopupCalendar.DATE_TIME or JCPopupCalendar.DATEd
- The initial date for the editor.l
- The locale to use.Method Detail |
public com.klg.jclass.swing.JCPopupCalendar getPopupCalendar()
public int getCalendarType()
public void setCalendarType(int calendarType)
calendarType
- The new calendarType. Must be one of
JCPopupCalendar.DATE_TIME or JCPopupCalendar.DATEpublic void setLocale(Locale locale)
setLocale
in class Component
locale
- The new localepublic DateFormat getFormat()
public void setFormat(DateFormat df)
df
- The new formatpublic Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
paint
method is then called to
"render" the cell. If it is necessary to compute the dimensions
of a list because the list cells do not have a fixed size, this method
is called to generate a component on which getPreferredSize
can be invoked.
getListCellRendererComponent
in interface ListCellRenderer
getListCellRendererComponent
in class DefaultListCellRenderer
list
- The JList we're painting.value
- The value returned by list.getModel().getElementAt(index).index
- The cells index.isSelected
- True if the specified cell was selected.cellHasFocus
- True if the specified cell has the focus.
JList
,
ListSelectionModel
,
ListModel
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |