ilog.server.jsds.adapter
Class IlsGanttDS2IlvHierarchyChartAdapter

java.lang.Object
  |
  +--ilog.ds.adapter.IlAbstractAdapter
        |
        +--ilog.ds.adapter.IlAbstractGanttModelAdapter
              |
              +--ilog.server.jsds.adapter.IlsGanttDS2IlvHierarchyChartAdapter
All Implemented Interfaces:
ilog.views.gantt.event.ActivityHierarchyListener, ilog.views.gantt.event.ActivityListener, BatchListener, ilog.views.gantt.event.ConstraintListener, DataSourceListener, DSConnectionListener, java.util.EventListener, GanttDSListener, IlFreezableAdapter, IlJPluggableAdapter, IlPluggableAdapter, ilog.views.gantt.event.ReservationListener, ilog.views.gantt.event.ResourceHierarchyListener, ilog.views.gantt.event.ResourceListener

public class IlsGanttDS2IlvHierarchyChartAdapter
extends IlAbstractGanttModelAdapter
implements DSConnectionListener, IlJPluggableAdapter

Class for gantt data source adapters to JViews gantt model.

See Also:
IlAbstractGanttModelAdapter

Field Summary
protected  ilog.views.gantt.IlvActivityFactory _ActivityFactory
           
protected  ilog.views.gantt.IlvConstraintFactory _ConstraintFactory
           
protected  ilog.views.gantt.IlvReservationFactory _ReservationFactory
           
protected  ilog.views.gantt.IlvResourceFactory _ResourceFactory
           
protected  ilog.util.IlEventListenerList _strategies
           
 
Fields inherited from class ilog.ds.adapter.IlAbstractGanttModelAdapter
_ds2model, _gds, _gdse, _gm, _model2ds, _rootActivity, _rootResource, _timeConstant, _timeFactor
 
Fields inherited from class ilog.ds.adapter.IlAbstractAdapter
_dispatchListeners, _events, _frozenEvents, _inBatchedEvents, _inTransaction, _isFrozen, _syncStrategy
 
Constructor Summary
IlsGanttDS2IlvHierarchyChartAdapter()
          Instantiate a new IlsGanttDS2GanttModelAdapter.
 
Method Summary
 void addStrategy(IlsGanttDS2IlvHierarchyChartStrategy s)
           
protected  ilog.views.gantt.IlvActivity createActivity(java.util.Map properties)
          Method called to create an activity in the gantt model.
protected  ilog.views.gantt.IlvConstraint createConstraint(ilog.views.gantt.IlvActivity fromActivity, ilog.views.gantt.IlvActivity toActivity, java.util.Map properties)
          Method called to create a constraint in the gantt model.
protected  ilog.views.gantt.IlvReservation createReservation(ilog.views.gantt.IlvResource resource, ilog.views.gantt.IlvActivity activity, java.util.Map properties)
          Method called to create a reservation in the gantt model.
protected  ilog.views.gantt.IlvResource createResource(java.util.Map properties)
          Method called to create a resource in the gantt model.
 void dataSourceConnected(DSConnectionEvent e)
           
 void dataSourceDisconnected(DSConnectionEvent e)
           
 IlsGanttDS2IlvHierarchyChartStrategy findStrategy(java.lang.Class strategy)
           
protected  void fireInternalActivityAdded(ActivityEvent e)
           
protected  void fireInternalActivityRemoved(ActivityEvent e)
           
protected  void fireInternalActivityUpdated(ActivityEvent e)
           
protected  void fireInternalConstraintAdded(ConstraintEvent e)
           
protected  void fireInternalConstraintRemoved(ConstraintEvent e)
           
protected  void fireInternalConstraintUpdated(ConstraintEvent e)
           
protected  void fireInternalDataSourceChange(DataSourceEvent e)
           
protected  void fireInternalDataSourceConnected(DSConnectionEvent e)
           
protected  void fireInternalDataSourceDisconnected(DSConnectionEvent e)
           
protected  void fireInternalReservationAdded(ReservationEvent e)
           
protected  void fireInternalReservationRemoved(ReservationEvent e)
           
protected  void fireInternalReservationUpdated(ReservationEvent e)
           
protected  void fireInternalResourceAdded(ResourceEvent e)
           
