64 * <p>
65 * If such a method exists, then it is invoked, and additionally assumed
66 * to return an instance of {@code Property<String>}. The return value is used
67 * to populate the {@link TreeTableCell}. In addition, the {@code TreeTableView}
68 * adds an observer to the return value, such that any changes fired will be
69 * observed by the {@code TreeTableView}, resulting in the cell immediately
70 * updating.
71 * </p>
72 * <p>
73 * If no such method exists, then {@code TreeItemPropertyValueFactory}
74 * assumes that {@code Person} has a public method {@code getFirstName} or
75 * {@code isFirstName} with no formal parameters and a return type of
76 * {@code String}. If such a method exists, then it is invoked, and its return
77 * value is wrapped in a {@link ReadOnlyObjectWrapper}
78 * and returned to the {@code TreeTableCell}. In this situation,
79 * the {@code TreeTableCell} will not be able to observe changes to the property,
80 * unlike in the first approach above.
81 * </p>
82 *
83 * <p>For reference (and as noted in the TreeTableColumn
84 * {@link TreeTableColumn#cellValueFactory cell value factory} documentation), the
85 * long form of the code above would be the following:
86 * </p>
87 *
88 * <pre><code>
89 * TreeTableColumn<Person,String> firstNameCol = new TreeTableColumn<Person,String>("First Name");
90 * {@literal
91 * firstNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() {
92 * public ObservableValue<String> call(CellDataFeatures<Person, String> p) {
93 * // p.getValue() returns the TreeItem<Person> instance for a particular
94 * // TreeTableView row, and the second getValue() call returns the
95 * // Person instance contained within the TreeItem.
96 * return p.getValue().getValue().firstNameProperty();
97 * }
98 * });
99 * }
100 * }
101 * </code></pre>
102 *
103 * <p><b>Deploying an Application as a Module</b></p>
104 * <p>
|
64 * <p>
65 * If such a method exists, then it is invoked, and additionally assumed
66 * to return an instance of {@code Property<String>}. The return value is used
67 * to populate the {@link TreeTableCell}. In addition, the {@code TreeTableView}
68 * adds an observer to the return value, such that any changes fired will be
69 * observed by the {@code TreeTableView}, resulting in the cell immediately
70 * updating.
71 * </p>
72 * <p>
73 * If no such method exists, then {@code TreeItemPropertyValueFactory}
74 * assumes that {@code Person} has a public method {@code getFirstName} or
75 * {@code isFirstName} with no formal parameters and a return type of
76 * {@code String}. If such a method exists, then it is invoked, and its return
77 * value is wrapped in a {@link ReadOnlyObjectWrapper}
78 * and returned to the {@code TreeTableCell}. In this situation,
79 * the {@code TreeTableCell} will not be able to observe changes to the property,
80 * unlike in the first approach above.
81 * </p>
82 *
83 * <p>For reference (and as noted in the TreeTableColumn
84 * {@link TreeTableColumn#cellValueFactoryProperty() cell value factory} documentation), the
85 * long form of the code above would be the following:
86 * </p>
87 *
88 * <pre><code>
89 * TreeTableColumn<Person,String> firstNameCol = new TreeTableColumn<Person,String>("First Name");
90 * {@literal
91 * firstNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() {
92 * public ObservableValue<String> call(CellDataFeatures<Person, String> p) {
93 * // p.getValue() returns the TreeItem<Person> instance for a particular
94 * // TreeTableView row, and the second getValue() call returns the
95 * // Person instance contained within the TreeItem.
96 * return p.getValue().getValue().firstNameProperty();
97 * }
98 * });
99 * }
100 * }
101 * </code></pre>
102 *
103 * <p><b>Deploying an Application as a Module</b></p>
104 * <p>
|