JDatePicker v4.3

com.standbysoft.component.date.event
Class DateEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.standbysoft.component.date.event.DateEvent
All Implemented Interfaces:
java.io.Serializable

public class DateEvent
extends java.util.EventObject

This type of events is fired by a DateModel whenever its state changes. This means a date field or the whole date changed.

See Also:
Serialized Form

Field Summary
static int DATE_CHANGED
          Constant that indicates a date change DateEvent.
static int FIELD_CHANGED
          Constant that indicates a field change DateEvent.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DateEvent(java.lang.Object source, java.util.Date date)
          Creates an event to show that the date has changed.
DateEvent(java.lang.Object source, int field)
          Creates an event to show that a date field has been cleared.
DateEvent(java.lang.Object source, int field, int oldValue, int newValue)
          Creates an event to show that a date field has changed.
 
Method Summary
 java.util.Date getDate()
          Returns the changed date.
 int getField()
          Returns the field that is changed.
 int getNewValue()
          Returns the new value of the field that is changed.
 int getOldValue()
          Returns the old value of the field that is changed.
 int getType()
          Returns whether this event was generated by a date field change or date change.
 boolean isCleared()
          Indicates whether a field has been cleared or not.
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_CHANGED

public static final int FIELD_CHANGED
Constant that indicates a field change DateEvent.

See Also:
Constant Field Values

DATE_CHANGED

public static final int DATE_CHANGED
Constant that indicates a date change DateEvent.

See Also:
Constant Field Values
Constructor Detail

DateEvent

public DateEvent(java.lang.Object source,
                 int field)
Creates an event to show that a date field has been cleared.

Parameters:
source - object that generated this event
field - date field that changed. This is a Calendar constant like: Calendar.YEAR, Calendar.MONTH, etc.

DateEvent

public DateEvent(java.lang.Object source,
                 int field,
                 int oldValue,
                 int newValue)
Creates an event to show that a date field has changed.

Parameters:
source - object that generated this event
field - date field that changed. This is a Calendar constant like: Calendar.YEAR, Calendar.MONTH, etc.
oldValue - old value for the changed date field
newValue - new value for the changed date field

DateEvent

public DateEvent(java.lang.Object source,
                 java.util.Date date)
Creates an event to show that the date has changed.

Parameters:
source - object that generated this event
date - new date
Method Detail

getType

public int getType()
Returns whether this event was generated by a date field change or date change.

Returns:
FIELD_CHANGED or DATE_CHANGED

getField

public int getField()
Returns the field that is changed.

Returns:
date field that changed. This is a Calendar constant like: Calendar.YEAR, Calendar.MONTH, etc.

getOldValue

public int getOldValue()
Returns the old value of the field that is changed.

Returns:
old field value

getNewValue

public int getNewValue()
Returns the new value of the field that is changed.

Returns:
new field value

getDate

public java.util.Date getDate()
Returns the changed date.

Returns:
changed date

isCleared

public boolean isCleared()
Indicates whether a field has been cleared or not.

Returns:
true if the field is cleared; false otherwise

toString

public java.lang.String toString()

JDatePicker v4.3

Visit www.jdatepicker.com for further information or send us your suggestions.

Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.