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

    Constructors
    Constructor
    Description
    StyleChangingRowFactory(String styleClass, javafx.collections.ObservableList<T> selectionList)
    Constructor with all parameters
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.scene.control.TableRow<T>
    call(javafx.scene.control.TableView<T> tableView)
    Add listener on table item to an observable list to check the item existence and therefor style changing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 class
      selectionList - Observable list of selected items
      baseFactory - Row base factory
    • StyleChangingRowFactory

      public StyleChangingRowFactory(String styleClass, javafx.collections.ObservableList<T> selectionList)
      Constructor with all parameters
      Parameters:
      styleClass - Name of the style class
      selectionList - Observable list of selected items
  • Method Details

    • call

      public javafx.scene.control.TableRow<T> call(javafx.scene.control.TableView<T> tableView)
      Add listener on table item to an observable list to check the item existence and therefor style changing.
      Specified by:
      call in interface javafx.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