Class FeatureTable
- java.lang.Object
 - 
- com.esri.arcgisruntime.data.FeatureTable
 
 
- 
- All Implemented Interfaces:
 Loadable,PopupSource
- Direct Known Subclasses:
 ArcGISFeatureTable,FeatureCollectionTable,GeoPackageFeatureTable,OgcFeatureCollectionTable,ShapefileFeatureTable,WfsFeatureTable
public abstract class FeatureTable extends java.lang.Object implements Loadable, PopupSource
Represents a table ofFeatures.A table defines a set of
Fields, aGeometryTypeand aSpatialReference. FeatureTable can also represent non-spatial data that has no GeomeryType or SpatialReference. FeatureTables have a fixed schema.FeatureTable provides
queryFeaturesAsync(com.esri.arcgisruntime.data.QueryParameters)for spatial and attribute querying, and methods to add, update, and delete features.Create instances of FeatureTable's subclasses using their constructors. A FeatureTable is used to create a
FeatureLayer. The FeatureLayer, when added to a map, will display the table's features in the map.- Since:
 - 100.0.0
 
 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDoneLoadingListener(java.lang.Runnable listener)Adds a listener to the loadable resource that is invoked when loading has completed.ListenableFuture<java.lang.Void>addFeatureAsync(Feature feature)Adds a new feature to the feature table.ListenableFuture<java.lang.Void>addFeaturesAsync(java.lang.Iterable<Feature> features)Adds new features to the feature table.voidaddLoadStatusChangedListener(LoadStatusChangedListener listener)Adds aLoadStatusChangedListenerto the loadable resource that is invoked whenever the load status changes.booleancanAdd()Return true if new features can be added to the feature table, false otherwise.voidcancelLoad()Cancels loading metadata for the object.booleancanDelete(Feature feature)Checks whether the given feature can be deleted.booleancanEditGeometry()Returns true if the geometry of a feature from this table can be edited, otherwise false.booleancanUpdate(Feature feature)Checks whether the given feature can be updated.FeaturecreateFeature()Creates a feature that matches the schema of the feature table.FeaturecreateFeature(java.util.Map<java.lang.String,java.lang.Object> attributes, Geometry geometry)Creates a feature, with the given attributes and geometryListenableFuture<java.lang.Void>deleteFeatureAsync(Feature feature)Deletes a feature from this feature table.ListenableFuture<java.lang.Void>deleteFeaturesAsync(java.lang.Iterable<Feature> features)Deletes features from this feature table.java.lang.StringgetDisplayName()Returns the table's display name.EnvelopegetExtent()Gets the geographic extent of features within the table.FeatureLayergetFeatureLayer()Deprecated.As of 100.7.0, replaced bygetLayer().FieldgetField(java.lang.String fieldName)Gets a field by its name.java.util.List<Field>getFields()Gets a list of all fields for this FeatureTable.GeometryTypegetGeometryType()Returns the geometry type for this FeatureTable.LayergetLayer()Returns the layer this table is associated with, or created from, if any.ArcGISRuntimeExceptiongetLoadError()Returns the most recent error that was encountered when the loadable resource transitioned to theLoadStatus.FAILED_TO_LOADstate, either due to calling theLoadable.loadAsync()orLoadable.retryLoadAsync()method.LoadStatusgetLoadStatus()Returns theLoadStatusof the loadable resource.PopupDefinitiongetPopupDefinition()Gets the PopupDefinition for this feature table.SpatialReferencegetSpatialReference()Returns the spatial reference of the features in this FeatureTable.java.lang.StringgetTableName()Returns the table name as defined by the table type.longgetTotalFeatureCount()Gets the total number of features in this FeatureTable.booleanhasGeometry()Indicates if this FeatureTable has a geometry column.booleanhasM()Gets whether the feature table supports geometries with M values.booleanhasZ()Gets whether the feature table supports geometries with z values.booleanisEditable()Indicates if this FeatureTable is editable.booleanisPopupEnabled()Gets a flag indicating whether the PopupDefinition returned fromgetPopupDefinition()is enabled or disabled.voidloadAsync()Loads the metadata of the loadable resource asynchronously.protected voidonDoneLoadingInternal()ListenableFuture<Envelope>queryExtentAsync(QueryParameters queryParameters)Asynchronously queries the minimum bounding envelope that contains features satisfying the provided queryParameters.ListenableFuture<java.lang.Long>queryFeatureCountAsync(QueryParameters queryParameters)Asynchronously queries the number of features that satisfy the provided query parameters.ListenableFuture<FeatureQueryResult>queryFeaturesAsync(QueryParameters queryParameters)Asynchronously queries features in this FeatureTable.ListenableFuture<StatisticsQueryResult>queryStatisticsAsync(StatisticsQueryParameters statisticsQueryParameters)Performs an asynchronous query to calculate statistics for the fields defined in the statistics query parameter, which may also define fields on which results are grouped or sorted.booleanremoveDoneLoadingListener(java.lang.Runnable listener)Removes a done loading listener from the loadable resource.booleanremoveLoadStatusChangedListener(LoadStatusChangedListener listener)Removes aLoadStatusChangedListenerfrom the loadable resource.voidretryLoadAsync()Loads or retries loading metadata for the object asynchronously.voidsetDisplayName(java.lang.String displayName)Sets the table's display name.voidsetPopupDefinition(PopupDefinition popupDefinition)Sets the PopupDefinition for this feature table, overriding the previous one.voidsetPopupEnabled(boolean enabled)Sets a flag indicating whether the PopupDefinition returned fromgetPopupDefinition()is enabled or disabled.ListenableFuture<java.lang.Void>updateFeatureAsync(Feature feature)Updates a feature's editable attribute values and/or geometry in this feature table.ListenableFuture<java.lang.Void>updateFeaturesAsync(java.lang.Iterable<Feature> features)Updates the geometry and/or attributes of features. 
 - 
 
