org.jfree.ui
Class SerialDateChooserPanel
JPanel
org.jfree.ui.SerialDateChooserPanel
- ActionListener
extends JPanel
implements ActionListener
A panel that allows the user to select a date.
This class is incomplete and untested. You should not use it yet...
DEFAULT_DATE_BUTTON_COLOR
public static final Color DEFAULT_DATE_BUTTON_COLOR
The default background color for the selected date.
SerialDateChooserPanel
public SerialDateChooserPanel()
Constructs a new date chooser panel, using today's date as the initial selection.
SerialDateChooserPanel
public SerialDateChooserPanel(SerialDate date,
boolean controlPanel)
Constructs a new date chooser panel.
date
- the date.controlPanel
- a flag that indicates whether or not the 'today' button should
appear on the panel.
SerialDateChooserPanel
public SerialDateChooserPanel(SerialDate date,
boolean controlPanel,
Color dateButtonColor,
Color monthButtonColor)
Constructs a new date chooser panel.
date
- the date.controlPanel
- the control panel.dateButtonColor
- the date button color.monthButtonColor
- the month button color.
actionPerformed
public void actionPerformed(ActionEvent e)
Handles action-events from the date panel.
e
- information about the event that occurred.
getButtonColor
protected Color getButtonColor(SerialDate targetDate)
Returns the button color according to the specified date.
targetDate
- the target date.
getFirstVisibleDate
protected SerialDate getFirstVisibleDate()
Returns the first date that is visible in the grid. This should always be in the month
preceding the month of the selected date.
refreshButtons
protected void refreshButtons()
Update the button labels and colors to reflect date selection.