protected  void fireInternalResourceRemoved(ResourceEvent e)
           
protected  void fireInternalResourceUpdated(ResourceEvent e)
           
protected  void fireInternalRootActivitySet(ActivityEvent e)
           
protected  void fireInternalRootResourceSet(ResourceEvent e)
           
protected  java.awt.Component firePlugComponent(java.awt.Component component)
           
protected  java.util.ArrayList firePostDispatchBatchedEvents(java.util.ArrayList events)
           
protected  java.util.ArrayList firePreDispatchBatchedEvents(java.util.ArrayList events)
           
protected  ilog.views.gantt.IlvGanttModel fireSetModel(ilog.views.gantt.IlvGanttModel gantt)
           
protected  java.awt.Component fireUnplugComponent(java.awt.Component component)
           
protected  void instantiateDefaultFactories()
           
protected  void internalActivityAdded(ActivityEvent e)
           
protected  void internalActivityRemoved(ActivityEvent e)
           
protected  void internalActivityUpdated(ActivityEvent e)
           
protected  void internalConstraintAdded(ConstraintEvent e)
           
protected  void internalConstraintRemoved(ConstraintEvent e)
           
protected  void internalConstraintUpdated(ConstraintEvent e)
           
protected  void internalDataSourceChange(DataSourceEvent e)
           
protected  void internalReservationAdded(ReservationEvent e)
           
protected  void internalReservationRemoved(ReservationEvent e)
           
protected  void internalReservationUpdated(ReservationEvent e)
           
protected  void internalResourceAdded(ResourceEvent e)
           
protected  void internalResourceRemoved(ResourceEvent e)
           
protected  void internalResourceUpdated(ResourceEvent e)
           
protected  void internalRootActivitySet(ActivityEvent e)
           
protected  void internalRootResourceSet(ResourceEvent e)
           
 void plugComponent(java.awt.Component component)
           
 void plugDataModel(java.lang.Object model)
           
 void plugDataSource(IlDataSource dataSource)
           
 void plugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
           
protected  void postDispatchBatchedEvents(java.util.ArrayList events)
           
protected  void preDispatchBatchedEvents(java.util.ArrayList events)
           
 void removeStrategy(IlsGanttDS2IlvHierarchyChartStrategy s)
           
 void setGanttDataSource(IlGanttDataSource gds)
           
 void unplugComponent(java.awt.Component component)
           
 void unplugDataModel(java.lang.Object model)
           
 void unplugDataSource(IlDataSource dataSource)
           
 void unplugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
           
protected  void updateActivity(ilog.views.gantt.IlvActivity activity, java.util.Map properties)
          Method called to update an activity in the gantt model.
protected  void updateConstraint(ilog.views.gantt.IlvConstraint constraint, java.util.Map properties)
          Method called to update a constraint in the gantt model.
protected  void updateReservation(ilog.views.gantt.IlvReservation reservation, java.util.Map properties)
          Method called to update a reservation in the gantt model.
protected  void updateResource(ilog.views.gantt.IlvResource resource, java.util.Map properties)
          Method called to update a resource in the gantt model.
 
Methods inherited from class ilog.ds.adapter.IlAbstractGanttModelAdapter
activitiesInserted, activitiesRemoved, activityChange, activityChanged, activityMoved, activityPropertyChange, constraintChange, constraintChanged, constraintInserted, constraintRemoved, ConstraintTypeChange, dataSourceChange, dispatchBatchedEvent, dispatchBatchedEvents, getActivity, getConstraint, getDSActivity, getDSConstraint, getDSReservation, getDSResource, getGanttDataSource, getGanttDataSourceEditor, getModel, getReservation, getResource, getSynchronizationObject, getTimeConstant, getTimeFactor, reservationChange, reservationChanged, reservationInserted, reservationRemoved, reservedResourceChange, resourceChange, resourceChanged, resourceMoved, resourcePropertyChange, resourcesInserted, resourcesRemoved, setGanttDataSourceEditor, setModel, setTimeConstant, setTimeFactor
 
