org.jfree.ui
Class DateChooserPanel
JPanel
org.jfree.ui.DateChooserPanel
- ActionListener
extends JPanel
implements ActionListener
A panel that allows the user to select a date.
DateChooserPanel() - Constructs a new date chooser panel, using today's date as the initial
selection.
|
DateChooserPanel(Calendar calendar, boolean controlPanel) - Constructs a new date chooser panel.
|
DateChooserPanel
public DateChooserPanel()
Constructs a new date chooser panel, using today's date as the initial
selection.
DateChooserPanel
public DateChooserPanel(Calendar calendar,
boolean controlPanel)
Constructs a new date chooser panel.
calendar
- the calendar controlling the date.controlPanel
- a flag that indicates whether or not the 'today'
button should appear on the panel.
actionPerformed
public void actionPerformed(ActionEvent e)
Handles action-events from the date panel.
e
- information about the event that occurred.
getChosenMonthButtonColor
public Color getChosenMonthButtonColor()
Returns the color for the buttons representing the current month.
- the color for the current month.
getChosenOtherButtonColor
public Color getChosenOtherButtonColor()
Returns the color for the buttons representing the other months.
getDate
public Date getDate()
Returns the date selected in the panel.
getYearSelectionRange
public int getYearSelectionRange()
Returns the range of years available for selection (defaults to 20).
setChosenDateButtonColor
public void setChosenDateButtonColor(Color chosenDateButtonColor)
Redefines the color for the currently selected date.
chosenDateButtonColor
- the new color
setChosenMonthButtonColor
public void setChosenMonthButtonColor(Color chosenMonthButtonColor)
Defines the color for the buttons representing the current month.
chosenMonthButtonColor
- the color for the current month.
setChosenOtherButtonColor
public void setChosenOtherButtonColor(Color chosenOtherButtonColor)
Redefines the color for the buttons representing the other months.
chosenOtherButtonColor
- a color.
setDate
public void setDate(Date theDate)
Sets the date chosen in the panel.
setYearSelectionRange
public void setYearSelectionRange(int yearSelectionRange)
Sets the range of years available for selection.
yearSelectionRange
- the range.