Class TableFindSupportBase<T extends javafx.scene.control.Control,​C extends javafx.scene.control.TableColumnBase>

    • Constructor Detail

      • TableFindSupportBase

        public TableFindSupportBase​(FindTextFieldSupport pFindTextFieldSupport,
                                    T pTable,
                                    boolean pSearchInBackground)
    • Method Detail

      • getFindSelectionChange

        public javafx.beans.Observable getFindSelectionChange()
        Description copied from class: AbstractTableFindSupport
        Gets an observable which fires events when the table selection changes because of an 'find' event - the previous/next buttons are clicked, selection change due to find string/type change, etc.
        Specified by:
        getFindSelectionChange in class AbstractTableFindSupport
        Returns:
        observable
      • getColToOriginalCellFactory

        protected Map<javafx.scene.control.TableColumnBase,​javafx.util.Callback> getColToOriginalCellFactory()
      • searchInBackground

        protected final boolean searchInBackground()
      • autoSelectProperty

        public javafx.beans.property.BooleanProperty autoSelectProperty()
      • getAutoSelect

        public boolean getAutoSelect()
      • setAutoSelect

        public void setAutoSelect​(boolean pAutoSelect)
      • currentTableProperty

        public javafx.beans.property.ObjectProperty<T> currentTableProperty()
      • getCurrentTable

        public T getCurrentTable()
      • setCurrentTable

        public void setCurrentTable​(T pCurrentTable)
      • currentTableSelectionModelProperty

        public javafx.beans.property.ReadOnlyProperty<javafx.scene.control.TableSelectionModel<?>> currentTableSelectionModelProperty()
      • getCurrentTableSelectionModel

        public javafx.scene.control.TableSelectionModel<?> getCurrentTableSelectionModel()
      • getColumns

        public abstract javafx.collections.ObservableList<C> getColumns​(T pTable)
      • getCellFactory

        public abstract javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,​?>,​? extends javafx.scene.control.IndexedCell<?>> getCellFactory​(C pColumn)
      • setCellFactory

        public abstract void setCellFactory​(C pColumn,
                                            javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,​?>,​? extends javafx.scene.control.IndexedCell<?>> pCellFactory)
      • getItems

        public abstract List<?> getItems​(T pTable)
      • getSelectionModel

        public abstract javafx.scene.control.TableSelectionModel<?> getSelectionModel​(T pTable)
      • getSelectedCells

        public abstract javafx.collections.ObservableList<? extends javafx.scene.control.TablePositionBase> getSelectedCells​(T pTable)
      • getSelectedCells

        public javafx.collections.ObservableList<? extends javafx.scene.control.TablePositionBase> getSelectedCells()
      • createTablePosition

        public abstract javafx.scene.control.TablePositionBase<?> createTablePosition​(T pTable,
                                                                                      int pRow,
                                                                                      C pColumn)
      • positionStream

        public abstract Stream<? extends javafx.scene.control.TablePositionBase<?>> positionStream​(T pTable,
                                                                                                   javafx.scene.control.TablePositionBase<?> pFrom,
                                                                                                   javafx.scene.control.TablePositionBase<?> pTo)
        Returns a stream of positions from pFromPos (inclusive) to pToPos (inclusive). If pFromPos is greater than pToPos, the elements in the stream are provided in backward order.
        Throws:
        IllegalArgumentException - if any of the specified positions is null, or if an invalid position is specified as an argument, or if one of the specified positions is row based and the other is not.
      • getFirstCellPos

        public abstract javafx.scene.control.TablePositionBase<?> getFirstCellPos​(T pTable)
        Returns the first cell or row position, depending on whether cell selection is enabled, or null if the table is empty or has no columns.
      • getLastCellPos

        public abstract javafx.scene.control.TablePositionBase<?> getLastCellPos​(T pTable)
        Returns the last cell or row position, depending on whether cell selection is enabled, or null if the table is empty or has no columns.
      • prevPosition

        public abstract javafx.scene.control.TablePositionBase<?> prevPosition​(T pTable,
                                                                               javafx.scene.control.TablePositionBase<?> pPos)
        Returns the position of the previous cell or null if there is no previous cell or if the specified position is null.
      • nextPosition

        public abstract javafx.scene.control.TablePositionBase<?> nextPosition​(T pTable,
                                                                               javafx.scene.control.TablePositionBase<?> pPos)
        Returns the position of the next cell or null if there is no next cell. If the specified position is null and the table is not empty and there is at least one column in the table, the first cell is returned.
      • selectPosition

        protected abstract void selectPosition​(T pTable,
                                               javafx.scene.control.TablePositionBase<?> pPos)
        Selects the specified cell/row and ensures that it's visible. The method does nothing if any of the arguments is null.
      • updateFixedCellSize

        protected abstract void updateFixedCellSize()
      • getItemCount

        public int getItemCount​(T pTable)
      • cancelCurrentFindTask

        protected void cancelCurrentFindTask()
      • updateFindObservables

        protected void updateFindObservables()
      • getAdditionalFindObservables

        protected List<javafx.beans.Observable> getAdditionalFindObservables()
      • handleCellSelectionModeChanges

        protected void handleCellSelectionModeChanges()
      • updateTableSelection

        public javafx.scene.control.TablePositionBase<?> updateTableSelection()
      • updateTableSelection

        protected javafx.scene.control.TablePositionBase<?> updateTableSelection​(T pTable)
      • findNextOccurrence

        protected javafx.scene.control.TablePositionBase<?> findNextOccurrence​(boolean pBackwards)
      • findNextOccurrence

        protected javafx.scene.control.TablePositionBase<?> findNextOccurrence​(T pTable,
                                                                               boolean pBackwards)
        Same as findNext(Control, boolean), but returns null instead of throwing PatternSyntaxException, if not in background mode.
      • findNextOccurrence

        protected javafx.scene.control.TablePositionBase<?> findNextOccurrence​(T pTable,
                                                                               javafx.scene.control.TablePositionBase<?> pFromPos,
                                                                               boolean pBackwards)
        Same as findNext(Control, TablePositionBase, boolean), but returns null instead of throwing PatternSyntaxException, if not in background mode.
      • findFirst

        protected javafx.scene.control.TablePositionBase<?> findFirst​(T pTable)
      • findNext

        protected javafx.scene.control.TablePositionBase<?> findNext​(T pTable,
                                                                     boolean pBackwards)
        Returns:
        the position of the cell/row (without selecting it), or null if no match occurs.
        Throws:
        PatternSyntaxException - if not in background mode and invalid regex pattern is provided.
      • findNext

        protected javafx.scene.control.TablePositionBase<?> findNext​(T pTable,
                                                                     javafx.scene.control.TablePositionBase<?> pFromPos,
                                                                     boolean pBackwards)
        Returns:
        the position of the cell/row (without selecting it), or null if no match occurs.
        Throws:
        PatternSyntaxException - if not in background mode and invalid regex pattern is provided.
      • find

        protected javafx.scene.control.TablePositionBase<?> find​(T pTable,
                                                                 javafx.scene.control.TablePositionBase<?> pFromPos,
                                                                 javafx.scene.control.TablePositionBase<?> pToPos,
                                                                 String pFindText)
        Throws:
        PatternSyntaxException - if not in background mode and invalid regex pattern is provided.
      • findAndSelect

        protected javafx.scene.control.TablePositionBase<?> findAndSelect​(T pTable,
                                                                          javafx.scene.control.TablePositionBase<?> pFromPos,
                                                                          javafx.scene.control.TablePositionBase<?> pToPos,
                                                                          String pFindText)
        Throws:
        PatternSyntaxException - if invalid regex pattern is provided.
      • selectNext

        protected javafx.scene.control.TablePositionBase<?> selectNext​(T pTable,
                                                                       boolean pBackwards)
        Returns the position of the selected cell/row, or null if no match occurs.
        Throws:
        PatternSyntaxException - if not in background mode and invalid regex pattern is provided.
      • isSearchable

        public boolean isSearchable​(javafx.scene.control.TableColumnBase<?,​?> pColumn)
      • isMatchingRow

        protected boolean isMatchingRow​(T pTable,
                                        int pRow,
                                        Function<String,​Boolean> pIsMatch)
        Returns:
        true if it's a matching row.
      • isMatchingCell

        protected <S extends javafx.scene.control.TableColumnBase> boolean isMatchingCell​(javafx.scene.control.TablePositionBase<S> pPos,
                                                                                          Function<String,​Boolean> pIsMatch)
      • getFirstSelectedCell

        protected javafx.scene.control.TablePositionBase<?> getFirstSelectedCell​(T pTable)
      • toLowerCase

        protected String toLowerCase​(String pFindText)
      • updateSearchFunction

        protected void updateSearchFunction()
      • isInSearchState

        protected boolean isInSearchState()
      • fireFindSelectionChange

        protected void fireFindSelectionChange()
      • getDisplayText

        public static String getDisplayText​(javafx.scene.control.TableColumnBase<?,​?> pColumn,
                                            Object pItem)
      • setStringConverter

        public static <V> void setStringConverter​(javafx.scene.control.TableColumnBase<?,​V> pColumn,
                                                  Function<V,​String> pConverter)
      • installDefaultStyles

        public void installDefaultStyles()
      • installDefaultStyles

        public static void installDefaultStyles​(TableFindSupportBase<?,​?> pFindSupport)