Object
hdf.view.TableView.DataProviderFactory.HDFDataProvider
- All Implemented Interfaces:
org.eclipse.nebula.widgets.nattable.data.IDataProvider
- Enclosing class:
DataProviderFactory
public static class DataProviderFactory.HDFDataProvider
extends Object
implements org.eclipse.nebula.widgets.nattable.data.IDataProvider
The base DataProvider which pulls data from a given Array object using direct
indices.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longthe columnprotected ObjectIn order to support 3-dimensional datasets, which may need to update the data buffer object after flipping through a 'page', this field is not marked as final.protected final booleanthe type of the parentprotected final booleanif the data is transposedprotected final booleanif the data is in original orderprotected booleanif the data value has changedprotected final Classthe data format classprotected final intthe rankprotected longthe rowprotected Objectthe data value -
Constructor Summary
ConstructorsConstructorDescriptionHDFDataProvider(Datatype dtype, Object dataBuf, boolean dataTransposed) Create the HDF extended Data Display Provider for the supplied data object -
Method Summary
Modifier and TypeMethodDescriptionintgetDataValue(int columnIndex, int rowIndex) getDataValue(Object obj, int index) When a parent HDFDataProvider (such as an ArrayDataProvider) wants to retrieve a data value by routing the operation through its base HDFDataProvider, the parent HDFDataProvider will generally know the direct index to have the base provider use.getDataValue(Object obj, int columnIndex, int rowIndex) When a CompoundDataProvider wants to pass a List of data down to a nested CompoundDataProvider, or when a top-level container DataProvider (such as an ArrayDataProvider) wants to hand data down to a base CompoundDataProvider, we need to pass down a List of data, plus a field and row index.final booleanCheck if the datavalue has changedintintphysicalLocationToBufIndex(int rowIndex, int columnIndex) A utility method used to translate a set of physical table coordinates to an index into a data buffer.voidsetDataValue(int columnIndex, int rowIndex, Object newValue) update the data value of a compound type.voidsetDataValue(int columnIndex, int rowIndex, Object bufObject, Object newValue) When a CompoundDataProvider wants to pass a List of data down to a nested CompoundDataProvider, or when a top-level container DataProvider (such as an ArrayDataProvider) wants to hand data down to a base CompoundDataProvider, we need to pass down a List of data and the new value, plus a field and row index.voidsetDataValue(int index, Object bufObject, Object newValue) When a parent HDFDataProvider (such as an ArrayDataProvider) wants to set a data value by routing the operation through its base HDFDataProvider, the parent HDFDataProvider will generally know the direct index to have the base provider use.final voidsetIsValueChanged(boolean isChanged) set if the data value has changedfinal voidupdateDataBuffer(Object newBuf) Update the data buffer for this HDFDataProvider.
-
Field Details
-
dataBuf
-
theValue
-
originalFormatClass
the data format class -
isValueChanged
if the data value has changed -
isContainerType
the type of the parent -
rank
the rank -
isNaturalOrder
if the data is in original order -
isDataTransposed
if the data is transposed -
colCount
the column -
rowCount
the row
-
-
Constructor Details
-
HDFDataProvider
HDFDataProvider(Datatype dtype, Object dataBuf, boolean dataTransposed) throws Exception Create the HDF extended Data Display Provider for the supplied data object- Parameters:
dtype- the datatype objectdataBuf- the data buffer to usedataTransposed- if the data should be transposed- Throws:
Exception- if a failure occurred
-
-
Method Details
-
physicalLocationToBufIndex
A utility method used to translate a set of physical table coordinates to an index into a data buffer.- Parameters:
rowIndex- the rowcolumnIndex- the column- Returns:
- physical location in 1D notation
-
getDataValue
- Specified by:
getDataValuein interfaceorg.eclipse.nebula.widgets.nattable.data.IDataProvider
-
getDataValue
When a CompoundDataProvider wants to pass a List of data down to a nested CompoundDataProvider, or when a top-level container DataProvider (such as an ArrayDataProvider) wants to hand data down to a base CompoundDataProvider, we need to pass down a List of data, plus a field and row index. This method is for facilitating this behavior. In general, all "container" DataProviders that have a "container" base DataProvider should call down into their base DataProvider(s) using this method, in order to ensure that buried CompoundDataProviders get handled correctly. When their base DataProvider is not a "container" type, the method getDataValue(Object, index) should be used instead. For atomic type DataProviders, we treat this method as directly calling into getDataValue(Object, index) using the passed rowIndex. However, this method should, in general, not be called by atomic type DataProviders.- Parameters:
obj- the data objectcolumnIndex- the columnrowIndex- the row- Returns:
- value of the data
-
getDataValue
When a parent HDFDataProvider (such as an ArrayDataProvider) wants to retrieve a data value by routing the operation through its base HDFDataProvider, the parent HDFDataProvider will generally know the direct index to have the base provider use. This method is to facilitate this kind of behavior. Note that this method takes an Object parameter, which is the object that the method should pull its data from. This is to be able to nicely support nested compound DataProviders.- Parameters:
obj- the data objectindex- the index into the data array- Returns:
- the data object
-
setDataValue
update the data value of a compound type.- Specified by:
setDataValuein interfaceorg.eclipse.nebula.widgets.nattable.data.IDataProvider- Parameters:
columnIndex- the columnrowIndex- the rownewValue- the new data value object
-
setDataValue
When a CompoundDataProvider wants to pass a List of data down to a nested CompoundDataProvider, or when a top-level container DataProvider (such as an ArrayDataProvider) wants to hand data down to a base CompoundDataProvider, we need to pass down a List of data and the new value, plus a field and row index. This method is for facilitating this behavior. In general, all "container" DataProviders that have a "container" base DataProvider should call down into their base DataProvider(s) using this, method, in order to ensure that buried CompoundDataProviders get handled correctly. When their base DataProvider is not a "container" type, the method setDataValue(index, Object, Object) should be used instead. For atomic type DataProviders, we treat this method as directly calling into setDataValue(index, Object, Object) using the passed rowIndex. However, this method should, in general, not be called by atomic type DataProviders.- Parameters:
columnIndex- the columnrowIndex- the rowbufObject- the data objectnewValue- the new data object
-
setDataValue
When a parent HDFDataProvider (such as an ArrayDataProvider) wants to set a data value by routing the operation through its base HDFDataProvider, the parent HDFDataProvider will generally know the direct index to have the base provider use. This method is to facilitate this kind of behavior. Note that this method takes two Object parameters, one which is the object that the method should set its data inside of and one which is the new value to set. This is to be able to nicely support nested compound DataProviders.- Parameters:
index- the index into the data arraybufObject- the data objectnewValue- the new data object
-
getColumnCount
- Specified by:
getColumnCountin interfaceorg.eclipse.nebula.widgets.nattable.data.IDataProvider
-
getRowCount
- Specified by:
getRowCountin interfaceorg.eclipse.nebula.widgets.nattable.data.IDataProvider
-
setIsValueChanged
set if the data value has changed- Parameters:
isChanged- if the data value is changed
-
getIsValueChanged
Check if the datavalue has changed- Returns:
- if the datavalue has changed
-
updateDataBuffer
Update the data buffer for this HDFDataProvider. This is necessary for when the data that has been read is invalidated, such as when flipping through 'pages' in a > 2-dimensional dataset.- Parameters:
newBuf- the new data buffer
-