datepicker
Class DatePicker

java.lang.Object
  extended by datepicker.DatePicker
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TableModelListener

public class DatePicker
extends java.lang.Object
implements javax.swing.event.TableModelListener

An instance of this class displays the days of a selected month in a selected year as a table derived from a TableModel. The user selects a day from the table, and the date, in the requested format, is returned to the calling program.

The date formats currently supported and which are ordered by passing the appropriate integer value to the constructor are:

  1. SV_FMT: Euro format, yyyy-MM-dd.
  2. UK_FMT: UK format, dd/MM/yyyy.
  3. US_FMT: US format, MM/dd/yyyy.


Field Summary
static java.awt.Font FIELDFONT
           
static java.awt.Font HDRFONT
           
protected  javax.swing.JButton nextmonButton
           
static int PANELHEIGHT
           
static int PANELWIDTH
           
protected  javax.swing.JScrollPane scrollPane
           
 
Constructor Summary
DatePicker(int _requestedDateFormat, int _dpLang)
          Creates a new instance of DatePicker.
 
Method Summary
protected static javax.swing.ImageIcon createImageIcon(java.lang.String path)
           
 java.lang.String getDateString()
           
 void tableChanged(javax.swing.event.TableModelEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PANELWIDTH

public static final int PANELWIDTH
See Also:
Constant Field Values

PANELHEIGHT

public static final int PANELHEIGHT
See Also:
Constant Field Values

FIELDFONT

public static final java.awt.Font FIELDFONT

HDRFONT

public static final java.awt.Font HDRFONT

scrollPane

protected javax.swing.JScrollPane scrollPane

nextmonButton

protected javax.swing.JButton nextmonButton
Constructor Detail

DatePicker

public DatePicker(int _requestedDateFormat,
                  int _dpLang)
Creates a new instance of DatePicker. The format of the date requested is passed as an argument to the constructor.

Parameters:
_requestedDateFormat - The format of the date to be returned.
_dpLang - The language that the days and months are shown in on the date picker UI.
Method Detail

createImageIcon

protected static javax.swing.ImageIcon createImageIcon(java.lang.String path)

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Specified by:
tableChanged in interface javax.swing.event.TableModelListener

getDateString

public java.lang.String getDateString()