com.miginfocom.util.dates
Class DateChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.miginfocom.util.dates.DateChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class DateChangeEvent
extends java.util.EventObject

An event that has information abount changes of date ranges.

See Also:
Serialized Form

Field Summary
static int MOUSE_OVER
          Mouse hovers over this date.
static int PRESSED
          When a date range has been temporary selected or PRESSED.
static int SELECTABLE
          When the selectable date range has been changed.
static int SELECTED
          When a date range has been permanently selected.
static int UNKNOWN
          A generic type.
static int VISIBLE
          When the visible date range has been changed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DateChangeEvent(java.lang.Object source, DateRangeI oldRange, DateRangeI newRange, int type)
          Constructor.
 
Method Summary
 ImmutableDateRange getNewRange()
          Returns the new range or null if there was no new range.
 ImmutableDateRange getOldRange()
          Returns the old range or null if not applicable
 java.lang.Object getSource()
          Returns the source at which the event happened.
 int getType()
          Returns the type, E.g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
A generic type.

See Also:
Constant Field Values

MOUSE_OVER

public static final int MOUSE_OVER
Mouse hovers over this date.

See Also:
Constant Field Values

PRESSED

public static final int PRESSED
When a date range has been temporary selected or PRESSED.

See Also:
Constant Field Values

SELECTED

public static final int SELECTED
When a date range has been permanently selected.

See Also:
Constant Field Values

SELECTABLE

public static final int SELECTABLE
When the selectable date range has been changed.

See Also:
Constant Field Values

VISIBLE

public static final int VISIBLE
When the visible date range has been changed.

See Also:
Constant Field Values
Constructor Detail

DateChangeEvent

public DateChangeEvent(java.lang.Object source,
                       DateRangeI oldRange,
                       DateRangeI newRange,
                       int type)
Constructor.

Parameters:
source - The source at which the event happened. Can be null if not applicable.
oldRange - The old range or null if not applicable. Will be cloned locally if not already immutable. The old range doesn't need to be provided.
newRange - The new range or null if there was no new range. Will be cloned locally if not already immutable.
type - The type, E.g. SELECTED. As a contract between the producer and reciever of the event and can assume any value.
See Also:
DateRange.getImmutable()
Method Detail

getSource

public final java.lang.Object getSource()
Returns the source at which the event happened. Can be null if not applicable.

Overrides:
getSource in class java.util.EventObject
Returns:
The source at which the event happened. Can be null if not applicable.

getOldRange

public final ImmutableDateRange getOldRange()
Returns the old range or null if not applicable

Returns:
The old range or null if not applicable

getNewRange

public final ImmutableDateRange getNewRange()
Returns the new range or null if there was no new range.

Returns:
The new range or null if there was no new range.

getType

public final int getType()
Returns the type, E.g. SELECTED. As a contract between the producer and reciever of the event and can assume any value.

Returns:
The type, E.g. SELECTED. As a contract between the producer and reciever of the event and can assume any value.

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.