- java.lang.Object
- 
- javafx.scene.control.TableColumnBase<S,T>
- 
- javafx.scene.control.TableColumn<S,T>
 
 
- 
- Type Parameters:
- S- The type of the TableView generic type (i.e. S == TableView<S>)
- T- The type of the content in all cells in this TableColumn.
 - All Implemented Interfaces:
- Styleable,- EventTarget
 
 public class TableColumn<S,T> extends TableColumnBase<S,T> implements EventTarget ATableViewis made up of a number of TableColumn instances. Each TableColumn in a table is responsible for displaying (and editing) the contents of that column. As well as being responsible for displaying and editing data for a single column, a TableColumn also contains the necessary properties to:- Be resized (using minWidth/prefWidth/maxWidthandwidthproperties)
- Have its visibilitytoggled
- Display header text
- Display any nested columnsit may contain
- Have a context menuwhen the user right-clicks the column header area
- Have the contents of the table be sorted (using
      comparator,sortableandsortType)
 text(what to show in the column header area), and the columncell value factory(which is used to populate individual cells in the column). This can be achieved using some variation on the following code:
 This approach assumes that the object returned fromObservableList<Person> data = ... TableView<Person> tableView = new TableView<Person>(data); TableColumn<Person,String> firstNameCol = new TableColumn<Person,String>("First Name"); firstNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<Person, String> p) { // p.getValue() returns the Person instance for a particular TableView row return p.getValue().firstNameProperty(); } });tableView.getColumns().add(firstNameCol);}p.getValue()has a JavaFXObservableValuethat can simply be returned. The benefit of this is that the TableView will internally create bindings to ensure that, should the returnedObservableValuechange, the cell contents will be automatically refreshed.In situations where a TableColumn must interact with classes created before JavaFX, or that generally do not wish to use JavaFX apis for properties, it is possible to wrap the returned value in a ReadOnlyObjectWrapperinstance. For example:
 It is hoped that over time there will be convenience cell value factories developed and made available to developers. As of the JavaFX 2.0 release, there is one such convenience class:firstNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<Person, String> p) { return new ReadOnlyObjectWrapper(p.getValue().getFirstName()); } });PropertyValueFactory. This class removes the need to write the code above, instead relying on reflection to look up a given property from a String. Refer to thePropertyValueFactoryclass documentation for more information on how to use this with a TableColumn. Finally, for more detail on how to use TableColumn, there is further documentation in theTableViewclass documentation.- Since:
- JavaFX 2.0
- See Also:
- TableView,- TableCell,- TablePosition
 
- 
- 
Property SummaryProperties Type Property Description ObjectProperty<Callback<TableColumn<S,T>,TableCell<S,T>>>cellFactoryThe cell factory for all cells in this column.ObjectProperty<Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>>>cellValueFactoryThe cell value factory needs to be set to specify how to populate all cells within a single TableColumn.ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>>onEditCancelThis event handler will be fired when the user cancels editing a cell.ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>>onEditCommitThis event handler will be fired when the user successfully commits their editing.ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>>onEditStartThis event handler will be fired when the user successfully initiates editing.ObjectProperty<TableColumn.SortType>sortTypeUsed to state whether this column, if it is part of a sort order (seeTableView.getSortOrder()for more details), should be sorted in ascending or descending order.ReadOnlyObjectProperty<TableView<S>>tableViewThe TableView that this TableColumn belongs to.- 
Properties inherited from class javafx.scene.control.TableColumnBasecomparator, contextMenu, editable, graphic, id, maxWidth, minWidth, parentColumn, prefWidth, reorderable, resizable, sortable, sortNode, style, text, visible, width
 
- 
 - 
Nested Class SummaryNested Classes Modifier and Type Class Description static classTableColumn.CellDataFeatures<S,T>A support class used in TableColumn as a wrapper class to provide all necessary information for a particularCell.static classTableColumn.CellEditEvent<S,T>An event that is fired when a user performs an edit on a table cell.static classTableColumn.SortTypeEnumeration that specifies the type of sorting being applied to a specific column.
 - 
Field SummaryFields Modifier and Type Field Description static Callback<TableColumn<?,?>,TableCell<?,?>>DEFAULT_CELL_FACTORYIf no cellFactory is specified on a TableColumn instance, then this one will be used by default.- 
Fields inherited from class javafx.scene.control.TableColumnBaseDEFAULT_COMPARATOR
 
- 
 - 
