S
- The type of the TreeTableView generic typeT
- The type of the elements contained within the TreeTableColumn.public class TextFieldTreeTableCell<S,T>
extends <any>
javafx.scene.control.TableCell
implementation that draws a
TextField
node inside the cell.
By default, the TextFieldTableCell is rendered as a javafx.scene.control.Label
when not
being edited, and as a TextField when in editing mode. The TextField will, by
default, stretch to fill the entire table cell.
Type | Property and Description |
---|---|
<any> |
converter
The
StringConverter property. |
Modifier and Type | Field and Description |
---|---|
private <any> |
converter
*
Properties *
*
|
private TextField |
textField
*
Fields *
*
|
Constructor and Description |
---|
TextFieldTreeTableCell()
Creates a default TextFieldTreeTableCell with a null converter.
|
TextFieldTreeTableCell(<any> converter)
Creates a TextFieldTreeTableCell that provides a
TextField when put
into editing mode that allows editing of the cell content. |
Modifier and Type | Method and Description |
---|---|
void |
cancelEdit() |
<any> |
converterProperty()
The
StringConverter property. |
static <S> <any> |
forTreeTableColumn()
Provides a
TextField that allows editing of the cell content when
the cell is double-clicked, or when
javafx.scene.control.TreeTableView#edit(int, javafx.scene.control.TreeTableColumn) is called. |
static <S,T> <any> |
forTreeTableColumn(<any> converter)
Provides a
TextField that allows editing of the cell content when
the cell is double-clicked, or when
javafx.scene.control.TreeTableView#edit(int, javafx.scene.control.TreeTableColumn) is called. |
<any> |
getConverter()
Returns the
StringConverter used in this cell. |
void |
setConverter(<any> value)
Sets the
StringConverter to be used in this cell. |
void |
startEdit() |
void |
updateItem(T item,
boolean empty) |
public final <any> converterProperty
StringConverter
property.StringConverter
propertyprivate TextField textField
private <any> converter
public TextFieldTreeTableCell()
StringConverter
specified, this cell will not be able to accept
input from the TextField (as it will not know how to convert this back
to the domain object). It is therefore strongly encouraged to not use
this constructor unless you intend to set the converter separately.public TextFieldTreeTableCell(<any> converter)
TextField
when put
into editing mode that allows editing of the cell content. This method
will work on any TreeTableColumn instance, regardless of its generic type.
However, to enable this, a StringConverter
must be provided that
will convert the given String (from what the user typed in) into an
instance of type T. This item will then be passed along to the
TreeTableColumn#onEditCommitProperty()
callback.converter
- A converter
that can convert
the given String (from what the user typed in) into an instance of
type T.public static <S> <any> forTreeTableColumn()
TextField
that allows editing of the cell content when
the cell is double-clicked, or when
javafx.scene.control.TreeTableView#edit(int, javafx.scene.control.TreeTableColumn)
is called.
This method will only work on TreeTableColumn
instances which are of
type String.S
- The type of the TreeTableView generic typeCallback
that can be inserted into the
cell factory property
of a
TreeTableColumn, that enables textual editing of the content.public static <S,T> <any> forTreeTableColumn(<any> converter)
TextField
that allows editing of the cell content when
the cell is double-clicked, or when
javafx.scene.control.TreeTableView#edit(int, javafx.scene.control.TreeTableColumn)
is called.
This method will work on any TreeTableColumn
instance, regardless of
its generic type. However, to enable this, a StringConverter
must
be provided that will convert the given String (from what the user typed
in) into an instance of type T. This item will then be passed along to the
TreeTableColumn#onEditCommitProperty()
callback.S
- The type of the TreeTableView generic typeT
- The type of the elements contained within the TreeTableColumnconverter
- A StringConverter
that can convert the given String
(from what the user typed in) into an instance of type T.Callback
that can be inserted into the
cell factory property
of a
TreeTableColumn, that enables textual editing of the content.public final <any> converterProperty()
StringConverter
property.StringConverter
propertypublic final void setConverter(<any> value)
StringConverter
to be used in this cell.value
- the StringConverter
to be used in this cellpublic final <any> getConverter()
StringConverter
used in this cell.StringConverter
used in this cellpublic void startEdit()
public void cancelEdit()
public void updateItem(T item, boolean empty)