javafx.scene.control.TableView , TableViewSkin, javafx.scene.control.TreeTableView , TreeTableViewSkin
| Modifier and Type | Field and Description |
|---|---|
| private Rectangle | |
| pack-priv boolean | columnDragLock
There are two different mouse dragged event handlers in the header code. |
| private Map | |
| private ContextMenu | columnPopupMenu
PopupMenu shown to users to allow for them to hide/show columns in the table. |
| private final InvalidationListener | |
| pack-priv final DoubleProperty | |
| private final ChangeListener | |
| private Pane | cornerRegion
This is the region where the user can interact with to show/hide columns. |
| private StackPane | dragHeader
This is the ghosted region representing the table column that is being dragged. |
| private final Label | |
| private Region | |
| private final VirtualFlow | |
| private final String | |
| private BooleanProperty | reordering
Indicates if a reordering operation of a column is in progress. |
| private TableColumnHeader | |
| private ReadOnlyObjectWrapper | |
| private double | |
| private final ListChangeListener | |
| private InvalidationListener | |
| pack-priv final TableViewSkinBase | |
| private double | |
| private InvalidationListener | |
| private InvalidationListener | |
| private ListChangeListener | |
| private final WeakInvalidationListener | |
| private final WeakChangeListener | |
| private final WeakListChangeListener | |
| private final WeakInvalidationListener | |
| private final WeakInvalidationListener | |
| private final WeakInvalidationListener | |
| private final WeakListChangeListener |
| Access | Constructor and Description |
|---|---|
| public | TableHeaderRow(final TableViewSkinBase<M, S, C extends Control, I extends IndexedCell<M>, TC extends TableColumnBase<S, ?>>
The skin used by the UI control. skin)Creates a new TableHeaderRow instance to visually represent the column
header area of controls such as |
| Modifier and Type | Method and Description |
|---|---|
| protected double | computeMinHeight(double width)
Overrides javafx. Computes the minimum height of this region. |
| protected double | computePrefHeight(double width)
Overrides javafx. Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. |
| protected double | computePrefWidth(double height)
Overrides javafx. Computes the preferred width of this region for the given height. |
| private void | |
| protected NestedTableColumnHeader | Returns: A new NestedTableColumnHeader instance.Creates a new NestedTableColumnHeader instance. |
| pack-priv TableColumnHeader | |
| private TableColumnHeader | |
| pack-priv ContextMenu | |
| pack-priv Pane | |
| private List | |
| protected TableColumnHeader | Returns: the currentTableColumnHeader being movedReturns the current |
| public final NestedTableColumnHeader | |
| private String | |
| private boolean | |
| public final boolean | |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| private void | |
| private void | |
| public final BooleanProperty | |
| private final ReadOnlyObjectProperty | |
| pack-priv void | |
| public final void | |
| pack-priv void | |
| protected void | setReorderingRegion(TableColumnHeader
the reorderingRegion)TableColumnHeader being reorderedSets the |
| private final void | |
| protected void | showColumnMenu(MouseEvent
the mouseEvent)MouseEvent which was generated when the table menu button was pressedShows a menu containing all leaf columns as items. |
| private void | |
| protected void | updateScrollX()
Called whenever the value of the horizontal scrollbar changes in order to request layout changes, shifting the
|
| private void | updateTableColumnListeners(List<? extends TableColumnBase<?, ?>> added, List<? extends TableColumnBase<?, ?>> removed)
|
| protected void |
| clip | back to summary |
|---|---|
| private Rectangle clip | |
| columnDragLock | back to summary |
|---|---|
| pack-priv boolean columnDragLock There are two different mouse dragged event handlers in the header code. Firstly, the column reordering functionality, and secondly, the column resizing functionality. Because these are handled in separate classes and with separate event handlers, we occasionally run into the issue where both event handlers were being called, resulting in bad UX. To remove this issue, we lock when the column dragging happens, and prevent resize operations from taking place. | |
| columnMenuItems | back to summary |
|---|---|
| private Map<TableColumnBase<S, T>, CheckMenuItem> columnMenuItems | |
| columnPopupMenu | back to summary |
|---|---|
| private ContextMenu columnPopupMenu PopupMenu shown to users to allow for them to hide/show columns in the table. | |
| columnTextListener | back to summary |
|---|---|
| private final InvalidationListener columnTextListener | |
| cornerPadding | back to summary |
|---|---|
| pack-priv final DoubleProperty cornerPadding | |
| cornerPaddingListener | back to summary |
|---|---|
| private final ChangeListener<Boolean> cornerPaddingListener | |
| cornerRegion | back to summary |
|---|---|
| private Pane cornerRegion This is the region where the user can interact with to show/hide columns. It is positioned in the top-right hand corner of the TableHeaderRow, and when clicked shows a PopupMenu consisting of all leaf columns. | |
| dragHeader | back to summary |
|---|---|
| private StackPane dragHeader This is the ghosted region representing the table column that is being dragged. It moves along the x-axis but is fixed in the y-axis. | |
| dragHeaderLabel | back to summary |
|---|---|
| private final Label dragHeaderLabel | |
| filler | back to summary |
|---|---|
| private Region filler | |
| flow | back to summary |
|---|---|
| private final VirtualFlow<T extends IndexedCell<T>> flow | |
| MENU_SEPARATOR | back to summary |
|---|---|
| private final String MENU_SEPARATOR | |
| reordering | back to summary |
|---|---|
| private BooleanProperty reordering Indicates if a reordering operation of a column is in progress. The value is
| |
| reorderingRegion | back to summary |
|---|---|
| private TableColumnHeader reorderingRegion | |
| rootHeader | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<NestedTableColumnHeader> rootHeader | |
| scrollX | back to summary |
|---|---|
| private double scrollX | |
| tableColumnsListener | back to summary |
|---|---|
| private final ListChangeListener<E> tableColumnsListener | |
| tablePaddingListener | back to summary |
|---|---|
| private InvalidationListener tablePaddingListener | |
| tableSkin | back to summary |
|---|---|
| pack-priv final TableViewSkinBase<?, ?, ?, ?, ?> tableSkin | |
| tableWidth | back to summary |
|---|---|
| private double tableWidth | |
| tableWidthListener | back to summary |
|---|---|
| private InvalidationListener tableWidthListener | |
| visibleColumnListener | back to summary |
|---|---|
| private InvalidationListener visibleColumnListener | |
| visibleLeafColumnsListener | back to summary |
|---|---|
| private ListChangeListener<E> visibleLeafColumnsListener | |
| weakColumnTextListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakColumnTextListener | |
| weakCornerPaddingListener | back to summary |
|---|---|
| private final WeakChangeListener<Boolean> weakCornerPaddingListener | |
| weakTableColumnsListener | back to summary |
|---|---|
| private final WeakListChangeListener<E> weakTableColumnsListener | |
| weakTablePaddingListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakTablePaddingListener | |
| weakTableWidthListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakTableWidthListener | |
| weakVisibleColumnListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakVisibleColumnListener | |
| weakVisibleLeafColumnsListener | back to summary |
|---|---|
| private final WeakListChangeListener<E> weakVisibleLeafColumnsListener | |
| TableHeaderRow | back to summary |
|---|---|
| public TableHeaderRow(final TableViewSkinBase<M, S, C extends Control, I extends IndexedCell<M>, TC extends TableColumnBase<S, ?>> skin) Creates a new TableHeaderRow instance to visually represent the column
header area of controls such as
| |
| computeMinHeight | back to summary |
|---|---|
| protected double computeMinHeight(double width) Overrides javafx. Doc from javafx. Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
| |
| computePrefHeight | back to summary |
|---|---|
| protected double computePrefHeight(double width) Overrides javafx. Doc from javafx. Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
| |
| computePrefWidth | back to summary |
|---|---|
| protected double computePrefWidth(double height) Overrides javafx. Doc from javafx. Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
| |
| createMenuItem | back to summary |
|---|---|
| private void createMenuItem(TableColumnBase<?, ?> col) | |
| createRootHeader | back to summary |
|---|---|
| protected NestedTableColumnHeader createRootHeader() Creates a new NestedTableColumnHeader instance. By default this method should not be overridden, but in some circumstances it makes sense (e.g. testing, or when extreme customization is desired).
| |
| getColumnHeaderFor | back to summary |
|---|---|
| pack-priv TableColumnHeader getColumnHeaderFor(final TableColumnBase<?, ?> col) | |
| getColumnHeaderFor | back to summary |
|---|---|
| private TableColumnHeader getColumnHeaderFor(final TableColumnBase<?, ?> col, TableColumnHeader currentHeader) | |
| getColumnPopupMenu | back to summary |
|---|---|
| pack-priv ContextMenu getColumnPopupMenu() | |
| getCornerRegion | back to summary |
|---|---|
| pack-priv Pane getCornerRegion() | |
| getLeafColumns | back to summary |
|---|---|
| private List | |
| getReorderingRegion | back to summary |
|---|---|
| protected TableColumnHeader getReorderingRegion() Returns the current
| |
| getRootHeader | back to summary |
|---|---|
| public final NestedTableColumnHeader getRootHeader() Returns the root header for all columns. The root header is a Implementation Note This design enforces that column reordering occurs only within a single
| |
| getText | back to summary |
|---|---|
| private String getText(String text, TableColumnBase<S, T> col) | |
| isColumnVisibleInHeader | back to summary |
|---|---|
| private boolean isColumnVisibleInHeader(TableColumnBase<S, T> col, List<E> columns) | |
| isReordering | back to summary |
|---|---|
| public final boolean isReordering() | |
| layoutChildren | back to summary |
|---|---|
| protected void layoutChildren() Overrides javafx. Doc from javafx. Invoked during the layout pass to layout the children in this
Subclasses should override this function to layout content as needed.
| |
| rebuildColumnMenu | back to summary |
|---|---|
| private void rebuildColumnMenu() | |
| remove | back to summary |
|---|---|
| private void remove(TableColumnBase<?, ?> col) | |
| reorderingProperty | back to summary |
|---|---|
| public final BooleanProperty reorderingProperty() | |
| rootHeaderProperty | back to summary |
|---|---|
| private final ReadOnlyObjectProperty | |
| setDragHeaderX | back to summary |
|---|---|
| pack-priv void setDragHeaderX(double dragHeaderX) | |
| setReordering | back to summary |
|---|---|
| public final void setReordering(boolean value) | |
| setReorderingColumn | back to summary |
|---|---|
| pack-priv void setReorderingColumn(TableColumnBase<S, T> rc) | |
| setReorderingRegion | back to summary |
|---|---|
| protected void setReorderingRegion(TableColumnHeader reorderingRegion) Sets the
| |
| setRootHeader | back to summary |
|---|---|
| private final void setRootHeader(NestedTableColumnHeader value) | |
| showColumnMenu | back to summary |
|---|---|
| protected void showColumnMenu(MouseEvent mouseEvent) Shows a menu containing all leaf columns as items. An item can be selected/deselected to make the corresponding column visible/invisible. Implementation Note This method can be overridden to create and show a custom menu.
| |
| updateCornerPadding | back to summary |
|---|---|
| private void updateCornerPadding() | |
| updateScrollX | back to summary |
|---|---|
| protected void updateScrollX() Called whenever the value of the horizontal scrollbar changes in order to request layout changes, shifting the
For example, if custom components are added around a
| |
| updateTableColumnListeners | back to summary |
|---|---|
| private void updateTableColumnListeners(List<? extends TableColumnBase<?, ?>> added, List<? extends TableColumnBase<?, ?>> removed) | |
| updateTableWidth | back to summary |
|---|---|
| protected void updateTableWidth() Updates the table width when a resize operation occurs. This method is called continuously when the control width
is resizing in order to properly clip this
Normally, the
| |