Skip navigation links
com.sun.javafx.scene.control.skin

Class TableViewSkinBase<M,S,C extends Control,B extends BehaviorBase<C>,I extends IndexedCell<M>,TC extends TableColumnBase<S,?>>

    • Field Detail

      • REFRESH

        public static final java.lang.String REFRESH
        * Static Fields * *
        See Also:
        Constant Field Values
      • contentWidthDirty

        private boolean contentWidthDirty
        * Internal Fields * *
      • columnReorderLine

        private Region columnReorderLine
        This region is used to overlay atop the table when the user is performing a column resize operation or a column reordering operation. It is a line that runs the height of the table to indicate either the final width of of the selected column, or the position the column will be 'dropped' into when the reordering operation completes.
      • columnReorderOverlay

        private Region columnReorderOverlay
        A region which is resized and positioned such that it perfectly matches the dimensions of any TableColumn that is being reordered by the user. This is useful, for example, as a semi-transparent overlay to give feedback to the user as to which column is currently being moved.
      • tableHeaderRow

        private TableHeaderRow tableHeaderRow
        The entire header region for all columns. This header region handles column reordering and resizing. It also handles the positioning and resizing of thte columnReorderLine and columnReorderOverlay.
      • placeholderRegion

        private StackPane placeholderRegion
        Region placed over the top of the flow (and possibly the header row) if there is no data and/or there are no columns specified.
      • placeholderLabel

        private Label placeholderLabel
      • EMPTY_TABLE_TEXT

        private static final java.lang.String EMPTY_TABLE_TEXT
      • NO_COLUMNS_TEXT

        private static final java.lang.String NO_COLUMNS_TEXT
      • visibleColCount

        private int visibleColCount
      • needCellsRebuilt

        protected boolean needCellsRebuilt
      • needCellsRecreated

        protected boolean needCellsRecreated
      • needCellsReconfigured

        protected boolean needCellsReconfigured
      • itemCount

        private int itemCount
      • forceCellRecreate

        protected boolean forceCellRecreate
      • IS_PANNABLE

        private static final boolean IS_PANNABLE
      • propertiesMapListener

        private MapChangeListener<java.lang.Object,java.lang.Object> propertiesMapListener
        * Listeners * *
      • GOLDEN_RATIO_MULTIPLIER

        private static final double GOLDEN_RATIO_MULTIPLIER
        * Layout * *
        See Also:
        Constant Field Values
    • Constructor Detail

      • TableViewSkinBase

        public TableViewSkinBase(C control,
                                 B behavior)
        * Constructors * *
    • Method Detail

      • init

        protected void init(C control)
      • getSelectionModel

        protected abstract TableSelectionModel<S> getSelectionModel()
        * Abstract Methods * *
      • getVisibleLeafColumns

        protected abstract ObservableList<? extends TC> getVisibleLeafColumns()
      • getVisibleLeafIndex

        protected abstract int getVisibleLeafIndex(TC tc)
      • getVisibleLeafColumn

        protected abstract TC getVisibleLeafColumn(int col)
      • tableMenuButtonVisibleProperty

        protected abstract BooleanProperty tableMenuButtonVisibleProperty()
      • resizeColumn

        protected abstract boolean resizeColumn(TC tc,
                                                double delta)
      • resizeColumnToFitContent

        protected abstract void resizeColumnToFitContent(TC tc,
                                                         int maxRows)
      • edit

        protected abstract void edit(int index,
                                     TC column)
      • dispose

        public void dispose()
        Description copied from class: BehaviorSkinBase
        Called by a Skinnable when the Skin is replaced on the Skinnable. This method allows a Skin to implement any logic necessary to clean up itself after the Skin is no longer needed. It may be used to release native resources. The methods Skin.getSkinnable() and Skin.getNode() should return null following a call to dispose. Calling dispose twice has no effect.
        Specified by:
        dispose in interface Skin<C extends Control>
        Overrides:
        dispose in class BehaviorSkinBase<C extends Control,B extends BehaviorBase<C>>
      • createTableHeaderRow

        protected TableHeaderRow createTableHeaderRow()
      • getColumnReorderLine

        public Region getColumnReorderLine()
      • onScrollPageDown

        public int onScrollPageDown(boolean isFocusDriven)
        Function used to scroll the container down by one 'page', although if this is a horizontal container, then the scrolling will be to the right.
      • onScrollPageUp

        public int onScrollPageUp(boolean isFocusDriven)
        Function used to scroll the container up by one 'page', although if this is a horizontal container, then the scrolling will be to the left.
      • isLeadIndex

        private boolean isLeadIndex(boolean isFocusDriven,
                                    int index)
      • isColumnPartiallyOrFullyVisible

        boolean isColumnPartiallyOrFullyVisible(TC col)
      • horizontalScroll

        protected void horizontalScroll()
      • onFocusPreviousCell

        protected void onFocusPreviousCell()
      • onFocusNextCell

        protected void onFocusNextCell()
      • onSelectPreviousCell

        protected void onSelectPreviousCell()
      • onSelectNextCell

        protected void onSelectNextCell()
      • onSelectLeftCell

        protected void onSelectLeftCell()
      • onSelectRightCell

        protected void onSelectRightCell()
      • onMoveToFirstCell

        protected void onMoveToFirstCell()
      • onMoveToLastCell

        protected void onMoveToLastCell()
      • checkContentWidthState

        private void checkContentWidthState()
      • computePrefHeight

        protected double computePrefHeight(double width,
                                           double topInset,
                                           double rightInset,
                                           double bottomInset,
                                           double leftInset)
        Description copied from class: SkinBase
        Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.
        Overrides:
        computePrefHeight in class SkinBase<C extends Control>
        Parameters:
        width - the width that should be used if preferred height depends on it
        topInset - the pixel snapped top inset
        rightInset - the pixel snapped right inset
        bottomInset - the pixel snapped bottom inset
        leftInset - the pixel snapped left inset
        Returns:
        the calculated preferred height
      • computePrefWidth

        protected double computePrefWidth(double height,
                                          double topInset,
                                          double rightInset,
                                          double bottomInset,
                                          double leftInset)
        Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.
        Overrides:
        computePrefWidth in class SkinBase<C extends Control>
        Parameters:
        height - the height that should be used if preferred width depends on it
        topInset - the pixel snapped top inset
        rightInset - the pixel snapped right inset
        bottomInset - the pixel snapped bottom inset
        leftInset - the pixel snapped left inset
        Returns:
        the calculated preferred width
      • updateVisibleColumnCount

        private void updateVisibleColumnCount()
        Keeps track of how many leaf columns are currently visible in this table.
      • updateVisibleLeafColumnWidthListeners

        private void updateVisibleLeafColumnWidthListeners(java.util.List<? extends TC> added,
                                                           java.util.List<? extends TC> removed)
      • updatePlaceholderRegionVisibility

        protected final void updatePlaceholderRegionVisibility()
      • updateContentWidth

        private void updateContentWidth()
      • refreshView

        private void refreshView()
      • scrollHorizontally

        protected void scrollHorizontally()
      • scrollHorizontally

        protected void scrollHorizontally(TC col)
      • isCellSelected

        private boolean isCellSelected(int row)
      • isCellFocused

        private boolean isCellFocused(int row)