lu.tudor.santec.jtimechooser
Class TimeChangedEvent

java.lang.Object
  extended by lu.tudor.santec.jtimechooser.TimeChangedEvent

public class TimeChangedEvent
extends java.lang.Object

Author:
jens.ferring(at)tudor.lu

Field Summary
static int TIME_CHANGED_BY_CARET_EVENT
           
static int TIME_CHANGED_BY_EXIT_KEY_EVENT
           
static int TIME_CHANGED_BY_FOCUS_LOST
           
static int TIME_CHANGED_BY_MOUSE_DRAGGED
           
static int TIME_CHANGED_BY_MOUSE_RELEASED
           
static int TIME_CHANGED_BY_MOUSE_WHEEL
           
static int TIME_CHANGED_BY_SET_METHOD
           
 
Constructor Summary
TimeChangedEvent(javax.swing.JComponent source, java.util.Date time, int timeChangedBy, boolean modified)
          Used by the JTimeChooser, when time is changed.
 
Method Summary
 java.util.Date getEventTime()
          The time at which the event happened.
 javax.swing.JComponent getSource()
          The JComponent, that caused this event.
 java.util.Date getTime()
          The new time value normally from the JTimeChooser.
 int getTimeWasChangedReason()
          Specifies why the time was changed.
 boolean isTimeModified()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_CHANGED_BY_MOUSE_RELEASED

public static final int TIME_CHANGED_BY_MOUSE_RELEASED
See Also:
Constant Field Values

TIME_CHANGED_BY_MOUSE_DRAGGED

public static final int TIME_CHANGED_BY_MOUSE_DRAGGED
See Also:
Constant Field Values

TIME_CHANGED_BY_FOCUS_LOST

public static final int TIME_CHANGED_BY_FOCUS_LOST
See Also:
Constant Field Values

TIME_CHANGED_BY_EXIT_KEY_EVENT

public static final int TIME_CHANGED_BY_EXIT_KEY_EVENT
See Also:
Constant Field Values

TIME_CHANGED_BY_CARET_EVENT

public static final int TIME_CHANGED_BY_CARET_EVENT
See Also:
Constant Field Values

TIME_CHANGED_BY_MOUSE_WHEEL

public static final int TIME_CHANGED_BY_MOUSE_WHEEL
See Also:
Constant Field Values

TIME_CHANGED_BY_SET_METHOD

public static final int TIME_CHANGED_BY_SET_METHOD
See Also:
Constant Field Values
Constructor Detail

TimeChangedEvent

public TimeChangedEvent(javax.swing.JComponent source,
                        java.util.Date time,
                        int timeChangedBy,
                        boolean modified)
Used by the JTimeChooser, when time is changed.

Parameters:
source - The component, that caused the event
time - The time, set in the JTimeChooser
timeSet - Specifies, why the time is changed. Use one of the TIME_CHANGED_BY-constants
Method Detail

getSource

public javax.swing.JComponent getSource()
The JComponent, that caused this event. Normally it should be the JTimeChooser

Returns:
The component that caused this event

getTime

public java.util.Date getTime()
The new time value normally from the JTimeChooser.

Returns:
The time set in the editor

getEventTime

public java.util.Date getEventTime()
The time at which the event happened.

Returns:
The system time, at which the event happened

getTimeWasChangedReason

public int getTimeWasChangedReason()
Specifies why the time was changed.

Returns:
one of the TIME_CHANGED_BY-constants.

isTimeModified

public boolean isTimeModified()
Returns:
Specifies, whether the time was modified since the call of this component