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
Modifier and TypeFieldDescriptionprotected long
the columnprotected Object
In 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 boolean
the type of the parentprotected final boolean
if the data is transposedprotected final boolean
if the data is in original orderprotected boolean
if the data value has changedprotected final Class
the data format classprotected final int
the rankprotected long
the rowprotected Object
the data value -
Constructor Summary
ConstructorDescriptionHDFDataProvider
(Datatype dtype, Object dataBuf, boolean dataTransposed) Create the HDF extended Data Display Provider for the supplied data object -
Method Summary
Modifier and TypeMethodDescriptionint
getDataValue
(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 boolean
int
int
physicalLocationToBufIndex
(int rowIndex, int columnIndex) A utility method used to translate a set of physical table coordinates to an index into a data buffer.void
setDataValue
(int columnIndex, int rowIndex, Object newValue) update the data value of a compound type.void
setDataValue
(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.void
setDataValue
(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 void
setIsValueChanged
(boolean isChanged) set if the data value has changedfinal void
updateDataBuffer
(Object newBuf) Update the data buffer for this HDFDataProvider.
-
Field Details
-
dataBuf
In 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. However, it is important that subclasses DO NOT override this field. -
theValue
the data value -
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:
getDataValue
in 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 objectrowIndex
- the rowcolumnIndex
- the column- 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:
setDataValue
in 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:
getColumnCount
in interfaceorg.eclipse.nebula.widgets.nattable.data.IDataProvider
-
getRowCount
- Specified by:
getRowCount
in interfaceorg.eclipse.nebula.widgets.nattable.data.IDataProvider
-
setIsValueChanged
set if the data value has changed- Parameters:
isChanged
- if the data value is changed
-
getIsValueChanged
- Returns:
- if the datavalue has chaged
-
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
-