Methods inherited from class ilog.ds.adapter.IlAbstractAdapter
addDispatchListener, addDSEvent, clearDSEvents, endBatch, firePostDispatchBatchedEventsEvent, firePreDispatchBatchedEventsEvent, GetColor, getSynchronizationStrategy, isFrozen, isInBatchedEvents, isInTransaction, removeDispatchListener, setFrozen, setSynchronizationStrategy, startBatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_strategies

protected ilog.util.IlEventListenerList _strategies

_ActivityFactory

protected ilog.views.gantt.IlvActivityFactory _ActivityFactory

_ResourceFactory

protected ilog.views.gantt.IlvResourceFactory _ResourceFactory

_ConstraintFactory

protected ilog.views.gantt.IlvConstraintFactory _ConstraintFactory

_ReservationFactory

protected ilog.views.gantt.IlvReservationFactory _ReservationFactory
Constructor Detail

IlsGanttDS2IlvHierarchyChartAdapter

public IlsGanttDS2IlvHierarchyChartAdapter()
Instantiate a new IlsGanttDS2GanttModelAdapter.
Method Detail

instantiateDefaultFactories

protected void instantiateDefaultFactories()

dataSourceConnected

public void dataSourceConnected(DSConnectionEvent e)
Description copied from interface: DSConnectionListener
This method is invoked when the data source is connected (view opened).
Specified by:
dataSourceConnected in interface DSConnectionListener
Following copied from interface: ilog.server.jsds.DSConnectionListener
Parameters:
e - The event
See Also:
DSConnectionEvent

dataSourceDisconnected

public void dataSourceDisconnected(DSConnectionEvent e)
Description copied from interface: DSConnectionListener
This method is invoked when the data source is disconnected (view closed).
Specified by:
dataSourceDisconnected in interface DSConnectionListener
Following copied from interface: ilog.server.jsds.DSConnectionListener
Parameters:
e - The event
See Also:
DSConnectionEvent

setGanttDataSource

public void setGanttDataSource(IlGanttDataSource gds)
Description copied from class: IlAbstractGanttModelAdapter
Sets the IlGanttDataSource to use.
Overrides:
setGanttDataSource in class IlAbstractGanttModelAdapter

preDispatchBatchedEvents

protected void preDispatchBatchedEvents(java.util.ArrayList events)
Description copied from class: IlAbstractAdapter
dispatching events methods
Overrides:
preDispatchBatchedEvents in class IlAbstractAdapter

postDispatchBatchedEvents

protected void postDispatchBatchedEvents(java.util.ArrayList events)
Overrides:
postDispatchBatchedEvents in class IlAbstractAdapter

internalDataSourceChange

protected void internalDataSourceChange(DataSourceEvent e)
Description copied from class: IlAbstractGanttModelAdapter
Internal code called in the Swing event thread
Overrides:
internalDataSourceChange in class IlAbstractGanttModelAdapter

internalRootActivitySet

protected void internalRootActivitySet(ActivityEvent e)
Overrides:
internalRootActivitySet in class IlAbstractGanttModelAdapter

internalActivityAdded

protected void internalActivityAdded(ActivityEvent e)
Overrides:
internalActivityAdded in class IlAbstractGanttModelAdapter

internalActivityUpdated

protected void internalActivityUpdated(ActivityEvent e)
Overrides:
internalActivityUpdated in class IlAbstractGanttModelAdapter

internalActivityRemoved

protected void internalActivityRemoved(ActivityEvent e)
Overrides:
internalActivityRemoved in class IlAbstractGanttModelAdapter

internalRootResourceSet

protected void internalRootResourceSet(ResourceEvent e)
Overrides:
internalRootResourceSet in class IlAbstractGanttModelAdapter

internalResourceAdded

protected void internalResourceAdded(ResourceEvent e)
Overrides:
internalResourceAdded in class IlAbstractGanttModelAdapter

internalResourceUpdated

protected void internalResourceUpdated(ResourceEvent e)
Overrides:
internalResourceUpdated in class IlAbstractGanttModelAdapter

internalResourceRemoved

protected void internalResourceRemoved(ResourceEvent e)
Overrides:
internalResourceRemoved in class IlAbstractGanttModelAdapter

internalConstraintAdded

protected void internalConstraintAdded(ConstraintEvent e)
Overrides:
internalConstraintAdded in class IlAbstractGanttModelAdapter

