Object
hdf.view.TableView.DefaultBaseTableView
- Direct Known Subclasses:
DefaultCompoundDSTableView,DefaultScalarDSTableView
DefaultBaseTableView serves as the base class for a DataView that displays
HDF data in a tabular format. This class is used for internal bookkeeping and
as a place to store higher-level data manipulation functions, whereas its
subclasses are responsible for setting up the actual GUI components.
- Version:
- 1.0 4/13/2018
- Author:
- jhenderson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAn implementation of the table's Column Header which adapts to the current font.protected classAn implementation of a GridLayer with support for column grouping and with editing triggered by a double click instead of a single click.protected classContext-menu for dealing with region and object referencesprotected classAn implementation of the table's Row Header which adapts to the current font.protected classCustom Row Header data provider to set row indices based on Index Base for both Scalar Datasets and Compound Datasets.protected static enumthe valid types of tableviews -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intdefault binary orderprotected BitSetUsed for bitmask operations on dataprotected ViewProperties.BITMASK_OPUsed for the type of bitmask operationprotected org.eclipse.swt.widgets.LabelLabel to indicate the current cell locationprotected org.eclipse.swt.widgets.TextText field to display the value of the currently selected table cellprotected org.eclipse.swt.widgets.MenuItemCheckbox menu item for binary defaultprotected org.eclipse.swt.widgets.MenuItemCheckbox menu item for Custom Notation defaultprotected org.eclipse.swt.widgets.MenuItemCheckbox menu item for enum defaultprotected org.eclipse.swt.widgets.MenuItemCheckbox menu item for Fixed Data Length defaultprotected org.eclipse.swt.widgets.MenuItemCheckbox menu item for hex defaultprotected org.eclipse.swt.widgets.MenuItemCheckbox menu item for Scientific Notation defaultprotected org.eclipse.nebula.widgets.nattable.data.IDataProviderreference to the data provider for the columnprotected org.eclipse.swt.graphics.FontThe current fontprotected DecimalFormatcustom format patternreference to the display converterprotected org.eclipse.nebula.widgets.nattable.layer.DataLayerKeep references to the data layers for ease of accessprotected final DataFormatThe data object to be displayed in the Tableprotected DataProviderFactory.HDFDataProviderreference to the data providerprotected org.eclipse.nebula.widgets.nattable.NatTableThe reference to the NAT table usedprotected ObjectThe data value of the data objectprotected ObjectThe value used for fillprotected intsize of default data lengthprotected intThe index base used for display row and column numbers of dataprotected org.eclipse.swt.widgets.GroupLabeled Group to display the index baseprotected booleanstatus if the data is transposedprotected booleanstatus if the display type is a charprotected booleanstatus if the enums are to display convertedprotected booleanreference statusprotected booleanstatus if file is read onlyprotected booleanreference statusprotected booleanreference statusprotected final NumberFormatthe normal format to be used for numbersprotected NumberFormatthe format to be used for numbersprotected org.eclipse.nebula.widgets.nattable.data.IDataProviderreference to the data provider for the rowprotected final DecimalFormatChanged to use normalized scientific notation (1 is less than coefficient is less than 10).protected org.eclipse.nebula.widgets.nattable.selection.SelectionLayerKeep references to the selection layers for ease of accessprotected final org.eclipse.swt.widgets.ShellThe reference to the display shell usedprotected booleanshow data as statusprotected booleanshow data as statusprotected final DataViewManagerThe main HDFViewprotected DefaultBaseTableView.ViewTypeThe type of viewFields inherited from interface hdf.view.DataView.DataView
DATAVIEW_IMAGE, DATAVIEW_TABLE, DATAVIEW_UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBaseTableView(DataViewManager theView) Constructs a base TableView with no additional data properties.DefaultBaseTableView(DataViewManager theView, HashMap dataPropertiesMap) Constructs a base TableView with the specified data properties. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.widgets.MenucreateMenuBar(org.eclipse.swt.widgets.Shell theShell) Creates the menubar for the Shell.protected abstract org.eclipse.nebula.widgets.nattable.NatTablecreateTable(org.eclipse.swt.widgets.Composite parent, DataFormat dataObject) Create a data table for a data object.protected abstract org.eclipse.nebula.widgets.nattable.config.IEditableRulegetDataEditingRule(DataFormat dataObject) Get the data editing rule for the object.org.eclipse.nebula.widgets.nattable.layer.DataLayerGet the data layerGet the data object displayed in this data viewerintGet the array of selected column countintGet the array of selected row countorg.eclipse.nebula.widgets.nattable.selection.SelectionLayerGet the selection layergetTable()Get the tableprotected voidImport data values from binary file.protected voidimportTextData(String fname) Import data values from text file.protected voidloadData(DataFormat dataObject) Loads the data buffer of an object.voidrefresh the data tableprotected voidSave data as binary.protected voidSave data as text.protected abstract voidshowObjRefData(byte[] ref) Show the object reference data.protected abstract voidshowRegRefData(byte[] reg) Show the region reference data.protected abstract voidshowStdRefData(byte[] reg) Show the standard reference data.protected voidUpdate the display converters.voidUpdate dataset's value in file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hdf.view.TableView.TableView
getSelectedData
-
Field Details
-
shell
The reference to the display shell used -
curFont
The current font -
viewer
The main HDFView -
dataTable
The reference to the NAT table used -
dataObject
The data object to be displayed in the Table -
dataValue
-
fillValue
-
viewType
The type of view -
scientificFormat
Changed to use normalized scientific notation (1 is less than coefficient is less than 10). -
customFormat
custom format pattern -
normalFormat
the normal format to be used for numbers -
numberFormat
the format to be used for numbers -
bitmask
-
bitmaskOP
Used for the type of bitmask operation -
indexBase
The index base used for display row and column numbers of data -
fixedDataLength
size of default data length -
binaryOrder
default binary order -
isReadOnly
status if file is read only -
isEnumConverted
status if the enums are to display converted -
isDisplayTypeChar
status if the display type is a char -
isDataTransposed
status if the data is transposed -
isRegRef
reference status -
isObjRef
reference status -
isStdRef
reference status -
showAsHex
show data as status -
showAsBin
show data as status -
selectionLayer
Keep references to the selection layers for ease of access -
dataLayer
Keep references to the data layers for ease of access -
rowHeaderDataProvider
reference to the data provider for the row -
columnHeaderDataProvider
reference to the data provider for the column -
dataProvider
reference to the data provider -
dataDisplayConverter
reference to the display converter -
checkFixedDataLength
Checkbox menu item for Fixed Data Length default -
checkCustomNotation
Checkbox menu item for Custom Notation default -
checkScientificNotation
Checkbox menu item for Scientific Notation default -
checkHex
Checkbox menu item for hex default -
checkBin
Checkbox menu item for binary default -
checkEnum
Checkbox menu item for enum default -
indexBaseGroup
Labeled Group to display the index base -
cellValueField
Text field to display the value of the currently selected table cell -
cellLabel
Label to indicate the current cell location
-
-
Constructor Details
-
DefaultBaseTableView
Constructs a base TableView with no additional data properties.- Parameters:
theView- the main HDFView.
-
DefaultBaseTableView
Constructs a base TableView with the specified data properties.- Parameters:
theView- the main HDFView.dataPropertiesMap- the properties on how to show the data. The map is used to allow applications to pass properties on how to display the data, such as: transposing data, showing data as characters, applying a bitmask, and etc. Predefined keys are listed at ViewProperties.DATA_VIEW_KEY.
-
-
Method Details
-
createMenuBar
Creates the menubar for the Shell.- Parameters:
theShell- the reference to the display shell- Returns:
- the newly created menu
-
loadData
Loads the data buffer of an object.- Parameters:
dataObject- the object that has the buffer for the data.- Throws:
Exception- if a failure occurred
-
createTable
protected abstract org.eclipse.nebula.widgets.nattable.NatTable createTable(org.eclipse.swt.widgets.Composite parent, DataFormat dataObject) Create a data table for a data object.- Parameters:
parent- the parent object this table will be associated with.dataObject- the data object this table will be associated with.- Returns:
- the newly created data table
-
showObjRefData
Show the object reference data.- Parameters:
ref- the identifer for the object reference.
-
showRegRefData
Show the region reference data.- Parameters:
reg- the identifier for the region reference.
-
showStdRefData
Show the standard reference data.- Parameters:
reg- the identifier for the standard reference.
-
getDataEditingRule
protected abstract org.eclipse.nebula.widgets.nattable.config.IEditableRule getDataEditingRule(DataFormat dataObject) Get the data editing rule for the object.- Parameters:
dataObject- the data object- Returns:
- the rule
-
updateDataConversionSettings
Update the display converters. -
updateValueInFile
Update dataset's value in file. The changes will go to the file.- Specified by:
updateValueInFilein interfaceTableView
-
getDataObject
Description copied from interface:DataViewGet the data object displayed in this data viewer- Specified by:
getDataObjectin interfaceDataView- Returns:
- the data object displayed in this data viewer
-
getTable
-
getSelectedRowCount
Description copied from interface:TableViewGet the array of selected row count- Specified by:
getSelectedRowCountin interfaceTableView- Returns:
- array of selected row count
-
getSelectedColumnCount
Description copied from interface:TableViewGet the array of selected column count- Specified by:
getSelectedColumnCountin interfaceTableView- Returns:
- array of selected column count
-
getSelectionLayer
Get the selection layer- Returns:
- the selection layer
-
getDataLayer
Get the data layer- Returns:
- the data layer
-
refreshDataTable
refresh the data table- Specified by:
refreshDataTablein interfaceTableView
-
saveAsText
Save data as text.- Throws:
Exception- if a failure occurred
-
saveAsBinary
Save data as binary.- Throws:
Exception- if a failure occurred
-
importTextData
Import data values from text file.- Parameters:
fname- the file to import text from
-
importBinaryData
Import data values from binary file.
-