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 Summary- All Methods Instance Methods Abstract Methods Default Methods - Modifier and Type - Method - Description - void- beginChanges()Begins a mass change operation of the content by means of the API.- default boolean- canModifyWithAPI()Returns if API is enabled for this content provider or not.- void- commitChanges()Commits 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.- ITEM_CONTENT[]- getAll()Returns the array of content data provided.- int- getItemCount()Gets the count of items.- AbstractContentUIContainer<ITEM,ITEM_CONTENT>- getItemsContainer()Returns the items container.- void- initialize(AbstractContentUIContainer<ITEM,ITEM_CONTENT> cnr)Called to initialize the content provider for the container instance.- boolean- onAdded(VSRow row, int index)Called when a VSRow is added in the connected table.- boolean- onRemoved(VSRow row, int index)Called when a VSRow is removed in the connected table.- void- onSelectionTypeChanged(int selectionType)Called when the content provider changes selection type.- void- reinitialize()This method is called when the content provider needs re-initialization due to e.g.- void- updateContents()Updates all the items to match the current contents.
 
- Method Detail- onSelectionTypeChanged- void onSelectionTypeChanged(int selectionType) Called when the content provider changes selection type.- Parameters:
- selectionType- The selection type: 0=none, 1=single, 2=multiple.
 
 - initialize- void initialize(AbstractContentUIContainer<ITEM,ITEM_CONTENT> cnr) Called to initialize the content provider for the container instance.- Parameters:
- cnr- The container.
 
 - getItemsContainer- AbstractContentUIContainer<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.
 
 - reinitialize- void 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.
 - dispose- void dispose() Called when the content provider is no longer required by the container.
 - canModifyWithAPI- default 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.
 
 - beginChanges- void 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()
 - commitChanges- void 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()
 - getItemCount- int 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.
 
 - getAll- ITEM_CONTENT[] getAll() Returns the array of content data provided.- Returns:
- The array of content data.
 
 - updateContents- void 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. 
 - onAdded- boolean onAdded(VSRow row, int index) Called 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.
 
 - onRemoved- boolean onRemoved(VSRow row, int index) Called 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.