- 
- 
Method Detail
- 
getExtent
public Envelope getExtent()
Gets the geographic extent of features within the table.This is calculated differently for specific types and modes of feature tables.
For
ServiceFeatureTablethis can be used to determine the extent within which data can be edited. ServiceFeatureTables in manual cache mode will return the extent of the features which have been cached. All other modes will return the extent of the layer/table defined by the service (fromArcGISFeatureLayerInfo.getExtent()).For GeodatabaseFeatureTables this returns the extent of the features which have been cached; this extent can grow as features are added or edited, but not shrink.
- Returns:
 - the extent
 - Since:
 - 100.0.0
 - See Also:
 GeodatabaseFeatureTable
 
- 
getFeatureLayer
@Deprecated public FeatureLayer getFeatureLayer()
Deprecated.As of 100.7.0, replaced bygetLayer().Gets the feature layer this table is associated with, or created from, if any. You need to pass this object to all feature table methods.Returns null if this table is not associated with a feature layer. This property is populated when the associated
FeatureLayeris created from the FeatureTable.- Returns:
 - the feature layer that this table is attached to, or null if the table isn't attached to a feature layer
 - Since:
 - 100.0.0
 
 
- 
getField
public Field getField(java.lang.String fieldName)
Gets a field by its name. Field names can be viewed in this FeatureTable's service definition's HTML pages. This method is case-sensitive.- Parameters:
 fieldName- the field name- Returns:
 - the field
 - Throws:
 java.lang.IllegalArgumentException- if the input fieldName is null- Since:
 - 100.0.0
 
 
- 
getFields
public java.util.List<Field> getFields()
Gets a list of all fields for this FeatureTable.- Returns:
 - an unmodifiable list of fields
 - Since:
 - 100.0.0
 
 
- 
getGeometryType
public GeometryType getGeometryType()
Returns the geometry type for this FeatureTable. Tables can only have a single type of Geometry, and it must be eitherGeometryType.POINT,GeometryType.MULTIPOINT,GeometryType.POLYLINEorGeometryType.POLYGON.- Returns:
 - the geometry type, or 
