- 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 class
AbstractTableFindSupport.FindStrategy
Find strategy type.static class
AbstractTableFindSupport.Range
Represents an integer range.protected static class
AbstractTableFindSupport.SearchResult
Search result from a background search.
-
Field Summary
Fields Modifier and Type Field Description static String
FOUND_CELL_CLASS
static String
FOUND_CELL_STYLE
static String
FOUND_TEXT_CLASS
static String
FOUND_TEXT_STYLE
static String
SEARCH_FIELD_BACKGROUND_STYLE
static String
SEARCH_FIELD_NOT_FOUND_BACKGROUND_STYLE
static String
TABLE_VIEW_CSS
static String
TREE_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.BooleanProperty
disabledProperty()
javafx.beans.property.StringProperty
errorMessageProperty()
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()
String
getErrorMessage()
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.AbstractTableFindSupport.FindStrategy
getFindStrategy()
protected FindTextFieldSupport
getFindTextFieldSupport()
String
getFoundCellClass()
String
getFoundCellStyle()
String
getFoundTextClass()
String
getFoundTextStyle()
boolean
getLineWrap()
boolean
getMatchCase()
int
getMatchCount()
javafx.scene.control.TextField
getSearchField()
String
getSearchFieldBackgroundStyle()
Double
getSearchProgress()
protected AbstractTableFindSupport.SearchResult
getSearchResult()
String
getSearchResultInfo()
String
getSearchResultMessage()
javafx.scene.control.IndexRange
getSelectedMatchRange()
javafx.scene.control.TablePositionBase<?>
getSelectedPosition()
boolean
hasNoOccurrences()
boolean
hasSearchInProgress()
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.boolean
isDisabled()
javafx.beans.property.BooleanProperty
lineWrapProperty()
javafx.beans.property.BooleanProperty
matchCaseProperty()
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 isnull
if 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()
void
setCellFactory(javafx.util.Callback<javafx.scene.control.TableColumnBase<?,?>,? extends javafx.scene.control.IndexedCell<?>> pCellFactory)
void
setCellFactoryFilter(Predicate<javafx.scene.control.TableColumnBase<?,?>> pCellFactoryFilter)
void
setColumnFilter(Predicate<javafx.scene.control.TableColumnBase<?,?>> pColumnFilter)
void
setDisabled(boolean pDisabled)
void
setErrorMessage(String pErrorMessage)
void
setFindStrategy(AbstractTableFindSupport.FindStrategy pFindStrategy)
void
setFoundCellClass(String pFoundCellClass)
void
setFoundCellStyle(String pFoundCellStyle)
void
setFoundTextClass(String pFoundTextClass)
void
setFoundTextStyle(String pFoundTextStyle)
void
setLineWrap(boolean pLineWrap)
void
setMatchCase(boolean pMatchCase)
protected void
setSearchResult(AbstractTableFindSupport.SearchResult pSearchResult)
protected void
setupSearchField()
protected void
setupSearchFieldBackgroundStyle()
protected void
setupSearchResultInfo()
protected void
setupSearchResultMessage()
protected void
updateSearchProgress(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 isnull
if 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
-
-