Constructor SummaryConstructors Constructor Description TableColumn()Creates a default TableColumn with default cell factory, comparator, and onEditCommit implementation.TableColumn(String text)Creates a TableColumn with the text set to the provided string, with default cell factory, comparator, and onEditCommit implementation.
 - 
Method SummaryModifier and Type Method Description ObjectProperty<Callback<TableColumn<S,T>,TableCell<S,T>>>cellFactoryProperty()The cell factory for all cells in this column.ObjectProperty<Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>>>cellValueFactoryProperty()The cell value factory needs to be set to specify how to populate all cells within a single TableColumn.static <S,T>
 EventType<TableColumn.CellEditEvent<S,T>>editAnyEvent()Parent event for any TableColumn edit event.static <S,T>
 EventType<TableColumn.CellEditEvent<S,T>>editCancelEvent()Indicates that the editing has been canceled, meaning that no change should be made to the backing data source.static <S,T>
 EventType<TableColumn.CellEditEvent<S,T>>editCommitEvent()Indicates that the editing has been committed by the user, meaning that a change should be made to the backing data source to reflect the new data.static <S,T>
 EventType<TableColumn.CellEditEvent<S,T>>editStartEvent()Indicates that the user has performed some interaction to start an edit event, or alternatively theTableView.edit(int, javafx.scene.control.TableColumn)method has been called.Callback<TableColumn<S,T>,TableCell<S,T>>getCellFactory()Gets the value of the property cellFactory.ObservableValue<T>getCellObservableValue(int index)Attempts to return an ObservableValue<T> for the item in the given index (which is of type S).ObservableValue<T>getCellObservableValue(S item)Attempts to return an ObservableValue<T> for the given item (which is of type S).Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>>getCellValueFactory()Gets the value of the property cellValueFactory.static List<CssMetaData<? extends Styleable,?>>getClassCssMetaData()ObservableList<TableColumn<S,?>>getColumns()This enables support for nested columns, which can be useful to group together related data.List<CssMetaData<? extends Styleable,?>>getCssMetaData()The CssMetaData of this Styleable.EventHandler<TableColumn.CellEditEvent<S,T>>getOnEditCancel()Gets the value of the property onEditCancel.EventHandler<TableColumn.CellEditEvent<S,T>>getOnEditCommit()Gets the value of the property onEditCommit.EventHandler<TableColumn.CellEditEvent<S,T>>getOnEditStart()Gets the value of the property onEditStart.TableColumn.SortTypegetSortType()Gets the value of the property sortType.NodegetStyleableNode()Returns the Node that represents this Styleable object.StyleablegetStyleableParent()Return the parent of this Styleable, or null if there is no parent.TableView<S>getTableView()Gets the value of the property tableView.StringgetTypeSelector()The type of thisStyleablethat is to be used in selector matching.ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>>onEditCancelProperty()This event handler will be fired when the user cancels editing a cell.ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>>onEditCommitProperty()This event handler will be fired when the user successfully commits their editing.ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>>onEditStartProperty()This event handler will be fired when the user successfully initiates editing.voidsetCellFactory(Callback<TableColumn<S,T>,TableCell<S,T>> value)Sets the value of the property cellFactory.voidsetCellValueFactory(Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>> value)Sets the value of the property cellValueFactory.voidsetOnEditCancel(EventHandler<TableColumn.CellEditEvent<S,T>> value)Sets the value of the property onEditCancel.voidsetOnEditCommit(EventHandler<TableColumn.CellEditEvent<S,T>> value)Sets the value of the property onEditCommit.voidsetOnEditStart(EventHandler<TableColumn.CellEditEvent<S,T>> value)Sets the value of the property onEditStart.voidsetSortType(TableColumn.SortType value)Sets the value of the property sortType.ObjectProperty<TableColumn.SortType>sortTypeProperty()Used to state whether this column, if it is part of a sort order (seeTableView.getSortOrder()for more details), should be sorted in ascending or descending order.ReadOnlyObjectProperty<TableView<S>>tableViewProperty()The TableView that this TableColumn belongs to.- 
