com.miginfocom.calendar.category
Class CategoryStructureEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.miginfocom.calendar.category.CategoryStructureEvent
All Implemented Interfaces:
java.io.Serializable

public class CategoryStructureEvent
extends java.util.EventObject

An event that has information abount changes of date ranges.

See Also:
Serialized Form

Field Summary
static int ADDED
          One or more categories was added but usually not as a result of a direct creation.
static int ADDED_CREATED
          One or more categories was added as a result of creation.
static int CHILDREN_REARRANGED
          Children of the category was rearranged.
static int EXCHANGED
          A category was exchanged for another one.
static int REMOVED
          One or more categories was removed but usually not as a result of a direct deletion.
static int REMOVED_DELETED
          One or more categories was removed as a result of deletion.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CategoryStructureEvent(java.lang.Object source, Category category, Category parent, int type)
          Constructor.
 
Method Summary
 Category getCategory()
          Returns The category that was affected.
 Category getParent()
          Returns the parent of the category that was affected.
 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

ADDED

public static final int ADDED
One or more categories was added but usually not as a result of a direct creation. It might be added from another source where it was created for instance.

See Also:
Constant Field Values

REMOVED

public static final int REMOVED
One or more categories was removed but usually not as a result of a direct deletion. If might be removed because it no longer was needed in memory for instance.

See Also:
Constant Field Values

EXCHANGED

public static final int EXCHANGED
A category was exchanged for another one.

See Also:
Constant Field Values

ADDED_CREATED

public static final int ADDED_CREATED
One or more categories was added as a result of creation. The creation part might for instance hint synchronizing tools that they should add this to their database for instance.

See Also:
Constant Field Values

REMOVED_DELETED

public static final int REMOVED_DELETED
One or more categories was removed as a result of deletion. The deletion part might for instance hint synchronizing tools that they should remove this from their database.

See Also:
Constant Field Values

CHILDREN_REARRANGED

public static final int CHILDREN_REARRANGED
Children of the category was rearranged. Possibly due to sorting.

See Also:
Constant Field Values
Constructor Detail

CategoryStructureEvent

public CategoryStructureEvent(java.lang.Object source,
                              Category category,
                              Category parent,
                              int type)
Constructor.

Parameters:
source - The source of the event. Just provided for reference.
category - The category that was affected.
parent - The parent of the category that was affected.
type - The type, E.g. REMOVED.
See Also:
DateRange.getImmutable()
Method Detail

getSource

public final java.lang.Object getSource()
Returns the source at which the event happened.

Overrides:
getSource in class java.util.EventObject
Returns:
The source at which the event happened.

getCategory

public final Category getCategory()
Returns The category that was affected.

Returns:
The category that was affected.

getParent

public final Category getParent()
Returns the parent of the category that was affected.

Returns:
The parent of the category that was affected.

getType

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

Returns:
The type, E.g. REMOVED. 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.