internalConstraintUpdated

protected void internalConstraintUpdated(ConstraintEvent e)
Overrides:
internalConstraintUpdated in class IlAbstractGanttModelAdapter

internalConstraintRemoved

protected void internalConstraintRemoved(ConstraintEvent e)
Overrides:
internalConstraintRemoved in class IlAbstractGanttModelAdapter

internalReservationAdded

protected void internalReservationAdded(ReservationEvent e)
Overrides:
internalReservationAdded in class IlAbstractGanttModelAdapter

internalReservationUpdated

protected void internalReservationUpdated(ReservationEvent e)
Overrides:
internalReservationUpdated in class IlAbstractGanttModelAdapter

internalReservationRemoved

protected void internalReservationRemoved(ReservationEvent e)
Overrides:
internalReservationRemoved in class IlAbstractGanttModelAdapter

createActivity

protected ilog.views.gantt.IlvActivity createActivity(java.util.Map properties)
Method called to create an activity in the gantt model.
Overrides:
createActivity in class IlAbstractGanttModelAdapter
Parameters:
properties - The properties from the data source
Returns:
the newly created IlvActivity, corresponding to the parameters.

updateActivity

protected void updateActivity(ilog.views.gantt.IlvActivity activity,
                              java.util.Map properties)
Method called to update an activity in the gantt model.
Overrides:
updateActivity in class IlAbstractGanttModelAdapter
Parameters:
activity - the IlvActivity to update
properties - The updated properties from the data source

createResource

protected ilog.views.gantt.IlvResource createResource(java.util.Map properties)
Method called to create a resource in the gantt model.
Overrides:
createResource in class IlAbstractGanttModelAdapter
Parameters:
properties - The properties from the data source
Returns:
the newly created IlvResource, corresponding to the parameters.

updateResource

protected void updateResource(ilog.views.gantt.IlvResource resource,
                              java.util.Map properties)
Method called to update a resource in the gantt model.
Overrides:
updateResource in class IlAbstractGanttModelAdapter
Parameters:
resource - the IlvResource to update
properties - The updated properties from the data source

createConstraint

protected ilog.views.gantt.IlvConstraint createConstraint(ilog.views.gantt.IlvActivity fromActivity,
                                                          ilog.views.gantt.IlvActivity toActivity,
                                                          java.util.Map properties)
Method called to create a constraint in the gantt model.
Overrides:
createConstraint in class IlAbstractGanttModelAdapter
Parameters:
properties - The properties from the data source
Returns:
the newly created IlvConstraint, corresponding to the parameters.

updateConstraint

protected void updateConstraint(ilog.views.gantt.IlvConstraint constraint,
                                java.util.Map properties)
Method called to update a constraint in the gantt model.
Overrides:
updateConstraint in class IlAbstractGanttModelAdapter
Parameters:
constraint - the IlvConstraint to update
properties - The updated properties from the data source

createReservation

protected ilog.views.gantt.IlvReservation createReservation(ilog.views.gantt.IlvResource resource,
                                                            ilog.views.gantt.IlvActivity activity,
                                                            java.util.Map properties)
Method called to create a reservation in the gantt model.
Overrides:
createReservation in class IlAbstractGanttModelAdapter
Parameters:
properties - The properties from the data source
Returns:
the newly created IlvReservation, corresponding to the parameters.

updateReservation

protected void updateReservation(ilog.views.gantt.IlvReservation reservation,
                                 java.util.Map properties)
Method called to update a reservation in the gantt model.
Overrides:
updateReservation in class IlAbstractGanttModelAdapter
Parameters:
reservation - the IlvReservation to update
properties - The updated properties from the data source

plugDataSource

public void plugDataSource(IlDataSource dataSource)
                    throws IllegalDataSourceException
Description copied from interface: IlPluggableAdapter
Verify data source type, adapter stores and listens to data source.
Specified by:
plugDataSource in interface IlPluggableAdapter

unplugDataSource

public void unplugDataSource(IlDataSource dataSource)
Description copied from interface: IlPluggableAdapter
Adapter cancels storing and stops listening to data source.
Specified by:
unplugDataSource in interface IlPluggableAdapter

plugDataSourceEditor

public void plugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
                          throws IllegalDataSourceEditorException