GeometryType.UNKNOWNif the table is not loaded - Since:
 - 100.0.0
 
 
- 
getLayer
public Layer getLayer()
Returns the layer this table is associated with, or created from, if any.This can be an
AnnotationLayer, a DimensionLayer, aFeatureLayer, or null if this table is not associated with a layer. This property is populated when the layer is created from theFeatureTable.- Returns:
 - the layer this table is associated with, or null if the table isn't associated with a layer
 - Since:
 - 100.7.0
 
 
- 
getSpatialReference
public SpatialReference getSpatialReference()
Returns the spatial reference of the features in this FeatureTable.- Returns:
 - the spatial reference
 - Since:
 - 100.0.0
 
 
- 
getTableName
public java.lang.String getTableName()
Returns the table name as defined by the table type.- Returns:
 - the table name; this cannot be null or empty
 - Since:
 - 100.0.0
 
 
- 
hasGeometry
public boolean hasGeometry()
Indicates if this FeatureTable has a geometry column. If it doesn't, then it's a non-spatial table and can't be bound to a feature layer to draw on a map.- Returns:
 - true if this feature table has geometry; otherwise false
 - Since:
 - 100.0.0
 
 
- 
isEditable
public boolean isEditable()
Indicates if this FeatureTable is editable. This does not take into account EditCapabilities or ownership based access control; seecanUpdate(com.esri.arcgisruntime.data.Feature)- Returns:
 - true if this FeatureTable is editable; otherwise false
 - Since:
 - 100.0.0
 
 
- 
getTotalFeatureCount
public long getTotalFeatureCount()
Gets the total number of features in this FeatureTable.- Returns:
 - the total number of features in this FeatureTable
 - Since:
 - 100.0.0
 
 
- 
getPopupDefinition
public PopupDefinition getPopupDefinition()
Gets the PopupDefinition for this feature table.- Specified by:
 getPopupDefinitionin interfacePopupSource- Returns:
 - the popup definition, or null if one is not defined and one has not been set
 - Since:
 - 100.1.0
 - See Also:
 PopupSource.setPopupDefinition(PopupDefinition)
 
- 
isPopupEnabled
public boolean isPopupEnabled()
Gets a flag indicating whether the PopupDefinition returned fromgetPopupDefinition()is enabled or disabled.- Specified by:
 isPopupEnabledin interfacePopupSource- Returns:
 - a flag indicating whether the PopupDefinition is enabled or disabled
 - Since:
 - 100.1.0
 - See Also:
 PopupSource.setPopupEnabled(boolean)
 
- 
setPopupDefinition
public void setPopupDefinition(PopupDefinition popupDefinition)
Sets the PopupDefinition for this feature table, overriding the previous one. If this table is attached to a layer then the popup definition on the layer will also be overridden.- Specified by:
 setPopupDefinitionin interfacePopupSource- Parameters:
 popupDefinition- the PopupDefinition to set- Since:
 - 100.1.0
 - See Also:
 PopupSource.getPopupDefinition()
 
- 
setPopupEnabled
public void setPopupEnabled(boolean enabled)
Sets a flag indicating whether the PopupDefinition returned fromgetPopupDefinition()is enabled or disabled.- Specified by:
 setPopupEnabledin interfacePopupSource- Parameters:
 enabled- true to enable the PopupDefinition, otherwise false- Since:
 - 100.1.0
 - See Also:
 PopupSource.isPopupEnabled()
 
- 
queryFeaturesAsync
public ListenableFuture<FeatureQueryResult> queryFeaturesAsync(QueryParameters queryParameters)
Asynchronously queries features in this FeatureTable.- Parameters:
 queryParameters- the query parameters- Returns:
 - a ListenableFuture representing the feature query result and indicating if the result
 
