All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class net.e2technologies.util.sample.ECalendarChooser

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----javax.swing.JComponent
                           |
                           +----javax.swing.JPanel
                                   |
                                   +----net.e2technologies.util.sample.ECalendarChooser

public class ECalendarChooser
extends JPanel
implements Serializable, FocusListener, ActionListener, ECalendarListener
Sample Application for ECalendar Suite (ETimeChooser & ECalendar). This class demonstrates how to use the components in this suite.


Constructor Index

 o ECalendarChooser()

Method Index

 o actionPerformed(ActionEvent)
Called when the button is pressed.
 o focusGained(FocusEvent)
Does nothing.
 o focusLost(FocusEvent)
Called when the text field looses focus.
 o getDate()
gets the date that is currently being stored within this class
 o getDateString()
gets the date that is currently being stored within this class
 o main(String[])
The Main method to run the application
 o setCalendar(Calendar)
sets the Calendar in this class.
 o setDate(String)
sets the date to be stored within this class.
 o setEditable(boolean)
Sets the text field and button to be editable/un-editable so that when the calendar it displayed, the user can not enter input until the date has been selected

Constructors

 o ECalendarChooser
 public ECalendarChooser()

Methods

 o setEditable
 public void setEditable(boolean p_editable)
Sets the text field and button to be editable/un-editable so that when the calendar it displayed, the user can not enter input until the date has been selected

 o getDateString
 public String getDateString()
gets the date that is currently being stored within this class

Returns:
String - the current date being stored
 o getDate
 public Date getDate()
gets the date that is currently being stored within this class

Returns:
Date - the current date being stored
 o setDate
 public void setDate(String p_dateString)
sets the date to be stored within this class. This will also update the text field with the new date if it is valid.

Parameters:
String - p_dateString - the new date to store
 o setCalendar
 public void setCalendar(Calendar p_calendar)
sets the Calendar in this class. This the implementation of ECalendarListner. The ECalendar will call this method when a day is selected.

Parameters:
Calendar - p_calendar - the new date selected within the ECalendar
 o focusGained
 public void focusGained(FocusEvent e)
Does nothing. Had to be implemented because of FocusListener interface

 o focusLost
 public void focusLost(FocusEvent e)
Called when the text field looses focus. Then the text field value will be checked to see if it contains a valid date value in case it was changed by the user

Parameters:
FocusEvent - e - event triggered when text field looses focus
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Called when the button is pressed. Will cause the ECalendar to be generated.

Parameters:
ActionEvent - e - ActionEvent from the button
 o main
 public static void main(String argv[])
The Main method to run the application


All Packages  Class Hierarchy  This Package  Previous  Next  Index