Class GridTablePropertyValueFactory<S,T>

java.lang.Object
com.dlsc.gemsfx.gridtable.GridTablePropertyValueFactory<S,T>
Type Parameters:
S - the type of the row item
T - the type of the cell value to extract
All Implemented Interfaces:
javafx.util.Callback<S,T>

public class GridTablePropertyValueFactory<S,T> extends Object implements javafx.util.Callback<S,T>
A Callback implementation that extracts a property value from a row item using Java reflection, similar in purpose to PropertyValueFactory in the standard JavaFX TableView.

The target field is located by name in the item class hierarchy (including superclasses) on the first invocation and cached for subsequent calls. The field is made accessible if necessary.

  • Constructor Details

    • GridTablePropertyValueFactory

      public GridTablePropertyValueFactory(String propertyName)
      Constructs a new property value factory.
      Parameters:
      propertyName - the field name to read from row items
  • Method Details

    • call

      public T call(S rowItem)
      Extracts the configured field value from the given row item.
      Specified by:
      call in interface javafx.util.Callback<S,T>
      Parameters:
      rowItem - the row item
      Returns:
      the extracted value