java.util.concurrent.Future.isDone(); also allows cancellation. Callingget()on the returned future may throw an ExecutionException with its cause set toIOExceptionif a network request fails - Throws:
 java.lang.IllegalArgumentException- if queryParameters is null- Since:
 - 100.0.0
 
 
- 
canAdd
public boolean canAdd()
Return true if new features can be added to the feature table, false otherwise.For
ArcGISFeatureTables this takes the table's edit capabilities (for attachments and geometry) into account as well as ownership based access control based on the tables metadata from its layer infoArcGISFeatureLayerInfo.- Returns:
 - true if a feature can be added; false otherwise
 - Since:
 - 100.0.0
 - See Also:
 ArcGISFeatureLayerInfo
 
- 
canEditGeometry
public boolean canEditGeometry()
Returns true if the geometry of a feature from this table can be edited, otherwise false. ForArcGISFeatureTables this is based on the tables metadata fromArcGISFeatureLayerInfo.isAllowGeometryUpdates().- Returns:
 - true if the geometry of a feature can be edited, false otherwise
 - Since:
 - 100.0.0
 - See Also:
 FeatureServiceCapabilities
 
- 
canDelete
public boolean canDelete(Feature feature)
Checks whether the given feature can be deleted.For
ArcGISFeatureTables this takes the table's edit capabilities (for attachments and geometry) into account as well as ownership based access control based on the tables metadata from its layer infoArcGISFeatureLayerInfo.If owner based access control is being used, this method will also take account of the current user. Deletion will be allowed if one of the following is true:
- allowOthersToDelete is true
 - allowOthersToDelete is false but the current user matches the user who created the feature
 
- Parameters:
 feature- the feature to check- Returns:
 - true if feature can be deleted; false otherwise
 - Throws:
 java.lang.IllegalArgumentException- if feature is null- Since:
 - 100.0.0
 
 
- 
canUpdate
public boolean canUpdate(Feature feature)
Checks whether the given feature can be updated. This validates that attributes of the feature are of the corresponding type based on the field type, seeField.Type.For
ArcGISFeatureTables this takes the table's edit capabilities (for attachments and geometry) into account as well as ownership based access control based on the tables metadata from its layer infoArcGISFeatureLayerInfo.If owner based access control is being used, this method will also take account of the current user. Updates will be allowed if one of the following is true:
- allowOthersToUpdate is true
 - allowOthersToUpdate is false but the current user matches the user who created the feature
 
- Parameters:
 feature- the feature to check- Returns:
 - true if feature can be updated; false otherwise
 - Throws:
 java.lang.IllegalArgumentException- if feature is null- Since:
 - 100.0.0
 
 
- 
addFeatureAsync
public ListenableFuture<java.lang.Void> addFeatureAsync(Feature feature)
Adds a new feature to the feature table.Adding a feature that contains a
Geometrycauses the geometry to become simplified. This may change a single part geometry to a multipart geometry, or round off X, Y, Z, and M coordinate values that are above the resolution set by theSpatialReference.- Parameters:
 feature- the feature to be added- Returns:
 - a ListenableFuture for tracking when the asynchronous operation is done. The get() method on this
 
ListenableFuturemay throw an ExecutionException if the operation fails. - Throws:
 java.lang.IllegalArgumentException- if feature is null- Since:
 - 100.0.0
 - See Also:
 FeatureServiceSessionType
 
- 
addFeaturesAsync
public ListenableFuture<java.lang.Void> addFeaturesAsync(java.lang.Iterable<Feature> features)
Adds new features to the feature table.- Parameters:
 features- the features to be added- Returns:
 - a ListenableFuture for tracking when the asynchronous operation is done. The get() method on this
 
ListenableFuturemay throw an ExecutionException if the operation fails. - Throws:
 java.lang.IllegalArgumentException- if features is null- Since:
 - 100.0.0
 
 
