Class DateTimeChangeEvent
java.lang.Object
com.github.lgooddatepicker.zinternaltools.DateTimeChangeEvent
DateTimeChangeEvent, An instance of this event class is passed to each registered
DateTimeChangeListener, whenever the date or the time in a DateTimePicker has changed.
Note that this class will always contain either one dateChangeEvent, or one timeChangeEvent, but
never both events at the same time.
-
Constructor Summary
ConstructorsConstructorDescriptionDateTimeChangeEvent
(DateTimePicker source, DatePicker datePicker, TimePicker timePicker, DateChangeEvent dateChangeEvent, TimeChangeEvent timeChangeEvent) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDateChangeEvent, If the date changed, then this returns the date change event.getDatePicker, Returns a reference to the date picker component of the DateTimePicker.getNewDateTimePermissive, This returns the new LocalDateTime value from the DateTimePicker, as it would be reported by getSource().getDateTimePermissive().getNewDateTimeStrict, This returns the new LocalDateTime value from the DateTimePicker, as it would be reported by getSource().getDateTimeStrict().getOldDateTimePermissive, This returns the old LocalDateTime value from the DateTimePicker, as it would have been reported by getSource().getDateTimePermissive(), before this change event occurred.getOldDateTimeStrict, This returns the old LocalDateTime value from the DateTimePicker, as it would have been reported by getSource().getDateTimeStrict(), before this change event occurred.getSource, Returns the DateTimePicker that generated the event.getTimeChangeEvent, If the time changed, then this returns the time change event.getTimePicker, Returns a reference to the time picker component of the DateTimePicker.
-
Constructor Details
-
DateTimeChangeEvent
public DateTimeChangeEvent(DateTimePicker source, DatePicker datePicker, TimePicker timePicker, DateChangeEvent dateChangeEvent, TimeChangeEvent timeChangeEvent) Constructor.
-
-
Method Details
-
getSource
getSource, Returns the DateTimePicker that generated the event. -
getDatePicker
getDatePicker, Returns a reference to the date picker component of the DateTimePicker. -
getTimePicker
getTimePicker, Returns a reference to the time picker component of the DateTimePicker. -
getDateChangeEvent
getDateChangeEvent, If the date changed, then this returns the date change event. Otherwise this returns null. -
getTimeChangeEvent
getTimeChangeEvent, If the time changed, then this returns the time change event. Otherwise this returns null. -
getNewDateTimeStrict
getNewDateTimeStrict, This returns the new LocalDateTime value from the DateTimePicker, as it would be reported by getSource().getDateTimeStrict(). For additional details, see DateTimePicker.getDateTimeStrict(). -
getNewDateTimePermissive
getNewDateTimePermissive, This returns the new LocalDateTime value from the DateTimePicker, as it would be reported by getSource().getDateTimePermissive(). For additional details, see DateTimePicker.getDateTimePermissive(). -
getOldDateTimeStrict
getOldDateTimeStrict, This returns the old LocalDateTime value from the DateTimePicker, as it would have been reported by getSource().getDateTimeStrict(), before this change event occurred. For additional details, see DateTimePicker.getDateTimeStrict(). -
getOldDateTimePermissive
getOldDateTimePermissive, This returns the old LocalDateTime value from the DateTimePicker, as it would have been reported by getSource().getDateTimePermissive(), before this change event occurred. For additional details, see DateTimePicker.getDateTimePermissive().
-