com.ibm.spinner
Class DateChangedEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--com.ibm.spinner.DateChangedEvent

public class DateChangedEvent
extends java.awt.AWTEvent

The date changed event notifies its registered listeners when the date changes.


Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, INPUT_METHOD_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
 
Constructor Summary
DateChangedEvent(java.lang.Object source, int id)
          Constructs a new date changed event.
DateChangedEvent(java.lang.Object source, int id, java.lang.String newDateString)
          Constructs a new date changed event and specifies the new date as a Java String object.
DateChangedEvent(java.lang.Object source, int id, java.lang.String newDateString, java.util.Date newJavaDate, java.sql.Date newSQLDate)
          Constructs a new date changed event and specifies the new date as a Java String object, a Java Date object and a Java SQL Date object.
 
Method Summary
 java.lang.String getDateString()
          Returns the date string for this event in either: 1) the system default date format for this locale, or 2) the date format as specified in dateFormatString property.
 java.util.Date getJavaDate()
          Returns the date for this event as an instance of java.util.Date.
 java.sql.Date getSQLDate()
          Returns the date for this event as an instance of java.sql.Date.
 void setDateString(java.lang.String newDateString)
          Sets the date string for this event.
 
Methods inherited from class java.awt.AWTEvent
getID, paramString, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateChangedEvent

public DateChangedEvent(java.lang.Object source,
                        int id)
Constructs a new date changed event.
Parameters:
source - The source of the event.
id - The event ID specifying the type of this event. This value must be an integer greater than the value defined by java.awt.AWTEvent.RESERVED_ID_MAX. For example, the value 20000 would be a valid event ID.

DateChangedEvent

public DateChangedEvent(java.lang.Object source,
                        int id,
                        java.lang.String newDateString)
Constructs a new date changed event and specifies the new date as a Java String object.
Parameters:
source - The source of the event.
id - The event ID specifying the type of this event. This value must be an integer greater than the value defined by java.awt.AWTEvent.RESERVED_ID_MAX. For example, the value 20000 would be a valid event ID.
newDateString - The date for this event.

DateChangedEvent

public DateChangedEvent(java.lang.Object source,
                        int id,
                        java.lang.String newDateString,
                        java.util.Date newJavaDate,
                        java.sql.Date newSQLDate)
Constructs a new date changed event and specifies the new date as a Java String object, a Java Date object and a Java SQL Date object. Using this constructor allows the listener to access the new date in a variety of formats.
Parameters:
source - The source of the event.
id - The event ID specifying the type of this event. This value must be an integer greater than the value defined by java.awt.AWTEvent.RESERVED_ID_MAX. For example, the value 20000 would be a valid event ID.
newDateString - The date for this event as a String.
newJavaDate - The date for this event as an instance of java.util.Date.
newSQLDate - The date for this event as an instance of java.sql.Date.
Method Detail

setDateString

public void setDateString(java.lang.String newDateString)
Sets the date string for this event.
Parameters:
newDateString - The new date string.
See Also:
getDateString()

getDateString

public java.lang.String getDateString()
Returns the date string for this event in either: 1) the system default date format for this locale, or 2) the date format as specified in dateFormatString property.
See Also:
setDateString(java.lang.String)

getJavaDate

public java.util.Date getJavaDate()
Returns the date for this event as an instance of java.util.Date.
Returns:
an instance of java.util.Date that represents the date for this event.

getSQLDate

public java.sql.Date getSQLDate()
Returns the date for this event as an instance of java.sql.Date.
Returns:
an instance of java.sql.Date that represents the date for this event.