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 map. Add style class to the row if the item row is found in appropriate list.
Author:
Daniel Masek
  • Constructor Details

    • StyleChangingRowFactory

      public StyleChangingRowFactory(String styleClass, String modifiableKey, ObservableListMap modifiableService, 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
      modifiableKey - Modifiable key
      modifiableService - Observable list map
      baseFactory - Row base factory
    • StyleChangingRowFactory

      public StyleChangingRowFactory(String styleClass, String modifiableKey, ObservableListMap modifiableService)
      Constructor with all parameters
      Parameters:
      styleClass - Name of the style class
      modifiableKey - Modifiable key
      modifiableService - Observable list map
    • StyleChangingRowFactory

      public StyleChangingRowFactory(String styleClass, Class<T> modifiableKey, ObservableListMap modifiableService, 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
      modifiableKey - Modifiable class key
      modifiableService - Observable list map
      baseFactory - Row base factory
    • StyleChangingRowFactory

      public StyleChangingRowFactory(String styleClass, Class<T> modifiableKey, ObservableListMap modifiableService)
      Constructor with all parameters
      Parameters:
      styleClass - Name of the style class
      modifiableKey - Modifiable class key
      modifiableService - Observable list map
  • Method Details

    • call

      public javafx.scene.control.TableRow<T> call(javafx.scene.control.TableView<T> tableView)
      Add listener on table item and observable list map to check 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