- 
updateFeatureAsync
public ListenableFuture<java.lang.Void> updateFeatureAsync(Feature feature)
Updates a feature's editable attribute values and/or geometry in this feature table.All values in the feature passed in will be persisted, including null values.
Updating a feature that contains a
Geometrycauses the geometry to become simplified. This may change a single part geometry to a multipart geometry, or round off X, Y, Z, and M coordinate values that are above the resolution set by theSpatialReference.- Parameters:
 feature- the feature to be updated- Returns:
 - a ListenableFuture for tracking when the asynchronous operation is done. The get() method on this
 
ListenableFuturemay throw an ExecutionException if the operation fails. - Throws:
 java.lang.IllegalArgumentException- if feature is null- Since:
 - 100.0.0
 - See Also:
 FeatureServiceSessionType
 
- 
updateFeaturesAsync
public ListenableFuture<java.lang.Void> updateFeaturesAsync(java.lang.Iterable<Feature> features)
Updates the geometry and/or attributes of features. Features to update are identified by their unique feature ID in the given list.All values in the feature passed in will be persisted, including null values.
- Parameters:
 features- the features to be updated- Returns:
 - a ListenableFuture for tracking when the asynchronous operation is done. The get() method on this
 
ListenableFuturemay throw an ExecutionException if the operation fails. - Throws:
 java.lang.IllegalArgumentException- if features is null- Since:
 - 100.0.0
 
 
- 
deleteFeatureAsync
public ListenableFuture<java.lang.Void> deleteFeatureAsync(Feature feature)
Deletes a feature from this feature table.- Parameters:
 feature- the feature to be deleted- Returns:
 - a ListenableFuture for tracking when the asynchronous operation is done. The get() method on this
 
ListenableFuturemay throw an ExecutionException if the operation fails. - Throws:
 java.lang.IllegalArgumentException- if features is null- Since:
 - 100.0.0
 
 
- 
deleteFeaturesAsync
public ListenableFuture<java.lang.Void> deleteFeaturesAsync(java.lang.Iterable<Feature> features)
Deletes features from this feature table. Features to delete are identified by their unique feature ID in the given list.- Parameters:
 features- the features to be deleted- Returns:
 - a ListenableFuture for tracking when the asynchronous operation is done. The get() method on this
 
ListenableFuturemay throw an ExecutionException if the operation fails. - Throws:
 java.lang.IllegalArgumentException- if features is null- Since:
 - 100.0.0
 
 
- 
createFeature
public Feature createFeature()
Creates a feature that matches the schema of the feature table.- Returns:
 - a new feature
 - Since:
 - 100.0.0
 
 
- 
createFeature
public Feature createFeature(java.util.Map<java.lang.String,java.lang.Object> attributes, Geometry geometry)
Creates a feature, with the given attributes and geometry- Parameters:
 attributes- attributes for the featuregeometry- geometry of the feature- Returns:
 - a new feature
 - Since:
 - 100.0.0
 
 
- 
queryStatisticsAsync
public ListenableFuture<StatisticsQueryResult> queryStatisticsAsync(StatisticsQueryParameters statisticsQueryParameters)
Performs an asynchronous query to calculate statistics for the fields defined in the statistics query parameter, which may also define fields on which results are grouped or sorted.The statistic result can be obtained by calling the get() method on the
ListenableFuture, which may throw an exception if the operation failed, was cancelled or interrupted.- Parameters:
 statisticsQueryParameters- defines the statistics type, fields, and features to be used for the query- Returns:
 - A task that represents the asynchronous query statistics operation. It is a ListenableFuture for tracking when the asynchronous operation is done and getting a StatisticsQueryResult as a result.
 - Throws:
 java.lang.IllegalArgumentException- if statisticsQueryParameters is null- Since:
 - 100.2.0
 
 
