T
- Table type.C
- Table column type.public abstract class TableFindSupportBase<T extends javafx.scene.control.Control,C extends javafx.scene.control.TableColumnBase> extends AbstractTableFindSupport
Modifier and Type | Class and Description |
---|---|
protected class |
TableFindSupportBase.SearchFunction
Used for finding occurrences in a text.
|
AbstractTableFindSupport.FindStrategy, AbstractTableFindSupport.Range, AbstractTableFindSupport.SearchResult
Modifier and Type | Field and Description |
---|---|
protected static AbstractObservable |
DUMMY_OBSERVABLE |
FOUND_CELL_CLASS, FOUND_CELL_STYLE, FOUND_TEXT_CLASS, FOUND_TEXT_STYLE, SEARCH_FIELD_BACKGROUND_STYLE, SEARCH_FIELD_NOT_FOUND_BACKGROUND_STYLE, TABLE_VIEW_CSS, TREE_TABLE_VIEW_CSS
Constructor and Description |
---|
TableFindSupportBase(FindTextFieldSupport pFindTextFieldSupport) |
TableFindSupportBase(FindTextFieldSupport pFindTextFieldSupport,
T pTable,
boolean pSearchInBackground) |
Modifier and Type | Method and Description |
---|---|
javafx.beans.property.BooleanProperty |
autoSelectProperty() |
protected void |
cancelCurrentFindTask() |
abstract javafx.scene.control.TablePositionBase<?> |
createTablePosition(T pTable,
int pRow,
C pColumn) |
javafx.beans.property.ObjectProperty<T> |
currentTableProperty() |
protected javafx.scene.control.TablePositionBase<?> |
find(T pTable,
javafx.scene.control.TablePositionBase<?> pFromPos,
javafx.scene.control.TablePositionBase<?> pToPos,
String pFindText) |
protected javafx.scene.control.TablePositionBase<?> |
findAndSelect(T pTable,
javafx.scene.control.TablePositionBase<?> pFromPos,
javafx.scene.control.TablePositionBase<?> pToPos,
String pFindText) |
protected javafx.scene.control.TablePositionBase<?> |
findFirst(T pTable) |
protected javafx.scene.control.TablePositionBase<?> |
findNext(T pTable,
boolean pBackwards) |
protected javafx.scene.control.TablePositionBase<?> |
findNext(T pTable,
javafx.scene.control.TablePositionBase<?> pFromPos,
boolean pBackwards) |
protected javafx.scene.control.TablePositionBase<?> |
findNextOccurrence(boolean pBackwards) |
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. |
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. |
protected void |
fireFindSelectionChange() |
protected List<javafx.beans.Observable> |
getAdditionalFindObservables() |
boolean |
getAutoSelect() |
abstract javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> |
getCellFactory(C pColumn) |
abstract javafx.collections.ObservableList<C> |
getColumns(T pTable) |
T |
getCurrentTable() |
static String |
getDisplayText(javafx.scene.control.TableColumnBase<?,?> pColumn,
Object pItem) |
protected AbstractObservable.Exposed |
getFindObservable() |
javafx.beans.Observable |
getFindSelectionChange()
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.
|
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. |
protected javafx.scene.control.TablePositionBase<?> |
getFirstSelectedCell(T pTable) |
abstract int |
getItemCount(T pTable) |
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. |
TableFindSupportBase.SearchFunction |
getSearchFunction() |
abstract javafx.collections.ObservableList<? extends javafx.scene.control.TablePositionBase> |
getSelectedCells(T pTable) |
abstract javafx.scene.control.TableSelectionModel<?> |
getSelectionModel(T pTable) |
protected void |
handleCellSelectionModeChanges() |
void |
installDefaultStyles() |
static void |
installDefaultStyles(TableFindSupportBase<?,?> pFindSupport) |
protected boolean |
isInSearchState() |
protected <S extends javafx.scene.control.TableColumnBase> |
isMatchingCell(javafx.scene.control.TablePositionBase<S> pPos,
Function<String,Boolean> pIsMatch) |
protected boolean |
isMatchingRow(T pTable,
int pRow,
Function<String,Boolean> pIsMatch) |
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. |
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). |
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 . |
javafx.beans.property.ObjectProperty<TableFindSupportBase.SearchFunction> |
searchFunctionProperty() |
protected boolean |
searchInBackground() |
protected javafx.scene.control.TablePositionBase<?> |
selectNext(boolean pBackwards) |
protected javafx.scene.control.TablePositionBase<?> |
selectNext(T pTable,
boolean pBackwards)
Returns the position of the selected cell/row, or
null if no match occurs. |
protected abstract void |
selectPosition(T pTable,
javafx.scene.control.TablePositionBase<?> pPos)
Selects the specified cell/row and ensures that it's visible.
|
void |
setAutoSelect(boolean pAutoSelect) |
abstract void |
setCellFactory(C pColumn,
javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> pCellFactory) |
void |
setCurrentTable(T pCurrentTable) |
static <V> void |
setStringConverter(javafx.scene.control.TableColumnBase<?,V> pColumn,
Function<V,String> pConverter) |
protected String |
toLowerCase(String pFindText) |
protected void |
updateFindObservables() |
protected abstract void |
updateFixedCellSize() |
protected void |
updateSearchFunction() |
void |
updateTableSelection() |
protected void |
updateTableSelection(T pTable) |
cellFactoryFilterProperty, cellFactoryProperty, columnFilterProperty, disabledProperty, errorMessageProperty, findStrategyProperty, getCellFactory, getCellFactoryFilter, getColumnFilter, getErrorMessage, getFindStrategy, getFindTextFieldSupport, getFoundCellClass, getFoundCellStyle, getFoundTextClass, getFoundTextStyle, getLineWrap, getMatchCase, getSearchField, getSearchFieldBackgroundStyle, getSearchResult, getSearchResultInfo, getSearchResultMessage, hasNoOccurrences, hasSearchInProgress, installStylesheet, isDisabled, lineWrapProperty, matchCaseProperty, nextBtnDisable, nextBtnDisableProperty, noOccurrences, noOccurrencesProperty, prevBtnDisable, prevBtnDisableProperty, searchFieldBackgroundStyle, searchFieldBackgroundStyleProperty, searchInProgress, searchInProgressProperty, searchResultInfo, searchResultInfoProperty, searchResultMessage, searchResultMessageProperty, searchResultProperty, selectNext, selectPrev, setCellFactory, setCellFactoryFilter, setColumnFilter, setDisabled, setErrorMessage, setFindStrategy, setFoundCellClass, setFoundCellStyle, setFoundTextClass, setFoundTextStyle, setLineWrap, setMatchCase, setSearchResult, setupSearchField, setupSearchFieldBackgroundStyle, setupSearchResultInfo, setupSearchResultMessage
protected static final AbstractObservable DUMMY_OBSERVABLE
public TableFindSupportBase(FindTextFieldSupport pFindTextFieldSupport)
public TableFindSupportBase(FindTextFieldSupport pFindTextFieldSupport, T pTable, boolean pSearchInBackground)
public javafx.beans.Observable getFindSelectionChange()
AbstractTableFindSupport
getFindSelectionChange
in class AbstractTableFindSupport
protected final AbstractObservable.Exposed getFindObservable()
protected final boolean searchInBackground()
public javafx.beans.property.BooleanProperty autoSelectProperty()
public boolean getAutoSelect()
public void setAutoSelect(boolean pAutoSelect)
public javafx.beans.property.ObjectProperty<T> currentTableProperty()
public T getCurrentTable()
public void setCurrentTable(T pCurrentTable)
public javafx.beans.property.ObjectProperty<TableFindSupportBase.SearchFunction> searchFunctionProperty()
public TableFindSupportBase.SearchFunction getSearchFunction()
public abstract javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> getCellFactory(C pColumn)
public abstract void setCellFactory(C pColumn, javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> pCellFactory)
public abstract int getItemCount(T pTable)
public abstract javafx.scene.control.TableSelectionModel<?> getSelectionModel(T pTable)
public abstract javafx.collections.ObservableList<? extends javafx.scene.control.TablePositionBase> getSelectedCells(T pTable)
public abstract javafx.scene.control.TablePositionBase<?> createTablePosition(T pTable, int pRow, C pColumn)
public abstract Stream<? extends javafx.scene.control.TablePositionBase<?>> positionStream(T pTable, javafx.scene.control.TablePositionBase<?> pFrom, javafx.scene.control.TablePositionBase<?> pTo)
pFromPos
(inclusive) to
pToPos
(inclusive). If pFromPos
is greater than pToPos
,
the elements in the stream are provided in backward order.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.public abstract javafx.scene.control.TablePositionBase<?> getFirstCellPos(T pTable)
null
if the table is empty or has no columns.public abstract javafx.scene.control.TablePositionBase<?> getLastCellPos(T pTable)
null
if the table is empty or has no columns.public abstract javafx.scene.control.TablePositionBase<?> prevPosition(T pTable, javafx.scene.control.TablePositionBase<?> pPos)
null
if there is no previous cell or if the specified position is null
.public abstract javafx.scene.control.TablePositionBase<?> nextPosition(T pTable, javafx.scene.control.TablePositionBase<?> pPos)
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.protected abstract void selectPosition(T pTable, javafx.scene.control.TablePositionBase<?> pPos)
null
.protected abstract void updateFixedCellSize()
protected void cancelCurrentFindTask()
protected void updateFindObservables()
protected List<javafx.beans.Observable> getAdditionalFindObservables()
protected void handleCellSelectionModeChanges()
public void updateTableSelection()
protected void updateTableSelection(T pTable)
protected javafx.scene.control.TablePositionBase<?> findNextOccurrence(boolean pBackwards)
protected javafx.scene.control.TablePositionBase<?> findNextOccurrence(T pTable, boolean pBackwards)
findNext(Control, boolean)
, but returns null
instead of
throwing PatternSyntaxException
, if not in background mode.protected javafx.scene.control.TablePositionBase<?> findNextOccurrence(T pTable, javafx.scene.control.TablePositionBase<?> pFromPos, boolean pBackwards)
findNext(Control, TablePositionBase, boolean)
, but returns
null
instead of throwing PatternSyntaxException
,
if not in background mode.protected javafx.scene.control.TablePositionBase<?> findFirst(T pTable)
protected javafx.scene.control.TablePositionBase<?> findNext(T pTable, boolean pBackwards)
null
if no match occurs.PatternSyntaxException
- if not in background mode
and invalid regex pattern is provided.protected javafx.scene.control.TablePositionBase<?> findNext(T pTable, javafx.scene.control.TablePositionBase<?> pFromPos, boolean pBackwards)
null
if no match occurs.PatternSyntaxException
- if not in background mode
and invalid regex pattern is provided.protected javafx.scene.control.TablePositionBase<?> find(T pTable, javafx.scene.control.TablePositionBase<?> pFromPos, javafx.scene.control.TablePositionBase<?> pToPos, String pFindText)
PatternSyntaxException
- if not in background mode
and invalid regex pattern is provided.protected javafx.scene.control.TablePositionBase<?> findAndSelect(T pTable, javafx.scene.control.TablePositionBase<?> pFromPos, javafx.scene.control.TablePositionBase<?> pToPos, String pFindText)
PatternSyntaxException
- if invalid regex pattern is provided.protected javafx.scene.control.TablePositionBase<?> selectNext(boolean pBackwards)
selectNext
in class AbstractTableFindSupport
protected javafx.scene.control.TablePositionBase<?> selectNext(T pTable, boolean pBackwards)
null
if no match occurs.PatternSyntaxException
- if not in background mode
and invalid regex pattern is provided.protected boolean isMatchingRow(T pTable, int pRow, Function<String,Boolean> pIsMatch)
true
if it's a matching row.protected <S extends javafx.scene.control.TableColumnBase> boolean isMatchingCell(javafx.scene.control.TablePositionBase<S> pPos, Function<String,Boolean> pIsMatch)
protected javafx.scene.control.TablePositionBase<?> getFirstSelectedCell(T pTable)
protected void updateSearchFunction()
protected boolean isInSearchState()
protected void fireFindSelectionChange()
public static String getDisplayText(javafx.scene.control.TableColumnBase<?,?> pColumn, Object pItem)
public static <V> void setStringConverter(javafx.scene.control.TableColumnBase<?,V> pColumn, Function<V,String> pConverter)
public void installDefaultStyles()
public static void installDefaultStyles(TableFindSupportBase<?,?> pFindSupport)
Copyright © 2023. All rights reserved.