Package de.gsi.chart.plugins
Class TableViewer
- java.lang.Object
-
- de.gsi.chart.plugins.ChartPlugin
-
- de.gsi.chart.plugins.TableViewer
-
- Direct Known Subclasses:
EditDataSet
public class TableViewer extends ChartPlugin
Displays the all visible data sets inside a table on demand. Implements copy-paste functionality into system clip-board and *.csv file export to allow further processing in other applications. Also enables editing of values if the underlying DataSet allows it.- Author:
- rstein, akrimm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTableViewer.ColumnTypeprotected classTableViewer.DataSetsModelModel Abstraction to the DataSets of a chart as the backing for a JavaFX TableView.protected classTableViewer.DataSetsRow
-
Field Summary
Fields Modifier and Type Field Description protected booleaneditableprotected static intFONT_SIZEprotected static intMIN_REFRESH_RATE_WARN
-
Constructor Summary
Constructors Constructor Description TableViewer()Creates a new instance of DataSetTableViewer class and setup the required listeners.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopySelectedToClipboard()Copies the (selected) table data to the clipboard in csv Format.voidexportGridToCSV()Show a FileChooser and export the (selected) Table Data to the choosen .csv File.protected javafx.scene.layout.HBoxgetInteractorBar()Helper function to initialize the UI elements for the Interactor toolbar.intgetRefreshRate()javafx.scene.control.TableView<?>getTable()javafx.beans.property.IntegerPropertyrefreshRateProperty()The refresh Rate limits minimum amount of time between table updates in milliseconds and defaults to 100ms.voidsetRefreshRate(int newVal)-
Methods inherited from class de.gsi.chart.plugins.ChartPlugin
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, layoutChildren, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPoint
-
-
-
-
Field Detail
-
FONT_SIZE
protected static final int FONT_SIZE
- See Also:
- Constant Field Values
-
MIN_REFRESH_RATE_WARN
protected static final int MIN_REFRESH_RATE_WARN
- See Also:
- Constant Field Values
-
editable
protected boolean editable
-
-
Method Detail
-
refreshRateProperty
public javafx.beans.property.IntegerProperty refreshRateProperty()
The refresh Rate limits minimum amount of time between table updates in milliseconds and defaults to 100ms. Setting this below 20ms is discouraged and will produce warnings.- Returns:
- The refreshRate property
-
getRefreshRate
public int getRefreshRate()
- Returns:
- the value of the refreshRate Property
-
setRefreshRate
public void setRefreshRate(int newVal)
- Parameters:
newVal- the new value for the refreshRate Property
-
copySelectedToClipboard
public void copySelectedToClipboard()
Copies the (selected) table data to the clipboard in csv Format.
-
exportGridToCSV
public void exportGridToCSV()
Show a FileChooser and export the (selected) Table Data to the choosen .csv File.
-
getInteractorBar
protected javafx.scene.layout.HBox getInteractorBar()
Helper function to initialize the UI elements for the Interactor toolbar.- Returns:
- HBox node with the toolbar elements
-
getTable
public javafx.scene.control.TableView<?> getTable()
- Returns:
- The TableView JavaFX control element
-
-