Package com.iizix.prop.content
Interface IContentProvider<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>> 
- All Known Subinterfaces:
- IContentProviderAPI<ITEM,,- ITEM_CONTENT> - IMListContentProvider,- IMListContentProviderAPI
- All Known Implementing Classes:
- AbstractContentProvider,- MapMarkerContentProvider,- MLContentProvider
public interface IContentProvider<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>> 
Generic interface of content providing. This interface is the base interface used to provide contents into e.g. comboboxes, maps, etc.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- voidBegins a mass change operation of the content by means of the API.- default booleanReturns if API is enabled for this content provider or not.- voidCommits a mass change operation of the content by means of the API.- void- dispose()Called when the content provider is no longer required by the container.- getAll()Returns the array of content data provided.- intGets the count of items.Returns the items container.- voidCalled to initialize the content provider for the container instance.- booleanCalled when a VSRow is added in the connected table.- booleanCalled when a VSRow is removed in the connected table.- void- onSelectionTypeChanged- (int selectionType) Called when the content provider changes selection type.- voidThis method is called when the content provider needs re-initialization due to e.g.- voidUpdates all the items to match the current contents.
- Method Details- onSelectionTypeChangedvoid onSelectionTypeChanged- (int selectionType) Called when the content provider changes selection type.- Parameters:
- selectionType- The selection type: 0=none, 1=single, 2=multiple.
 
- initializeCalled to initialize the content provider for the container instance.- Parameters:
- cnr- The container.
 
- getItemsContainerAbstractContentUIContainer<ITEM,- ITEM_CONTENT> getItemsContainer()Returns the items container.- Returns:
- The container that stores the item properties. This method will return null if not yet initialized.
 
- reinitializevoid reinitialize()This method is called when the content provider needs re-initialization due to e.g. a change of its properties, e.g. the VSTable or one of the columns.
- disposevoid dispose()Called when the content provider is no longer required by the container.
- canModifyWithAPIdefault boolean canModifyWithAPI()Returns if API is enabled for this content provider or not. If the content provider is connected to VirtualSpace, this method will return false.- Returns:
- true if the API methods for modification can be used, false otherwise.
 
- beginChangesvoid beginChanges()Begins a mass change operation of the content by means of the API. Call this method to avoid updates being fired to the client before all changes are committed.- A call to this method must be followed by a call to - commitChanges()
- commitChangesvoid commitChanges()Commits a mass change operation of the content by means of the API. This method will fire the updates to the client.- Each call to - beginChanges()
- getItemCountint getItemCount()Gets the count of items. This method is intended for API usage.- Note: if the content provider is connected to VirtualSpace, this count may not be up-to-date before - updateContents()- Returns:
- The count of items that will be provided.
 
- getAllITEM_CONTENT[] getAll()Returns the array of content data provided.- Returns:
- The array of content data.
 
- updateContentsvoid updateContents()Updates all the items to match the current contents.- This method is not intended to be called, it is used by the framework -- DO NOT CALL THE METHOD! - Override this method to perform specialized processing. - Note: this method is always called from the content updater thread, i.e. the client worker thread. 
- onAddedCalled when a VSRow is added in the connected table.- Parameters:
- row- The row added.
- index- The row index added (-1 or table size for last).
- Returns:
- true for success, false to cause a refresh of the containers content.
 
- onRemovedCalled when a VSRow is removed in the connected table.- Parameters:
- row- The row removed.
- index- The row index removed.
- Returns:
- true for success, false to cause a refresh of the containers content.