public interface IlvCalendarHeaderRenderer
IlvJCalendarPanel
.
For example, to use a JLabel
we suggest that you subclass
IlvAbstractCellRenderer
for the best
performance. Your renderer would then be something like this:
class MyHeaderRenderer extends IlvAbstractCellRenderer implements IlvCalendarHeaderRenderer { DateFormat dowFormat = new SimpleDateFormat("E"); public Component getCalendarHeaderRendererComponent( IlvJCalendarPanel calendarPanel, Calendar calendar, int column) { setText(dowFormat.format(calendar.getTime())); setFont(calendarPanel.getHeaderFont()); setBackground(calendarPanel.getHeaderBackground()); setForeground(calendarPanel.getHeaderForeground()); return this; } }
Modifier and Type | Method and Description |
---|---|
Component |
getCalendarHeaderRendererComponent(IlvJCalendarPanel calendarPanel,
Calendar calendar,
int column)
Returns a component that has been configured to render the specified
day-of-week column header.
|
Component getCalendarHeaderRendererComponent(IlvJCalendarPanel calendarPanel, Calendar calendar, int column)
paint
method is
then called to "render" the header.calendarPanel
- The IlvJCalendarPanel
that is asking the
renderer to draw.calendar
- The calendar value of the day-of-week column.column
- The column index of the day-of-week column header being drawn.paint()
method will render the
day-of-week column header.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.