Description copied from interface: IlPluggableAdapter
Verify data source editor type, adapter stores data source editor.
Specified by:
plugDataSourceEditor in interface IlPluggableAdapter

unplugDataSourceEditor

public void unplugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
Description copied from interface: IlPluggableAdapter
Adapter cancels storing of data source editor.
Specified by:
unplugDataSourceEditor in interface IlPluggableAdapter

plugDataModel

public void plugDataModel(java.lang.Object model)
                   throws IllegalModelException
Description copied from interface: IlJPluggableAdapter
Verify data model type, adapter stores and listens data model. Be sure to plug model before plugging any components.
Specified by:
plugDataModel in interface IlJPluggableAdapter

unplugDataModel

public void unplugDataModel(java.lang.Object model)
Description copied from interface: IlJPluggableAdapter
Adapter cancels storing and stops listening to data model. Be sure to have unplugged all component first.
Specified by:
unplugDataModel in interface IlJPluggableAdapter

plugComponent

public void plugComponent(java.awt.Component component)
                   throws IllegalComponentException
Description copied from interface: IlJPluggableAdapter
Eventually verify component type, adapter eventually listens graphic component, component is plugged to data model (so, model must be plugged first).
Specified by:
plugComponent in interface IlJPluggableAdapter

unplugComponent

public void unplugComponent(java.awt.Component component)
Description copied from interface: IlJPluggableAdapter
Adapter eventually stops listening to graphic component, component is also unplugged from data model, so unplug model only after having unplugged all components
Specified by:
unplugComponent in interface IlJPluggableAdapter

addStrategy

public void addStrategy(IlsGanttDS2IlvHierarchyChartStrategy s)

removeStrategy

public void removeStrategy(IlsGanttDS2IlvHierarchyChartStrategy s)

findStrategy

public IlsGanttDS2IlvHierarchyChartStrategy findStrategy(java.lang.Class strategy)

firePreDispatchBatchedEvents

protected java.util.ArrayList firePreDispatchBatchedEvents(java.util.ArrayList events)

firePostDispatchBatchedEvents

protected java.util.ArrayList firePostDispatchBatchedEvents(java.util.ArrayList events)

fireInternalDataSourceChange

protected void fireInternalDataSourceChange(DataSourceEvent e)

fireSetModel

protected ilog.views.gantt.IlvGanttModel fireSetModel(ilog.views.gantt.IlvGanttModel gantt)

fireInternalRootActivitySet

protected void fireInternalRootActivitySet(ActivityEvent e)

fireInternalActivityAdded

protected void fireInternalActivityAdded(ActivityEvent e)

fireInternalActivityUpdated

protected void fireInternalActivityUpdated(ActivityEvent e)

fireInternalActivityRemoved

protected void fireInternalActivityRemoved(ActivityEvent e)

fireInternalRootResourceSet

protected void fireInternalRootResourceSet(ResourceEvent e)

fireInternalResourceAdded

protected void fireInternalResourceAdded(ResourceEvent e)

fireInternalResourceUpdated

protected void fireInternalResourceUpdated(ResourceEvent e)

fireInternalResourceRemoved

protected void fireInternalResourceRemoved(ResourceEvent e)

fireInternalConstraintAdded

protected void fireInternalConstraintAdded(ConstraintEvent e)

fireInternalConstraintUpdated

protected void fireInternalConstraintUpdated(ConstraintEvent e)

fireInternalConstraintRemoved

protected void fireInternalConstraintRemoved(ConstraintEvent e)

fireInternalReservationAdded

protected void fireInternalReservationAdded(ReservationEvent e)

fireInternalReservationUpdated

protected void fireInternalReservationUpdated(ReservationEvent e)

fireInternalReservationRemoved

protected void fireInternalReservationRemoved(ReservationEvent e)

fireInternalDataSourceConnected

protected void fireInternalDataSourceConnected(DSConnectionEvent e)

fireInternalDataSourceDisconnected

protected void fireInternalDataSourceDisconnected(DSConnectionEvent e)

firePlugComponent

protected java.awt.Component firePlugComponent(java.awt.Component component)

fireUnplugComponent

protected java.awt.Component fireUnplugComponent(java.awt.Component component)