jsynoptic.data
Class DataSourceCollectionAnimatorProvider

java.lang.Object
  extended by simtools.data.FileDataSourceProvider
      extended by simtools.data.DataSourceCollectionAnimatorProvider
          extended by jsynoptic.data.DataSourceCollectionAnimatorProvider
All Implemented Interfaces:
DataSourceProvider

public class DataSourceCollectionAnimatorProvider
extends DataSourceCollectionAnimatorProvider

Overloads the collection animator and provides actions for the popup menu in the source tree


Field Summary
static BasicMessageWriter resources
           
 
Fields inherited from class simtools.data.FileDataSourceProvider
CANCEL_OPTION, chooseAgain, filter, marker, NO_OPTION, YES_OPTION
 
Constructor Summary
DataSourceCollectionAnimatorProvider()
           
 
Method Summary
 int chooseUseCollection(DataSourceCollection existingDsc, java.lang.String dscId, java.lang.String id)
          Chooses whether to use an already existing collection if it contains the datasource to provide, instead of the collection with the given id.
 DataSource provide(java.lang.String id, java.lang.String dscId, java.lang.Object optionalInformation, DataSourcePool pool)
          Asks this provider to resolve a symbolic datasource reference.
 
Methods inherited from class simtools.data.DataSourceCollectionAnimatorProvider
createEmptyDatasource, getOptionalInformation
 
Methods inherited from class simtools.data.FileDataSourceProvider
chooseFile, chooseUseCollectionIfMissingDs, createCollection, getChooseFileAgain, setChooseFileAgain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

public static BasicMessageWriter resources
Constructor Detail

DataSourceCollectionAnimatorProvider

public DataSourceCollectionAnimatorProvider()
Method Detail

chooseUseCollection

public int chooseUseCollection(DataSourceCollection existingDsc,
                               java.lang.String dscId,
                               java.lang.String id)
Description copied from class: FileDataSourceProvider
Chooses whether to use an already existing collection if it contains the datasource to provide, instead of the collection with the given id. Default implementation says no.

Overrides:
chooseUseCollection in class FileDataSourceProvider
Parameters:
existingDsc - The existing collection
dscId - The collection id to replace
Returns:
YES_OPTION to use the collection present in the pool, NO_OPTION to choose collection with given id,

provide

public DataSource provide(java.lang.String id,
                          java.lang.String dscId,
                          java.lang.Object optionalInformation,
                          DataSourcePool pool)
Description copied from interface: DataSourceProvider
Asks this provider to resolve a symbolic datasource reference.

Specified by:
provide in interface DataSourceProvider
Overrides:
provide in class DataSourceCollectionAnimatorProvider
Parameters:
id - The symbolic id of a datasource
dscId - The symbolic id of a datasourceCollection. May be null
optionalInformation - Can be set to help this provider. May be null
pool - DataSourcePool in which to add the source and collection if they can be provided. May be null.
Returns:
The desired datasource if it can be provided, or null.