Top Description Fields Constructors Methods
com.dlsc.gemsfx

public Class AdvancedTableView<T>

extends TableView<T>
Class Inheritance
Imports
com.dlsc.gemsfx.skins.AdvancedTableColumnHeader, .AdvancedTableViewSkin, javafx.application.Platform, javafx.collections.ObservableList, javafx.scene.control.Skin, .TableColumn, .TableView, javafx.scene.control.skin.NestedTableColumnHeader, .TableColumnHeader

A custom table view with additional features for the standard table view, e.g. the ability to optimize the column width based on their content.
See Also
autoResizeAllColumns

Field Summary

Modifier and TypeField and Description
private boolean
private int
Inherited from javafx.scene.control.TableView:
CONSTRAINED_RESIZE_POLICYCONSTRAINED_RESIZE_POLICY_ALL_COLUMNSCONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMNCONSTRAINED_RESIZE_POLICY_FLEX_NEXT_COLUMNCONSTRAINED_RESIZE_POLICY_LAST_COLUMNCONSTRAINED_RESIZE_POLICY_NEXT_COLUMNCONSTRAINED_RESIZE_POLICY_SUBSEQUENT_COLUMNSDEFAULT_SORT_POLICYUNCONSTRAINED_RESIZE_POLICY

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
autoResizeAllColumns()

Resizes all columns to have a perfect width so that the cell content is fully visible.

public void
autoResizeAllColumns(int
the number of rows to look at for the resizing operation
rows
)

Resizes all columns to have a perfect width so that the cell content is fully visible.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.TableView.createDefaultSkin.

Create a new instance of the default skin for this control.

private void
init()

private void
resize(TableColumnHeader header, int rows)

Inherited from javafx.scene.control.TableView:
columnResizePolicyPropertycomparatorPropertyediteditablePropertyeditingCellPropertyfixedCellSizePropertyfocusModelPropertygetClassCssMetaDatagetColumnResizePolicygetColumnsgetComparatorgetControlCssMetaDatagetEditingCellgetFixedCellSizegetFocusModelgetItemsgetOnScrollTogetOnScrollToColumngetOnSortgetPlaceholdergetRowFactorygetSelectionModelgetSortOrdergetSortPolicygetVisibleLeafColumngetVisibleLeafColumnsgetVisibleLeafIndexisEditableisTableMenuButtonVisibleitemsPropertyonScrollToColumnPropertyonScrollToPropertyonSortPropertyplaceholderPropertyqueryAccessibleAttributerefreshresizeColumnrowFactoryPropertyscrollToscrollToscrollToColumnscrollToColumnIndexselectionModelPropertysetColumnResizePolicysetEditablesetFixedCellSizesetFocusModelsetItemssetOnScrollTosetOnScrollToColumnsetOnSortsetPlaceholdersetRowFactorysetSelectionModelsetSortPolicysetTableMenuButtonVisiblesortsortPolicyPropertytableMenuButtonVisibleProperty

Field Detail

autoResizeAllColumnsback to summary
private boolean autoResizeAllColumns
autoResizeRowsback to summary
private int autoResizeRows

Constructor Detail

AdvancedTableViewback to summary
public AdvancedTableView()
AdvancedTableViewback to summary
public AdvancedTableView(ObservableList<T> items)

Method Detail

autoResizeAllColumnsback to summary
public void autoResizeAllColumns()

Resizes all columns to have a perfect width so that the cell content is fully visible. This will look at the first 100 rows for its calculations.

autoResizeAllColumnsback to summary
public void autoResizeAllColumns(int rows)

Resizes all columns to have a perfect width so that the cell content is fully visible.

Parameters
rows:int

the number of rows to look at for the resizing operation

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.TableView.createDefaultSkin.

Doc from javafx.scene.control.TableView.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Annotations
@Override
initback to summary
private void init()
resizeback to summary
private void resize(TableColumnHeader header, int rows)