JIDE 3.5.15

com.jidesoft.gantt
Class GanttEntryRelationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jidesoft.gantt.GanttEntryRelationEvent
All Implemented Interfaces:
Serializable

public class GanttEntryRelationEvent
extends EventObject

GanttEntryRelationEvent is used to notify listeners that a GanttEntryRelationModel has changed. The model event describes which relation and the type of the change which could be ADD or REMOVE.

See Also:
Serialized Form

Field Summary
protected  GanttEntryRelation<?> _relation
           
protected  int _type
           
static int ADD
           
static int REMOVE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GanttEntryRelationEvent(GanttEntryRelationModel<?> source)
          Creates a GanttEntryRelationEvent.
GanttEntryRelationEvent(GanttEntryRelationModel<?> source, int type)
          Creates a GanttEntryRelationEvent.
GanttEntryRelationEvent(GanttEntryRelationModel<?> source, int type, GanttEntryRelation<?> relation)
          Creates a GanttEntryRelationEvent.
GanttEntryRelationEvent(Object source)
           
 
Method Summary
 GanttEntryRelation<?> getGanttEntryRelation()
          Gets the relation that is changed in this event.
 int getType()
          Returns the type of event - one of: ADD, REMOVE.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final int ADD
See Also:
Constant Field Values

REMOVE

public static final int REMOVE
See Also:
Constant Field Values

_type

protected int _type

_relation

protected GanttEntryRelation<?> _relation
Constructor Detail

GanttEntryRelationEvent

public GanttEntryRelationEvent(Object source)

GanttEntryRelationEvent

public GanttEntryRelationEvent(GanttEntryRelationModel<?> source)
Creates a GanttEntryRelationEvent. The only place this constructor is called is when fireGanttEntryRelationChanged method is called in AbstractGanttEntryRelationModel. It means the gantt entry relation changed so much that it'd better if the listeners get the relations from the model from scratch. The type of the event in this case is undefined.

Parameters:
source - the source which is GanttEntryRelationModel.

GanttEntryRelationEvent

public GanttEntryRelationEvent(GanttEntryRelationModel<?> source,
                               int type)
Creates a GanttEntryRelationEvent. The only place this constructor is called is when fireGanttEntryRelationCleared method is called in AbstractGanttEntryRelationModel. The type is REMOVE in this case.

Parameters:
source - the source which is GanttEntryRelationModel.
type - the type of the event.

GanttEntryRelationEvent

public GanttEntryRelationEvent(GanttEntryRelationModel<?> source,
                               int type,
                               GanttEntryRelation<?> relation)
Creates a GanttEntryRelationEvent.

Parameters:
source - the source which is GanttEntryRelationModel.
type - the type of the event.
relation - the relation that is added or removed.
Method Detail

getGanttEntryRelation

public GanttEntryRelation<?> getGanttEntryRelation()
Gets the relation that is changed in this event. It could be null which means all relations are changed. For examples, all relations are cleared from the model.

Returns:
the relation that is changed in this event.

getType

public int getType()
Returns the type of event - one of: ADD, REMOVE.

Returns:
the type of the event.

JIDE 3.5.15