S - the table element typepublic class TablePopup<S> extends Object
| Constructor and Description |
|---|
TablePopup(FxTableView<S> table,
String preferencesSuffix,
boolean noViewSize,
String title)
Creates a table popup.
|
| Modifier and Type | Method and Description |
|---|---|
void |
autoWidth()
Resizes all columns to fit their content.
|
javafx.scene.control.ContextMenu |
createContextMenu()
Creates the context menu.
|
String |
getPreferencesSuffix()
Gets the table preferences suffix.
|
FxTableView<S> |
getTable()
Gets the table.
|
String |
getTitle()
Gets the printed title.
|
boolean |
isColumnMenuEnabled()
Returns whether the column menu is enabled.
|
void |
loadPreferences()
Loads the table preferences.
System- or user scope is determined from PersistedPreferencesFactory. |
void |
loadPreferences(boolean system)
Loads the table preferences.
|
void |
print()
Prints the table.
|
void |
savePreferences()
Saves the table preferences.
System- or user scope is determined from PersistedPreferencesFactory. |
void |
savePreferences(boolean system)
Saves the table preferences.
|
void |
setColumnMenuEnabled(boolean columnMenuEnabled)
Enables or disables the column menu.
The column menu allows to set the visibility of columns. |
void |
toSpreadsheet(boolean onlySelected)
Opens a dialog to export a table to an Excel sheet.
|
void |
toXml(boolean onlySelected)
Opens a dialog to export a table to an Excel sheet.
|
public TablePopup(FxTableView<S> table, String preferencesSuffix, boolean noViewSize, String title)
table - the tablepreferencesSuffix - the preferences suffix to load/save table preferencesnoViewSize - true if don't set the table view's sizetitle - the title of the printed tablepublic FxTableView<S> getTable()
public String getTitle()
public String getPreferencesSuffix()
public boolean isColumnMenuEnabled()
public void setColumnMenuEnabled(boolean columnMenuEnabled)
columnMenuEnabled - true to enable column menu (default)public javafx.scene.control.ContextMenu createContextMenu()
public void autoWidth()
public void print()
public void toSpreadsheet(boolean onlySelected)
onlySelected - true if export only selected rowspublic void toXml(boolean onlySelected)
onlySelected - true if export only selected rowspublic void savePreferences(boolean system)
system - true if system scope, else userpublic void savePreferences()
PersistedPreferencesFactory.public void loadPreferences(boolean system)
system - true if from system scope only, else try user firstpublic void loadPreferences()
PersistedPreferencesFactory.Tentackle - distributed, domain- and model-driven