JIDE 3.5.15

com.jidesoft.gantt
Class AbstractGanttEntryRelationModel<S extends GanttEntry<?>>

java.lang.Object
  extended by com.jidesoft.gantt.AbstractGanttEntryRelationModel<S>
Type Parameters:
S - The type of the GanttEntry in the model.
All Implemented Interfaces:
GanttEntryRelationModel<S>, Serializable
Direct Known Subclasses:
DefaultGanttEntryRelationModel

public abstract class AbstractGanttEntryRelationModel<S extends GanttEntry<?>>
extends Object
implements GanttEntryRelationModel<S>, Serializable

AbstractGanttEntryRelationModel is an abstract implementation of GanttEntryRelationModel. It implements all the methods related to GanttEntryRelationModel but leaves all other methods for subclass to implement.

See Also:
Serialized Form

Field Summary
protected  EventListenerList listenerList
          List of listeners
 
Constructor Summary
protected AbstractGanttEntryRelationModel()
           
 
Method Summary
 void addGanttEntryRelationListener(GanttEntryRelationListener l)
          Adds a listener to the list that's notified each time a change to the gantt model occurs.
 void fireGanttEntryRealtionRemoved(GanttEntryRelation<S> relation)
          Notifies all listeners that an existing relation is removed.
 void fireGanttEntryRelationAdded(GanttEntryRelation<S> relation)
          Notifies all listeners that a new relation is added.
 void fireGanttEntryRelationChanged()
          Notifies all listeners that all Gantt entry relations may have changed.
 void fireGanttEntryRelationChanged(GanttEntryRelationEvent e)
          Forwards the given notification event to all GanttEntryRelationListeners that registered themselves as listeners for this table model.
 void fireGanttEntryRelationCleared()
          Notifies all listeners that all relations are removed
 GanttEntryRelationListener[] getGanttEntryRelationListeners()
          Returns an array of all the gantt model listeners registered on this model.
 void removeGanttEntryRelationListener(GanttEntryRelationListener l)
          Removes a listener from the list that's notified each time a change to the data model occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.gantt.GanttEntryRelationModel
addEntryRelation, getEntryRelation, getEntryRelations, removeEntryRelation, removeEntryRelations
 

Field Detail

listenerList

protected EventListenerList listenerList
List of listeners

Constructor Detail

AbstractGanttEntryRelationModel

protected AbstractGanttEntryRelationModel()
Method Detail

addGanttEntryRelationListener

public void addGanttEntryRelationListener(GanttEntryRelationListener l)
Adds a listener to the list that's notified each time a change to the gantt model occurs.

Specified by:
addGanttEntryRelationListener in interface GanttEntryRelationModel<S extends GanttEntry<?>>
Parameters:
l - the GanttEntryRelationListener

removeGanttEntryRelationListener

public void removeGanttEntryRelationListener(GanttEntryRelationListener l)
Removes a listener from the list that's notified each time a change to the data model occurs.

Specified by:
removeGanttEntryRelationListener in interface GanttEntryRelationModel<S extends GanttEntry<?>>
Parameters:
l - the GanttEntryRelationListener

getGanttEntryRelationListeners

public GanttEntryRelationListener[] getGanttEntryRelationListeners()
Returns an array of all the gantt model listeners registered on this model.

Returns:
all of this model's GanttEntryRelationListeners or an empty array if no gantt model listeners are currently registered
See Also:
addGanttEntryRelationListener(com.jidesoft.gantt.GanttEntryRelationListener), removeGanttEntryRelationListener(com.jidesoft.gantt.GanttEntryRelationListener)

fireGanttEntryRelationChanged

public void fireGanttEntryRelationChanged()
Notifies all listeners that all Gantt entry relations may have changed. The number of relations may also have changed and the GanttChart should redraw from scratch. The structure of the chart (as in the order of the Gantt entries) is assumed to be the same.

See Also:
GanttModelEvent, EventListenerList

fireGanttEntryRelationAdded

public void fireGanttEntryRelationAdded(GanttEntryRelation<S> relation)
Notifies all listeners that a new relation is added.

Parameters:
relation - the related to be added.

fireGanttEntryRealtionRemoved

public void fireGanttEntryRealtionRemoved(GanttEntryRelation<S> relation)
Notifies all listeners that an existing relation is removed.

Parameters:
relation - the relation to be removed

fireGanttEntryRelationCleared

public void fireGanttEntryRelationCleared()
Notifies all listeners that all relations are removed


fireGanttEntryRelationChanged

public void fireGanttEntryRelationChanged(GanttEntryRelationEvent e)
Forwards the given notification event to all GanttEntryRelationListeners that registered themselves as listeners for this table model.

Parameters:
e - the event to be forwarded
See Also:
addGanttEntryRelationListener(com.jidesoft.gantt.GanttEntryRelationListener), GanttModelEvent, EventListenerList

JIDE 3.5.15