- 
queryFeatureCountAsync
public ListenableFuture<java.lang.Long> queryFeatureCountAsync(QueryParameters queryParameters)
Asynchronously queries the number of features that satisfy the provided query parameters.The query result can be obtained by calling the get() method on the
ListenableFuture, which may throw an exception if the operation failed, was cancelled or interrupted.- Parameters:
 queryParameters- the query parameters- Returns:
 - A task that represents the asynchronous query of feature count. It is a ListenableFuture for tracking when the asynchronous operation is done and getting a Long value.
 - Throws:
 java.lang.IllegalArgumentException- if queryParameters is null- Since:
 - 100.2.0
 
 
- 
queryExtentAsync
public ListenableFuture<Envelope> queryExtentAsync(QueryParameters queryParameters)
Asynchronously queries the minimum bounding envelope that contains features satisfying the provided queryParameters. If no features meet the query criteria, an empty envelope is returned.The query result can be obtained by calling the get() method on the
ListenableFuture, which may throw an exception if the operation failed, was cancelled or interrupted.- Parameters:
 queryParameters- the query queryParameters- Returns:
 - A task that represents the asynchronous query of feature extent. It is a ListenableFuture for tracking when the asynchronous operation is done and getting an Envelope.
 - Throws:
 java.lang.IllegalArgumentException- if queryParameters is null- Since:
 - 100.2.0
 
 
- 
hasZ
public boolean hasZ()
Gets whether the feature table supports geometries with z values.- Returns:
 - true if the feature table has geometries with z values, otherwise false
 - Since:
 - 100.2.0
 
 
- 
hasM
public boolean hasM()
Gets whether the feature table supports geometries with M values.- Returns:
 - true if the feature table has geometries with M values, otherwise false
 - Since:
 - 100.2.0
 
 
- 
setDisplayName
public void setDisplayName(java.lang.String displayName)
Sets the table's display name.- Parameters:
 displayName- the display name- Since:
 - 100.3.0
 
 
- 
getDisplayName
public java.lang.String getDisplayName()
Returns the table's display name.- Returns:
 - the display name, or an empty string if not set
 - Since:
 - 100.3.0
 
 
- 
getLoadError
public ArcGISRuntimeException getLoadError()
Description copied from interface:LoadableReturns the most recent error that was encountered when the loadable resource transitioned to theLoadStatus.FAILED_TO_LOADstate, either due to calling theLoadable.loadAsync()orLoadable.retryLoadAsync()method.If the resource subsequently transitions to
LoadStatus.LOADED(for example, if a call toretryLoadAsynccompletes successfully) the error is cleared out.- Specified by:
 getLoadErrorin interfaceLoadable- Returns:
 - the most recent error that was encountered when the loadable resource transitioned to the
         
LoadStatus.FAILED_TO_LOADstate. 
 
- 
getLoadStatus
public LoadStatus getLoadStatus()
Description copied from interface:LoadableReturns theLoadStatusof the loadable resource.- Specified by:
 getLoadStatusin interfaceLoadable- Returns:
 - the LoadStatus of the loadable resource
 
 
- 
loadAsync
public void loadAsync()
Description copied from interface:LoadableLoads the metadata of the loadable resource asynchronously.The load status changes from
LoadStatus.NOT_LOADEDtoLoadStatus.LOADING. A listener can be added viaLoadable.addDoneLoadingListener(java.lang.Runnable)that is invoked upon completion of the asynchronous load operation.If the load operation completes successfully, the load status will be
LoadStatus.LOADED, which means the resource has loaded its metadata.If the load operation failed, the load status will be
LoadStatus.FAILED_TO_LOADand the error can be retrieved by callingLoadable.getLoadError().This method can be called concurrently and repeatedly, but only one attempt is ever made to perform the load operation. If a load operation is already in progress (
LoadStatus.LOADINGstate) whenloadAsyncis called, it simply piggy-backs on the outstanding operation and the done loading listener added to the loadable resource is enqueued to be invoked when that operation completes. If the operation has already completed (LoadStatus.LOADEDorLoadStatus.FAILED_TO_LOADstate) whenloadAsyncis called, the done loading listener is immediately invoked when added to the loadable resource.If a loadable resource has failed to load, calling
loadAsyncon it subsequently will not change its state. The done loading listener will be invoked immediately when added to the loadable resource. In order to retry loading the resource,Loadable.retryLoadAsync()needs to be used.A load operation that is in progress (
LoadStatus.LOADINGstate) can be cancelled by callingLoadable.cancelLoad(). 
- 
retryLoadAsync
public void retryLoadAsync()
Description copied from interface:LoadableLoads or retries loading metadata for the object asynchronously.Will retry loading the metadata if the object's load status is
LoadStatus.FAILED_TO_LOAD. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded.For more details on the load process see
Loadable.loadAsync().- Specified by:
 retryLoadAsyncin interfaceLoadable
 