Methods inherited from class javafx.scene.control.TableColumnBaseaddEventHandler, buildEventDispatchChain, comparatorProperty, contextMenuProperty, editableProperty, getCellData, getCellData, getComparator, getContextMenu, getGraphic, getId, getMaxWidth, getMinWidth, getParentColumn, getPrefWidth, getProperties, getPseudoClassStates, getSortNode, getStyle, getStyleClass, getText, getUserData, getWidth, graphicProperty, hasProperties, idProperty, isEditable, isReorderable, isResizable, isSortable, isVisible, maxWidthProperty, minWidthProperty, parentColumnProperty, prefWidthProperty, removeEventHandler, reorderableProperty, resizableProperty, setComparator, setContextMenu, setEditable, setGraphic, setId, setMaxWidth, setMinWidth, setPrefWidth, setReorderable, setResizable, setSortable, setSortNode, setStyle, setText, setUserData, setVisible, sortableProperty, sortNodeProperty, styleProperty, textProperty, visibleProperty, widthProperty
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javafx.event.EventTargetbuildEventDispatchChain
 
- 
 
- 
- 
- 
Property Detail- 
tableViewpublic final ReadOnlyObjectProperty<TableView<S>> tableViewProperty The TableView that this TableColumn belongs to.- See Also:
- getTableView()
 
 - 
