TableCell implementation that draws a
ComboBox node inside the cell.
By default, the ComboBox2TableCell is rendered as a javafx. when not
being edited, and as a ComboBox when in editing mode. The ComboBox will, by
default, stretch to fill the entire table cell.
To create a ComboBox2TableCell, it is necessary to provide zero or more
items that will be shown to the user when the ComboBox menu is
showing. These items must be of the same type as the TableColumn.
This table cell supports commit on focus lost. By default the ComboBox will
be set as editable.
| Modifier and Type | Field and Description |
|---|---|
| private ComboBox | comboBox
*
Fields *
*
|
| private final ChangeListener | |
| private final EventHandler |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ComboBox2TableCell(T...
The items to show in the ComboBox popup menu when selected
by the user. items)Creates a default |
| public | ComboBox2TableCell(StringConverter<T>
A converter, T... StringConverter that can convert an item of type T
into a user-readable string so that it may then be shown in the
ComboBox popup menu.The items to show in the ComboBox popup menu when selected
by the user. items)Creates a |
| public | ComboBox2TableCell(ObservableList<T>
The items to show in the ComboBox popup menu when selected
by the user. items)Creates a default |
| public | ComboBox2TableCell(StringConverter<T>
A converter, ObservableList<T> StringConverter that can convert an item of type T
into a user-readable string so that it may then be shown in the
ComboBox popup menu.The items to show in the ComboBox popup menu when selected
by the user. items)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public void | commitEdit(T item)
Overrides javafx. Commits an edit to the value of the cell. |
| public static < The type of the objects contained within the TableView S, The type of the elements contained within the TableColumn. T> Callback | Returns: ACallback that will return a TableCell that is able to
work on the type of element contained within the TableColumn.Zero or more items that will be shown to the user when the
items)ComboBox menu is showing. These items must be of the same
type as the TableColumn. Note that it is up to the developer to set
event handlers to listen to edit events in the
TableColumn, and react accordingly. Methods of interest include
setOnEditStart,
setOnEditCommit,
and setOnEditCancel.Hides javafx. Creates a ComboBox cell factory for use in |
| public static < The type of the objects contained within the TableView S, The type of the elements contained within the TableColumn. T> Callback | Returns: ACallback that will return a TableCell that is able to
work on the type of element contained within the TableColumn.A converter, final T... StringConverter to convert the given item (of
type T) to a String for displaying to the user.Zero or more items that will be shown to the user when the
items)ComboBox menu is showing. These items must be of the same
type as the TableColumn. Note that it is up to the developer to set
event handlers to listen to edit events in the
TableColumn, and react accordingly. Methods of interest include
setOnEditStart,
setOnEditCommit,
and setOnEditCancel.Hides javafx. Creates a ComboBox cell factory for use in |
| public static < The type of the objects contained within the TableView S, The type of the elements contained within the TableColumn. T> Callback | Returns: ACallback that will return a TableCell that is able to
work on the type of element contained within the TableColumn.Zero or more items that will be shown to the user when the
items)ComboBox menu is showing. These items must be of the same
type as the TableColumn. Note that it is up to the developer to set
event handlers to listen to edit events in the
TableColumn, and react accordingly. Methods of interest include
setOnEditStart,
setOnEditCommit,
and setOnEditCancel.Hides javafx. Creates a ComboBox cell factory for use in |
| public static < The type of the objects contained within the TableView S, The type of the elements contained within the TableColumn. T> Callback | Returns: ACallback that will return a TableCell that is able to
work on the type of element contained within the TableColumn.A converter, final ObservableList<T> StringConverter to convert the given item (of
type T) to a String for displaying to the user.Zero or more items that will be shown to the user when the
items)ComboBox menu is showing. These items must be of the same
type as the TableColumn. Note that it is up to the developer to set
event handlers to listen to edit events in the
TableColumn, and react accordingly. Methods of interest include
setOnEditStart,
setOnEditCommit,
and setOnEditCancel.Hides javafx. Creates a ComboBox cell factory for use in |
| private void |
| comboBox | back to summary |
|---|---|
| private ComboBox<T> comboBox Hides javafx. * Fields * * | |
| focusListener | back to summary |
|---|---|
| private final ChangeListener<Boolean> focusListener | |
| keyEventHandler | back to summary |
|---|---|
| private final EventHandler<KeyEvent> keyEventHandler | |
| ComboBox2TableCell | back to summary |
|---|---|
| public ComboBox2TableCell() Creates a default ComboBox2TableCell with an empty items list. This table cell supports commit on focus lost. By default the ComboBox is set as editable. | |
| ComboBox2TableCell | back to summary |
|---|---|
| public ComboBox2TableCell(T... items) Creates a default
| |
| ComboBox2TableCell | back to summary |
|---|---|
| public ComboBox2TableCell(StringConverter<T> converter, T... items) Creates a
| |
| ComboBox2TableCell | back to summary |
|---|---|
| public ComboBox2TableCell(ObservableList<T> items) Creates a default
| |
| ComboBox2TableCell | back to summary |
|---|---|
| public ComboBox2TableCell(StringConverter<T> converter, ObservableList<T> items) Creates a
| |
| commitEdit | back to summary |
|---|---|
| public void commitEdit(T item) Overrides javafx. Doc from javafx. Commits an edit to the value of the cell. Call this function when appropriate (based on the user interaction requirements of your cell editing user interface) to do two things:
In general there is no need to override this method in custom cell
implementations - it should be sufficient to simply call this method
when appropriate (e.g., when the user pressed the Enter key, you may do something
like
| |
| forTableColumn | back to summary |
|---|---|
| public static <S, T> Callback Hides javafx. Creates a ComboBox cell factory for use in
| |
| forTableColumn | back to summary |
|---|---|
| public static <S, T> Callback Hides javafx. Creates a ComboBox cell factory for use in
| |
| forTableColumn | back to summary |
|---|---|
| public static <S, T> Callback Hides javafx. Creates a ComboBox cell factory for use in
| |
| forTableColumn | back to summary |
|---|---|
| public static <S, T> Callback Hides javafx. Creates a ComboBox cell factory for use in
| |
| updateListeners | back to summary |
|---|---|
| private void updateListeners(boolean editable) | |