< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/cell/PropertyValueFactory.java
Print this page
*** 55,65 ****
* In this example, the "firstName" string is used as a reference to an assumed
* <code>firstNameProperty()</code> method in the <code>Person</code> class type
* (which is the class type of the TableView
* {@link TableView#itemsProperty() items} list). Additionally, this method must
* return a {@link Property} instance. If a method meeting these requirements
! * is found, then the {@link TableCell} is populated with this ObservableValue<T>.
* In addition, the TableView will automatically add an observer to the
* returned value, such that any changes fired will be observed by the TableView,
* resulting in the cell immediately updating.
*
* <p>If no method matching this pattern exists, there is fall-through support
--- 55,66 ----
* In this example, the "firstName" string is used as a reference to an assumed
* <code>firstNameProperty()</code> method in the <code>Person</code> class type
* (which is the class type of the TableView
* {@link TableView#itemsProperty() items} list). Additionally, this method must
* return a {@link Property} instance. If a method meeting these requirements
! * is found, then the {@link TableCell} is populated with this
! * {@literal ObservableValue<T>}.
* In addition, the TableView will automatically add an observer to the
* returned value, such that any changes fired will be observed by the TableView,
* resulting in the cell immediately updating.
*
* <p>If no method matching this pattern exists, there is fall-through support
*** 119,128 ****
--- 120,130 ----
return getCellDataReflectively(param.getValue());
}
/**
* Returns the property name provided in the constructor.
+ * @return the property name provided in the constructor
*/
public final String getProperty() { return property; }
private ObservableValue<T> getCellDataReflectively(S rowData) {
if (getProperty() == null || getProperty().isEmpty() || rowData == null) return null;
< prev index next >