Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TableColumnBase

[18:7] extends: FxObj

TableColumnBase wraps javafx.scene.control.TableColumnBase, the shared base of every table column type. It holds the configuration common to both TableColumn (for TableView) and TreeTableColumn (for TreeTableView): the header text, sortability, sizing, visibility, editability, graphic, and style. This class is not created directly. Instantiate a TableColumn (or, for a tree table, a TreeTableColumn) instead; both inherit everything here.

Methods

  • setText (Text)

    Sets the column header text. Pass null for a graphic-only header.

    • @p Text is the header string, or null.
    • @r this object for chaining.
  • getText ()

    Returns the column header text.

    • @r The header string, or null.
  • textProperty ()

    Returns the text StringProperty for binding.

    • @r An AJO around the StringProperty.
  • setSortable (bool Value)

    Sets whether the column can be sorted by the user.

    • @p Value is true to allow sorting.
    • @r this object for chaining.
  • isSortable ()

    Returns whether the column can be sorted.

    • @r A bool, true when sortable.
  • sortableProperty ()

    Returns the sortable BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • setComparator (callback Cmp)

    Sets the comparator used to order values in this column.

    • @p Cmp is a callback receiving two cell values and returning a negative, zero, or positive int like a Java Comparator.
    • @r this object for chaining.
  • getComparator ()

    Returns the comparator used to order this column.

    • @r An AJO around the Comparator.
  • comparatorProperty ()

    Returns the comparator ObjectProperty for binding.

    • @r An AJO around the ObjectProperty.
  • setSortNode (Node)

    Sets the node shown in the header to indicate sort order.

    • @p Node is a Node wrapper or AJO.
    • @r this object for chaining.
  • getSortNode ()

    Returns the header sort-indicator node.

    • @r An AJO around the Node, or null.
  • sortNodeProperty ()

    Returns the sortNode ObjectProperty for binding.

    • @r An AJO around the ObjectProperty.
  • setMinWidth (double Width)

    Sets the minimum column width in pixels.

    • @p Width is the minimum width.
    • @r this object for chaining.
  • getMinWidth ()

    Returns the minimum column width.

    • @r A double with the minimum width.
  • setMaxWidth (double Width)

    Sets the maximum column width in pixels.

    • @p Width is the maximum width.
    • @r this object for chaining.
  • getMaxWidth ()

    Returns the maximum column width.

    • @r A double with the maximum width.
  • setPrefWidth (double Width)

    Sets the preferred column width in pixels.

    • @p Width is the preferred width.
    • @r this object for chaining.
  • getPrefWidth ()

    Returns the preferred column width.

    • @r A double with the preferred width.
  • getWidth ()

    Returns the current rendered column width.

    • @r A double with the width.
  • widthProperty ()

    Returns the read-only width property for binding.

    • @r An AJO around the ReadOnlyDoubleProperty.
  • setResizable (bool Value)

    Sets whether the user can resize the column.

    • @p Value is true to allow resizing.
    • @r this object for chaining.
  • isResizable ()

    Returns whether the column is resizable.

    • @r A bool, true when resizable.
  • resizableProperty ()

    Returns the resizable BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • setVisible (bool Value)

    Sets whether the column is visible.

    • @p Value is true to show the column.
    • @r this object for chaining.
  • isVisible ()

    Returns whether the column is visible.

    • @r A bool, true when visible.
  • visibleProperty ()

    Returns the visible BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • setReorderable (bool Value)

    Sets whether the user can drag the column to a new position.

    • @p Value is true to allow reordering.
    • @r this object for chaining.
  • isReorderable ()

    Returns whether the column can be reordered.

    • @r A bool, true when reorderable.
  • reorderableProperty ()

    Returns the reorderable BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • setEditable (bool Value)

    Sets whether cells in the column can be edited.

    • @p Value is true to allow editing.
    • @r this object for chaining.
  • isEditable ()

    Returns whether cells in the column can be edited.

    • @r A bool, true when editable.
  • editableProperty ()

    Returns the editable BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • setGraphic (Node)

    Sets the graphic node shown in the column header.

    • @p Node is a Node wrapper or AJO.
    • @r this object for chaining.
  • getGraphic ()

    Returns the column header graphic node.

    • @r An AJO around the Node, or null.
  • graphicProperty ()

    Returns the graphic ObjectProperty for binding.

    • @r An AJO around the ObjectProperty.
  • setContextMenu (Menu)

    Sets the context menu shown when the header is right-clicked.

    • @p Menu is a ContextMenu wrapper or AJO.
    • @r this object for chaining.
  • getContextMenu ()

    Returns the header context menu.

    • @r An AJO around the ContextMenu, or null.
  • contextMenuProperty ()

    Returns the contextMenu ObjectProperty for binding.

    • @r An AJO around the ObjectProperty.
  • setId (string Id)

    Sets the CSS id of the column.

    • @p Id is the id string.
    • @r this object for chaining.
  • getId ()

    Returns the CSS id of the column.

    • @r The id string, or null.
  • idProperty ()

    Returns the id StringProperty for binding.

    • @r An AJO around the StringProperty.
  • setStyle (string Style)

    Sets an inline CSS style string on the column.

    • @p Style is the CSS style string.
    • @r this object for chaining.
  • getStyle ()

    Returns the inline CSS style string.

    • @r The style string.
  • styleProperty ()

    Returns the style StringProperty for binding.

    • @r An AJO around the StringProperty.
  • setUserData (Value)

    Stores an arbitrary value against the column.

    • @p Value is the value to store.
    • @r this object for chaining.
  • getUserData ()

    Returns the stored user data value.

    • @r The stored value, or null.
  • getColumns ()

    Returns the nested child columns of this column.

    • @r A list of child-column AJOs (empty when there are none).
  • getParentColumn ()

    Returns the parent column when this column is nested, else null.

    • @r An AJO around the parent TableColumnBase, or null.
  • parentColumnProperty ()

    Returns the parentColumn ReadOnlyObjectProperty for binding.

    • @r An AJO around the ReadOnlyObjectProperty.
  • getCellData (int Index)

    Returns the value shown in this column for the row at the given index.

    • @p Index is the row index.
    • @r The cell value.
  • getCellObservableValue (int Index)

    Returns the ObservableValue backing this column for the row at the given index.

    • @p Index is the row index.
    • @r An AJO around the ObservableValue.
  • addEventHandler (EventType, callback Handler)

    Registers an event handler for the given event type on this column.

    • @p EventType is an AJO around the javafx EventType to listen for.
    • @p Handler is a callback receiving the event.
    • @r this object for chaining.
  • removeEventHandler (EventType, Handler)

    Removes a previously registered event handler.

    • @p EventType is an AJO around the javafx EventType.
    • @p Handler is the AJO handler returned when it was added.
    • @r this object for chaining.