cellValueFactorypublic final ObjectProperty<Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>>> cellValueFactoryProperty The cell value factory needs to be set to specify how to populate all cells within a single TableColumn. A cell value factory is aCallbackthat provides aTableColumn.CellDataFeaturesinstance, and expects anObservableValueto be returned. The returned ObservableValue instance will be observed internally to allow for immediate updates to the value to be reflected on screen. An example of how to set a cell value factory is:
 A common approach is to want to populate cells in a TableColumn using a single value from a Java bean. To support this common scenario, there is thelastNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<Person, String> p) { // p.getValue() returns the Person instance for a particular TableView row return p.getValue().lastNameProperty(); } }); }PropertyValueFactoryclass. Refer to this class for more information on how to use it, but briefly here is how the above use case could be simplified using the PropertyValueFactory class:lastNameCol.setCellValueFactory(new PropertyValueFactory<Person,String>("lastName"));
 - 
cellFactorypublic final ObjectProperty<Callback<TableColumn<S,T>,TableCell<S,T>>> cellFactoryProperty The cell factory for all cells in this column. The cell factory is responsible for rendering the data contained within each TableCell for a single table column.By default TableColumn uses the default cell factory, but this can be replaced with a custom implementation, for example to show data in a different way or to support editing.There is a lot of documentation on creating custom cell factories elsewhere (seeCellandTableViewfor example).Finally, there are a number of pre-built cell factories available in the javafx.scene.control.cellpackage.- See Also:
- getCellFactory(),- setCellFactory(Callback)
 
 - 
sortTypepublic final ObjectProperty<TableColumn.SortType> sortTypeProperty Used to state whether this column, if it is part of a sort order (seeTableView.getSortOrder()for more details), should be sorted in ascending or descending order. Simply toggling this property will result in the sort order changing in the TableView, assuming of course that this column is in the sortOrder ObservableList to begin with.- See Also:
- getSortType(),- setSortType(TableColumn.SortType)
 
 - 
onEditStartpublic final ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>> onEditStartProperty This event handler will be fired when the user successfully initiates editing.- See Also:
- getOnEditStart(),- setOnEditStart(EventHandler)
 
 - 
onEditCommitpublic final ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>> onEditCommitProperty This event handler will be fired when the user successfully commits their editing.- See Also:
- getOnEditCommit(),- setOnEditCommit(EventHandler)
 
 - 
onEditCancelpublic final ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>> onEditCancelProperty This event handler will be fired when the user cancels editing a cell.- See Also:
- getOnEditCancel(),- setOnEditCancel(EventHandler)
 
 
- 
 - 
Field Detail- 
DEFAULT_CELL_FACTORYpublic static final Callback<TableColumn<?,?>,TableCell<?,?>> DEFAULT_CELL_FACTORY If no cellFactory is specified on a TableColumn instance, then this one will be used by default. At present it simply renders the TableCell item property within thegraphicproperty if theitemis a Node, or it simply callstoString()if it is not null, setting the resulting string inside thetextproperty.
 
- 
 - 
Constructor Detail- 
TableColumnpublic TableColumn() Creates a default TableColumn with default cell factory, comparator, and onEditCommit implementation.
 - 
TableColumnpublic TableColumn(String text) Creates a TableColumn with the text set to the provided string, with default cell factory, comparator, and onEditCommit implementation.- Parameters:
- text- The string to show when the TableColumn is placed within the TableView.
 
 
- 
 - 
Method Detail- 
editAnyEventpublic static <S,T> EventType<TableColumn.CellEditEvent<S,T>> editAnyEvent() Parent event for any TableColumn edit event.- Type Parameters:
- S- The type of the TableView generic type
- T- The type of the content in all cells in this TableColumn
- Returns:
- The any TableColumn edit event
 
 - 
editStartEventpublic static <S,T> EventType<TableColumn.CellEditEvent<S,T>> editStartEvent() Indicates that the user has performed some interaction to start an edit event, or alternatively theTableView.edit(int, javafx.scene.control.TableColumn)method has been called.- Type Parameters:
- S- The type of the TableView generic type
- T- The type of the content in all cells in this TableColumn
- Returns:
- The start an edit event
 
 - 
editCancelEventpublic static <S,T> EventType<TableColumn.CellEditEvent<S,T>> editCancelEvent() Indicates that the editing has been canceled, meaning that no change should be made to the backing data source.- Type Parameters:
- S- The type of the TableView generic type
- T- The type of the content in all cells in this TableColumn
- Returns:
- The cancel an edit event
 
 - 
editCommitEventpublic static <S,T> EventType<TableColumn.CellEditEvent<S,T>> editCommitEvent() Indicates that the editing has been committed by the user, meaning that a change should be made to the backing data source to reflect the new data.- Type Parameters:
- S- The type of the TableView generic type
- T- The type of the content in all cells in this TableColumn
- Returns:
- The commit an edit event
 
 - 
tableViewPropertypublic final ReadOnlyObjectProperty<TableView<S>> tableViewProperty() The TableView that this TableColumn belongs to.- See Also:
- getTableView()
 
 - 
getTableViewpublic final TableView<S> getTableView() Gets the value of the property tableView.- Property description:
- The TableView that this TableColumn belongs to.
 
 - 
setCellValueFactorypublic final void setCellValueFactory(Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>> value) Sets the value of the property cellValueFactory.- Property description:
- The cell value factory needs to be set to specify how to populate all
 cells within a single TableColumn. A cell value factory is a Callbackthat provides aTableColumn.CellDataFeaturesinstance, and expects anObservableValueto be returned. The returned ObservableValue instance will be observed internally to allow for immediate updates to the value to be reflected on screen. An example of how to set a cell value factory is:
 A common approach is to want to populate cells in a TableColumn using a single value from a Java bean. To support this common scenario, there is thelastNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<Person, String> p) { // p.getValue() returns the Person instance for a particular TableView row return p.getValue().lastNameProperty(); } }); }PropertyValueFactoryclass. Refer to this class for more information on how to use it, but briefly here is how the above use case could be simplified using the PropertyValueFactory class:lastNameCol.setCellValueFactory(new PropertyValueFactory<Person,String>("lastName"));
 
 - 
getCellValueFactorypublic final Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>> getCellValueFactory() Gets the value of the property cellValueFactory.- Property description:
- The cell value factory needs to be set to specify how to populate all
 cells within a single TableColumn. A cell value factory is a Callbackthat provides aTableColumn.CellDataFeaturesinstance, and expects anObservableValueto be returned. The returned ObservableValue instance will be observed internally to allow for immediate updates to the value to be reflected on screen. An example of how to set a cell value factory is:
 A common approach is to want to populate cells in a TableColumn using a single value from a Java bean. To support this common scenario, there is thelastNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<Person, String> p) { // p.getValue() returns the Person instance for a particular TableView row return p.getValue().lastNameProperty(); } }); }PropertyValueFactoryclass. Refer to this class for more information on how to use it, but briefly here is how the above use case could be simplified using the PropertyValueFactory class:lastNameCol.setCellValueFactory(new PropertyValueFactory<Person,String>("lastName"));
 
 - 
cellValueFactoryPropertypublic final ObjectProperty<Callback<TableColumn.CellDataFeatures<S,T>,ObservableValue<T>>> cellValueFactoryProperty() The cell value factory needs to be set to specify how to populate all cells within a single TableColumn. A cell value factory is aCallbackthat provides aTableColumn.CellDataFeaturesinstance, and expects anObservableValueto be returned. The returned ObservableValue instance will be observed internally to allow for immediate updates to the value to be reflected on screen. An example of how to set a cell value factory is:
 A common approach is to want to populate cells in a TableColumn using a single value from a Java bean. To support this common scenario, there is thelastNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<Person, String> p) { // p.getValue() returns the Person instance for a particular TableView row return p.getValue().lastNameProperty(); } }); }PropertyValueFactoryclass. Refer to this class for more information on how to use it, but briefly here is how the above use case could be simplified using the PropertyValueFactory class:lastNameCol.setCellValueFactory(new PropertyValueFactory<Person,String>("lastName"));
 - 
setCellFactorypublic final void setCellFactory(Callback<TableColumn<S,T>,TableCell<S,T>> value) Sets the value of the property cellFactory.- Property description:
- The cell factory for all cells in this column. The cell factory
 is responsible for rendering the data contained within each TableCell for
 a single table column.
 By default TableColumn uses the default cell factory, but this can be replaced with a custom implementation, for example to show data in a different way or to support editing.There is a lot of documentation on creating custom cell factories elsewhere (seeCellandTableViewfor example).Finally, there are a number of pre-built cell factories available in the javafx.scene.control.cellpackage.
 
 - 
getCellFactorypublic final Callback<TableColumn<S,T>,TableCell<S,T>> getCellFactory() Gets the value of the property cellFactory.- Property description:
- The cell factory for all cells in this column. The cell factory
 is responsible for rendering the data contained within each TableCell for
 a single table column.
 By default TableColumn uses the default cell factory, but this can be replaced with a custom implementation, for example to show data in a different way or to support editing.There is a lot of documentation on creating custom cell factories elsewhere (seeCellandTableViewfor example).Finally, there are a number of pre-built cell factories available in the javafx.scene.control.cellpackage.
 
 - 
cellFactoryPropertypublic final ObjectProperty<Callback<TableColumn<S,T>,TableCell<S,T>>> cellFactoryProperty() The cell factory for all cells in this column. The cell factory is responsible for rendering the data contained within each TableCell for a single table column.By default TableColumn uses the default cell factory, but this can be replaced with a custom implementation, for example to show data in a different way or to support editing.There is a lot of documentation on creating custom cell factories elsewhere (seeCellandTableViewfor example).Finally, there are a number of pre-built cell factories available in the javafx.scene.control.cellpackage.- See Also:
- getCellFactory(),- setCellFactory(Callback)
 
 - 
sortTypePropertypublic final ObjectProperty<TableColumn.SortType> sortTypeProperty() Used to state whether this column, if it is part of a sort order (seeTableView.getSortOrder()for more details), should be sorted in ascending or descending order. Simply toggling this property will result in the sort order changing in the TableView, assuming of course that this column is in the sortOrder ObservableList to begin with.- See Also:
- getSortType(),- setSortType(TableColumn.SortType)
 
 - 
setSortTypepublic final void setSortType(TableColumn.SortType value) Sets the value of the property sortType.- Property description:
- Used to state whether this column, if it is part of a sort order (see
 TableView.getSortOrder()for more details), should be sorted in ascending or descending order. Simply toggling this property will result in the sort order changing in the TableView, assuming of course that this column is in the sortOrder ObservableList to begin with.
 
 - 
getSortTypepublic final TableColumn.SortType getSortType() Gets the value of the property sortType.- Property description:
- Used to state whether this column, if it is part of a sort order (see
 TableView.getSortOrder()for more details), should be sorted in ascending or descending order. Simply toggling this property will result in the sort order changing in the TableView, assuming of course that this column is in the sortOrder ObservableList to begin with.
 
 - 
setOnEditStartpublic final void setOnEditStart(EventHandler<TableColumn.CellEditEvent<S,T>> value) Sets the value of the property onEditStart.- Property description:
- This event handler will be fired when the user successfully initiates editing.
 
 - 
getOnEditStartpublic final EventHandler<TableColumn.CellEditEvent<S,T>> getOnEditStart() Gets the value of the property onEditStart.- Property description:
- This event handler will be fired when the user successfully initiates editing.
 
 - 
onEditStartPropertypublic final ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>> onEditStartProperty() This event handler will be fired when the user successfully initiates editing.- See Also:
- getOnEditStart(),- setOnEditStart(EventHandler)
 
 - 
setOnEditCommitpublic final void setOnEditCommit(EventHandler<TableColumn.CellEditEvent<S,T>> value) Sets the value of the property onEditCommit.- Property description:
- This event handler will be fired when the user successfully commits their editing.
 
 - 
getOnEditCommitpublic final EventHandler<TableColumn.CellEditEvent<S,T>> getOnEditCommit() Gets the value of the property onEditCommit.- Property description:
- This event handler will be fired when the user successfully commits their editing.
 
 - 
onEditCommitPropertypublic final ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>> onEditCommitProperty() This event handler will be fired when the user successfully commits their editing.- See Also:
- getOnEditCommit(),- setOnEditCommit(EventHandler)
 
 - 
setOnEditCancelpublic final void setOnEditCancel(EventHandler<TableColumn.CellEditEvent<S,T>> value) Sets the value of the property onEditCancel.- Property description:
- This event handler will be fired when the user cancels editing a cell.
 
 - 
getOnEditCancelpublic final EventHandler<TableColumn.CellEditEvent<S,T>> getOnEditCancel() Gets the value of the property onEditCancel.- Property description:
- This event handler will be fired when the user cancels editing a cell.
 
 - 
onEditCancelPropertypublic final ObjectProperty<EventHandler<TableColumn.CellEditEvent<S,T>>> onEditCancelProperty() This event handler will be fired when the user cancels editing a cell.- See Also:
- getOnEditCancel(),- setOnEditCancel(EventHandler)
 
 - 
getColumnspublic final ObservableList<TableColumn<S,?>> getColumns() This enables support for nested columns, which can be useful to group together related data. For example, we may have a 'Name' column with two nested columns for 'First' and 'Last' names.This has no impact on the table as such - all column indices point to the leaf columns only, and it isn't possible to sort using the parent column, just the leaf columns. In other words, this is purely a visual feature. - Specified by:
- getColumnsin class- TableColumnBase<S,T>
- Returns:
- An ObservableList containing TableColumnBase instances (or subclasses) that are the children of this TableColumnBase. If these children TableColumnBase instances are set as visible, they will appear beneath this table column.
 
 - 
getCellObservableValuepublic final ObservableValue<T> getCellObservableValue(int index) Attempts to return an ObservableValue<T> for the item in the given index (which is of type S). In other words, this method expects to receive an integer value that is greater than or equal to zero, and less than the size of the underlying data model. If the index is valid, this method will return an ObservableValue<T> for this specific column.This is achieved by calling the cell value factory, and returning whatever it returns when passed aCellDataFeatures(see, for example, the CellDataFeatures classes belonging toTableColumnandTreeTableColumnfor more information).- Specified by:
- getCellObservableValuein class- TableColumnBase<S,T>
- Parameters:
- index- The index of the item (of type S) for which an ObservableValue<T> is sought.
- Returns:
- An ObservableValue<T> for this specific table column.
 
 - 
getCellObservableValuepublic final ObservableValue<T> getCellObservableValue(S item) Attempts to return an ObservableValue<T> for the given item (which is of type S). In other words, this method expects to receive an object from the underlying data model for the entire 'row' in the table, and it must return an ObservableValue<T> for the value in this specific column.This is achieved by calling the cell value factory, and returning whatever it returns when passed aCellDataFeatures(see, for example, the CellDataFeatures classes belonging toTableColumnandTreeTableColumnfor more information).- Specified by:
- getCellObservableValuein class- TableColumnBase<S,T>
- Parameters:
- item- The item (of type S) for which an ObservableValue<T> is sought.
- Returns:
- An ObservableValue<T> for this specific table column.
 
 - 
getTypeSelectorpublic String getTypeSelector() The type of thisStyleablethat is to be used in selector matching. This is analogous to an "element" in HTML. (CSS Type Selector).- Specified by:
- getTypeSelectorin interface- Styleable
- Returns:
- "TableColumn"
- Since:
- JavaFX 8.0
 
 - 
getStyleableParentpublic Styleable getStyleableParent() Return the parent of this Styleable, or null if there is no parent.- Specified by:
- getStyleableParentin interface- Styleable
- Returns:
- getTableView()
- Since:
- JavaFX 8.0
 
 - 
getCssMetaDatapublic List<CssMetaData<? extends Styleable,?>> getCssMetaData() The CssMetaData of this Styleable. This may be returned as an unmodifiable list.- Specified by:
- getCssMetaDatain interface- Styleable
- Returns:
- the CssMetaData
- Since:
- JavaFX 8.0
 
 - 
getClassCssMetaDatapublic static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData() - Returns:
- The CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
- Since:
- JavaFX 8.0
 
 - 
getStyleableNodepublic Node getStyleableNode() Returns the Node that represents this Styleable object. This method should be overridden in cases where the Styleable is not itself a Node, so that it may optionally return the relevant root node representation of itself. By default this method returns null, which can mean that either the Styleable itself is a Node, or if that is not the case, that the Styleable does not have a node representation available at the time of request.- Specified by:
- getStyleableNodein interface- Styleable
- Returns:
- the Node that represents this Styleable object
 
 
- 
 
-