Class StyleChangingRowFactory<T extends Modifiable>
java.lang.Object
cz.masci.commons.springfx.utility.StyleChangingRowFactory<T>
- Type Parameters:
T- Type of table item
- All Implemented Interfaces:
javafx.util.Callback<javafx.scene.control.TableView<T>,javafx.scene.control.TableRow<T>>
public class StyleChangingRowFactory<T extends Modifiable>
extends Object
implements javafx.util.Callback<javafx.scene.control.TableView<T>,javafx.scene.control.TableRow<T>>
Row factory for items in observable list. Add style class to the row if
the item is found in the list.
- Author:
- Daniel Masek
-
Constructor Summary
ConstructorsConstructorDescriptionStyleChangingRowFactory(String styleClass, javafx.collections.ObservableList<T> selectionList) Constructor with all parametersStyleChangingRowFactory(String styleClass, javafx.collections.ObservableList<T> selectionList, javafx.util.Callback<javafx.scene.control.TableView<T>, javafx.scene.control.TableRow<T>> baseFactory) Constructor with all parameters -
Method Summary
-
Constructor Details
-
StyleChangingRowFactory
public StyleChangingRowFactory(String styleClass, javafx.collections.ObservableList<T> selectionList, javafx.util.Callback<javafx.scene.control.TableView<T>, javafx.scene.control.TableRow<T>> baseFactory) Constructor with all parameters- Parameters:
styleClass- Name of the style classselectionList- Observable list of selected itemsbaseFactory- Row base factory
-
StyleChangingRowFactory
public StyleChangingRowFactory(String styleClass, javafx.collections.ObservableList<T> selectionList) Constructor with all parameters- Parameters:
styleClass- Name of the style classselectionList- Observable list of selected items
-
-
Method Details
-
call
Add listener on table item to an observable list to check the item existence and therefor style changing.- Specified by:
callin interfacejavafx.util.Callback<javafx.scene.control.TableView<T extends Modifiable>,javafx.scene.control.TableRow<T extends Modifiable>> - Parameters:
tableView- Table view to check- Returns:
- Table row
-