- 
cancelLoad
public void cancelLoad()
Description copied from interface:LoadableCancels loading metadata for the object.Cancels loading the metadata if the object is loading, and always invokes the done loading listener.
A load operation that is in progress (
LoadStatus.LOADINGstate) can be cancelled by calling this method and the resource will transition fromLoadStatus.LOADINGtoLoadStatus.FAILED_TO_LOADstate. If the load operation was successfully cancelled, a CancellationException will be returned fromLoadable.getLoadError().Cancellation should be used carefully because all enqueued done loading listeners for that resource instance will get invoked with an error stating that the operation was cancelled. Thus, one component in the application can cancel the load operation initiated by other components.
This method does nothing if the resource is not in
LoadStatus.LOADINGstate.- Specified by:
 cancelLoadin interfaceLoadable
 
- 
addDoneLoadingListener
public void addDoneLoadingListener(java.lang.Runnable listener)
Description copied from interface:LoadableAdds a listener to the loadable resource that is invoked when loading has completed.The listener may be added at any point, whether the loadable resource has already completed loading or not.
- For resources that are not loaded when the listener is added (LoadStatus is NOT_LOADED or LOADING): When the resource completes loading, the listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.
 - For resources that are already loaded when the listener is added (LoadStatus is LOADED or FAILED_TO_LOAD): The listener will be called immediately, on the current thread.
 
Alternatively, to be notified when there is any change in the load status, use the
Loadable.addLoadStatusChangedListener(LoadStatusChangedListener)method instead.- Specified by:
 addDoneLoadingListenerin interfaceLoadable- Parameters:
 listener- a Runnable that is invoked upon completion of the load operation
 
- 
removeDoneLoadingListener
public boolean removeDoneLoadingListener(java.lang.Runnable listener)
Description copied from interface:LoadableRemoves a done loading listener from the loadable resource.- Specified by:
 removeDoneLoadingListenerin interfaceLoadable- Parameters:
 listener- the listener to be removed- Returns:
 - true if the listener was removed, otherwise false
 
 
- 
onDoneLoadingInternal
protected void onDoneLoadingInternal()
 
- 
addLoadStatusChangedListener
public void addLoadStatusChangedListener(LoadStatusChangedListener listener)
Description copied from interface:LoadableAdds aLoadStatusChangedListenerto the loadable resource that is invoked whenever the load status changes.Adding this listener on the UI thread will cause it to be invoked on the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.
The listener will not be called if added to a loadable resource that has already completed loading. To be notified when a loadable resource has completed loading, including if the resource is already loaded when the listener is added, use the
Loadable.addDoneLoadingListener(Runnable)method.- Specified by:
 addLoadStatusChangedListenerin interfaceLoadable- Parameters:
 listener- theLoadStatusChangedListenerto be added
 
- 
removeLoadStatusChangedListener
public boolean removeLoadStatusChangedListener(LoadStatusChangedListener listener)
Description copied from interface:LoadableRemoves aLoadStatusChangedListenerfrom the loadable resource.- Specified by:
 removeLoadStatusChangedListenerin interfaceLoadable- Parameters:
 listener- theLoadStatusChangedListenerto be removed- Returns:
 - true if the listener was removed, otherwise false
 
 
 - 
 
 -