- java.lang.Object
-
- com.iamsoft.util.ui.javafx.table.AbstractTableFindSupport
-
- Direct Known Subclasses:
MultiTableViewFindSupport,TableFindSupportBase
public abstract class AbstractTableFindSupport extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractTableFindSupport.FindStrategyFind strategy type.static classAbstractTableFindSupport.RangeRepresents an integer range.protected static classAbstractTableFindSupport.SearchResultSearch result from a background search.
-
Field Summary
Fields Modifier and Type Field Description static StringFOUND_CELL_CLASSstatic StringFOUND_CELL_STYLEstatic StringFOUND_TEXT_CLASSstatic StringFOUND_TEXT_STYLEstatic StringSEARCH_FIELD_BACKGROUND_STYLEstatic StringSEARCH_FIELD_NOT_FOUND_BACKGROUND_STYLEstatic StringTABLE_VIEW_CSSstatic StringTREE_TABLE_VIEW_CSS
-
Constructor Summary
Constructors Constructor Description AbstractTableFindSupport(FindTextFieldSupport pFindTextFieldSupport)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ObjectProperty<Predicate<javafx.scene.control.TableColumnBase<?,?>>>cellFactoryFilterProperty()javafx.beans.property.ObjectProperty<javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>>>cellFactoryProperty()javafx.beans.property.ObjectProperty<Predicate<javafx.scene.control.TableColumnBase<?,?>>>columnFilterProperty()javafx.beans.property.BooleanPropertydisabledProperty()javafx.beans.property.StringPropertyerrorMessageProperty()javafx.beans.property.ObjectProperty<AbstractTableFindSupport.FindStrategy>findStrategyProperty()javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>>getCellFactory()Predicate<javafx.scene.control.TableColumnBase<?,?>>getCellFactoryFilter()Predicate<javafx.scene.control.TableColumnBase<?,?>>getColumnFilter()StringgetErrorMessage()abstract javafx.beans.ObservablegetFindSelectionChange()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.AbstractTableFindSupport.FindStrategygetFindStrategy()protected FindTextFieldSupportgetFindTextFieldSupport()StringgetFoundCellClass()StringgetFoundCellStyle()StringgetFoundTextClass()StringgetFoundTextStyle()booleangetLineWrap()booleangetMatchCase()intgetMatchCount()javafx.scene.control.TextFieldgetSearchField()StringgetSearchFieldBackgroundStyle()DoublegetSearchProgress()protected AbstractTableFindSupport.SearchResultgetSearchResult()StringgetSearchResultInfo()StringgetSearchResultMessage()javafx.scene.control.IndexRangegetSelectedMatchRange()javafx.scene.control.TablePositionBase<?>getSelectedPosition()booleanhasNoOccurrences()booleanhasSearchInProgress()static voidinstallStylesheet(javafx.beans.value.ObservableValue<? extends javafx.scene.control.Control> pCurrentTableProperty, String pStylesheet)Ensures that the specified stylesheet is added to the stylesheets of the specified current table.booleanisDisabled()javafx.beans.property.BooleanPropertylineWrapProperty()javafx.beans.property.BooleanPropertymatchCaseProperty()javafx.beans.property.ReadOnlyProperty<Integer>matchCountProperty()protected javafx.beans.property.ReadOnlyObjectWrapper<Integer>matchCountWrapper()protected javafx.beans.property.ObjectProperty<Boolean>nextBtnDisable()javafx.beans.property.ReadOnlyProperty<Boolean>nextBtnDisableProperty()protected javafx.beans.property.ObjectProperty<Boolean>noOccurrences()javafx.beans.property.ReadOnlyProperty<Boolean>noOccurrencesProperty()protected javafx.beans.property.ObjectProperty<Boolean>prevBtnDisable()javafx.beans.property.ReadOnlyProperty<Boolean>prevBtnDisableProperty()protected javafx.beans.property.ObjectProperty<String>searchFieldBackgroundStyle()javafx.beans.property.ReadOnlyProperty<String>searchFieldBackgroundStyleProperty()protected javafx.beans.property.ObjectProperty<Boolean>searchInProgress()javafx.beans.property.ReadOnlyProperty<Boolean>searchInProgressProperty()protected javafx.beans.property.ObjectProperty<Double>searchProgress()javafx.beans.property.ReadOnlyProperty<Double>searchProgressProperty()protected javafx.beans.property.ObjectProperty<String>searchResultInfo()javafx.beans.property.ReadOnlyProperty<String>searchResultInfoProperty()protected javafx.beans.property.ObjectProperty<String>searchResultMessage()javafx.beans.property.ReadOnlyProperty<String>searchResultMessageProperty()protected javafx.beans.property.ObjectProperty<AbstractTableFindSupport.SearchResult>searchResultProperty()javafx.beans.property.ReadOnlyProperty<javafx.scene.control.IndexRange>selectedMatchRangeProperty()protected javafx.beans.property.ReadOnlyObjectWrapper<javafx.scene.control.IndexRange>selectedMatchRangeWrapper()javafx.beans.property.ReadOnlyProperty<javafx.scene.control.TablePositionBase<?>>selectedPositionProperty()Note that the returned value isnullif multiple items are selected.protected javafx.beans.property.ReadOnlyObjectWrapper<javafx.scene.control.TablePositionBase<?>>selectedPositionWrapper()javafx.scene.control.TablePositionBase<?>selectNext()protected abstract javafx.scene.control.TablePositionBase<?>selectNext(boolean pBackwards)javafx.scene.control.TablePositionBase<?>selectPrev()voidsetCellFactory(javafx.util.Callback<javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> pCellFactory)voidsetCellFactoryFilter(Predicate<javafx.scene.control.TableColumnBase<?,?>> pCellFactoryFilter)voidsetColumnFilter(Predicate<javafx.scene.control.TableColumnBase<?,?>> pColumnFilter)voidsetDisabled(boolean pDisabled)voidsetErrorMessage(String pErrorMessage)voidsetFindStrategy(AbstractTableFindSupport.FindStrategy pFindStrategy)voidsetFoundCellClass(String pFoundCellClass)voidsetFoundCellStyle(String pFoundCellStyle)voidsetFoundTextClass(String pFoundTextClass)voidsetFoundTextStyle(String pFoundTextStyle)voidsetLineWrap(boolean pLineWrap)voidsetMatchCase(boolean pMatchCase)protected voidsetSearchResult(AbstractTableFindSupport.SearchResult pSearchResult)protected voidsetupSearchField()protected voidsetupSearchFieldBackgroundStyle()protected voidsetupSearchResultInfo()protected voidsetupSearchResultMessage()protected voidupdateSearchProgress(double pProgress)Use this method to set determinate progress only for a short duration.protected javafx.scene.control.TablePositionBase<?>updateSelectedMatchRange(javafx.scene.control.TablePositionBase<?> pPos)
-
-
-
Field Detail
-
FOUND_CELL_CLASS
public static final String FOUND_CELL_CLASS
- See Also:
- Constant Field Values
-
FOUND_TEXT_CLASS
public static final String FOUND_TEXT_CLASS
- See Also:
- Constant Field Values
-
FOUND_CELL_STYLE
public static final String FOUND_CELL_STYLE
- See Also:
- Constant Field Values
-
FOUND_TEXT_STYLE
public static final String FOUND_TEXT_STYLE
- See Also:
- Constant Field Values
-
TABLE_VIEW_CSS
public static final String TABLE_VIEW_CSS
-
TREE_TABLE_VIEW_CSS
public static final String TREE_TABLE_VIEW_CSS
-
SEARCH_FIELD_BACKGROUND_STYLE
public static final String SEARCH_FIELD_BACKGROUND_STYLE
- See Also:
- Constant Field Values
-
SEARCH_FIELD_NOT_FOUND_BACKGROUND_STYLE
public static final String SEARCH_FIELD_NOT_FOUND_BACKGROUND_STYLE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractTableFindSupport
public AbstractTableFindSupport(FindTextFieldSupport pFindTextFieldSupport)
-
-
Method Detail
-
getFoundCellClass
public String getFoundCellClass()
-
setFoundCellClass
public void setFoundCellClass(String pFoundCellClass)
-
getFoundCellStyle
public String getFoundCellStyle()
-
setFoundCellStyle
public void setFoundCellStyle(String pFoundCellStyle)
-
getFoundTextStyle
public String getFoundTextStyle()
-
setFoundTextStyle
public void setFoundTextStyle(String pFoundTextStyle)
-
getFoundTextClass
public String getFoundTextClass()
-
setFoundTextClass
public void setFoundTextClass(String pFoundTextClass)
-
getFindTextFieldSupport
protected FindTextFieldSupport getFindTextFieldSupport()
-
cellFactoryProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>>> cellFactoryProperty()
-
getCellFactory
public javafx.util.Callback<? extends javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> getCellFactory()
-
setCellFactory
public void setCellFactory(javafx.util.Callback<javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> pCellFactory)
-
cellFactoryFilterProperty
public javafx.beans.property.ObjectProperty<Predicate<javafx.scene.control.TableColumnBase<?,?>>> cellFactoryFilterProperty()
-
getCellFactoryFilter
public Predicate<javafx.scene.control.TableColumnBase<?,?>> getCellFactoryFilter()
-
setCellFactoryFilter
public void setCellFactoryFilter(Predicate<javafx.scene.control.TableColumnBase<?,?>> pCellFactoryFilter)
-
columnFilterProperty
public javafx.beans.property.ObjectProperty<Predicate<javafx.scene.control.TableColumnBase<?,?>>> columnFilterProperty()
-
getColumnFilter
public Predicate<javafx.scene.control.TableColumnBase<?,?>> getColumnFilter()
-
setColumnFilter
public void setColumnFilter(Predicate<javafx.scene.control.TableColumnBase<?,?>> pColumnFilter)
-
findStrategyProperty
public javafx.beans.property.ObjectProperty<AbstractTableFindSupport.FindStrategy> findStrategyProperty()
-
getFindStrategy
public AbstractTableFindSupport.FindStrategy getFindStrategy()
-
setFindStrategy
public void setFindStrategy(AbstractTableFindSupport.FindStrategy pFindStrategy)
-
lineWrapProperty
public javafx.beans.property.BooleanProperty lineWrapProperty()
-
getLineWrap
public boolean getLineWrap()
-
setLineWrap
public void setLineWrap(boolean pLineWrap)
-
matchCaseProperty
public javafx.beans.property.BooleanProperty matchCaseProperty()
-
getMatchCase
public boolean getMatchCase()
-
setMatchCase
public void setMatchCase(boolean pMatchCase)
-
errorMessageProperty
public javafx.beans.property.StringProperty errorMessageProperty()
-
getErrorMessage
public String getErrorMessage()
-
setErrorMessage
public void setErrorMessage(String pErrorMessage)
-
searchResultInfo
protected javafx.beans.property.ObjectProperty<String> searchResultInfo()
-
searchResultInfoProperty
public javafx.beans.property.ReadOnlyProperty<String> searchResultInfoProperty()
-
getSearchResultInfo
public String getSearchResultInfo()
-
searchResultMessage
protected javafx.beans.property.ObjectProperty<String> searchResultMessage()
-
searchResultMessageProperty
public javafx.beans.property.ReadOnlyProperty<String> searchResultMessageProperty()
-
getSearchResultMessage
public String getSearchResultMessage()
-
searchFieldBackgroundStyle
protected javafx.beans.property.ObjectProperty<String> searchFieldBackgroundStyle()
-
searchFieldBackgroundStyleProperty
public javafx.beans.property.ReadOnlyProperty<String> searchFieldBackgroundStyleProperty()
-
getSearchFieldBackgroundStyle
public String getSearchFieldBackgroundStyle()
-
noOccurrences
protected javafx.beans.property.ObjectProperty<Boolean> noOccurrences()
-
noOccurrencesProperty
public javafx.beans.property.ReadOnlyProperty<Boolean> noOccurrencesProperty()
-
hasNoOccurrences
public boolean hasNoOccurrences()
-
prevBtnDisable
protected javafx.beans.property.ObjectProperty<Boolean> prevBtnDisable()
-
prevBtnDisableProperty
public javafx.beans.property.ReadOnlyProperty<Boolean> prevBtnDisableProperty()
-
nextBtnDisable
protected javafx.beans.property.ObjectProperty<Boolean> nextBtnDisable()
-
nextBtnDisableProperty
public javafx.beans.property.ReadOnlyProperty<Boolean> nextBtnDisableProperty()
-
disabledProperty
public javafx.beans.property.BooleanProperty disabledProperty()
-
isDisabled
public boolean isDisabled()
-
setDisabled
public void setDisabled(boolean pDisabled)
-
searchInProgress
protected javafx.beans.property.ObjectProperty<Boolean> searchInProgress()
-
searchInProgressProperty
public javafx.beans.property.ReadOnlyProperty<Boolean> searchInProgressProperty()
-
hasSearchInProgress
public boolean hasSearchInProgress()
-
searchProgress
protected javafx.beans.property.ObjectProperty<Double> searchProgress()
-
searchProgressProperty
public javafx.beans.property.ReadOnlyProperty<Double> searchProgressProperty()
-
getSearchProgress
public Double getSearchProgress()
-
searchResultProperty
protected javafx.beans.property.ObjectProperty<AbstractTableFindSupport.SearchResult> searchResultProperty()
-
getSearchResult
protected AbstractTableFindSupport.SearchResult getSearchResult()
-
setSearchResult
protected void setSearchResult(AbstractTableFindSupport.SearchResult pSearchResult)
-
matchCountWrapper
protected javafx.beans.property.ReadOnlyObjectWrapper<Integer> matchCountWrapper()
-
matchCountProperty
public javafx.beans.property.ReadOnlyProperty<Integer> matchCountProperty()
-
getMatchCount
public int getMatchCount()
-
selectedMatchRangeWrapper
protected javafx.beans.property.ReadOnlyObjectWrapper<javafx.scene.control.IndexRange> selectedMatchRangeWrapper()
-
selectedPositionWrapper
protected javafx.beans.property.ReadOnlyObjectWrapper<javafx.scene.control.TablePositionBase<?>> selectedPositionWrapper()
-
selectedMatchRangeProperty
public javafx.beans.property.ReadOnlyProperty<javafx.scene.control.IndexRange> selectedMatchRangeProperty()
-
getSelectedMatchRange
public javafx.scene.control.IndexRange getSelectedMatchRange()
-
selectedPositionProperty
public javafx.beans.property.ReadOnlyProperty<javafx.scene.control.TablePositionBase<?>> selectedPositionProperty()
Note that the returned value isnullif multiple items are selected.
-
getSelectedPosition
public javafx.scene.control.TablePositionBase<?> getSelectedPosition()
-
selectNext
protected abstract javafx.scene.control.TablePositionBase<?> selectNext(boolean pBackwards)
-
selectNext
public javafx.scene.control.TablePositionBase<?> selectNext()
-
selectPrev
public javafx.scene.control.TablePositionBase<?> selectPrev()
-
updateSelectedMatchRange
protected javafx.scene.control.TablePositionBase<?> updateSelectedMatchRange(javafx.scene.control.TablePositionBase<?> pPos)
-
getSearchField
public javafx.scene.control.TextField getSearchField()
-
setupSearchFieldBackgroundStyle
protected void setupSearchFieldBackgroundStyle()
-
setupSearchResultMessage
protected void setupSearchResultMessage()
-
setupSearchResultInfo
protected void setupSearchResultInfo()
-
setupSearchField
protected void setupSearchField()
-
getFindSelectionChange
public abstract 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.- Returns:
- observable
-
updateSearchProgress
protected void updateSearchProgress(double pProgress)
Use this method to set determinate progress only for a short duration. This is useful for semi-determinate progress indicators, where progress value might be unknown in certain cases.
-
installStylesheet
public static void installStylesheet(javafx.beans.value.ObservableValue<? extends javafx.scene.control.Control> pCurrentTableProperty, String pStylesheet)Ensures that the specified stylesheet is added to the stylesheets of the specified current table.- Parameters:
pCurrentTableProperty- proppStylesheet- String URL linking to the stylesheet to install
-
-