Class TableColumnHeader

All Implemented Interfaces:
Styleable, EventTarget
Direct Known Subclasses:
NestedTableColumnHeader

public class TableColumnHeader extends Region
Region responsible for painting a single column header. A subcomponent used by subclasses of TableViewSkinBase.
Since:
9
  • Property Details

  • Constructor Details

    • TableColumnHeader

      public TableColumnHeader(TableColumnBase tc)
      Creates a new TableColumnHeader instance to visually represent the given TableColumnBase instance.
      Parameters:
      tc - The table column to be visually represented by this instance.
  • Method Details

    • getTableColumn

      public final TableColumnBase<?,?> getTableColumn()
      Gets the value of the tableColumn property.
      Property description:
      A property that refers to the TableColumnBase instance that this header is visually represents.
      Returns:
      the value of the tableColumn property
      See Also:
    • tableColumnProperty

      public final ReadOnlyObjectProperty<TableColumnBase<?,?>> tableColumnProperty()
      A property that refers to the TableColumnBase instance that this header is visually represents.
      Returns:
      the tableColumn property
      See Also:
    • getTableHeaderRow

      protected TableHeaderRow getTableHeaderRow()
      Returns the TableHeaderRow associated with this TableColumnHeader.
      Returns:
      the TableHeaderRow associated with this TableColumnHeader
      Since:
      12
    • getTableSkin

      protected TableViewSkinBase<?,?,?,?,?> getTableSkin()
      Returns the TableViewSkinBase in which this TableColumnHeader is inserted. This will return null until the TableHeaderRow has been set.
      Returns:
      the TableViewSkinBase in which this TableColumnHeader is inserted, or null
      Since:
      12
    • resizeColumnToFitContent

      protected void resizeColumnToFitContent(int maxRows)
      Resizes this TableColumnHeader's column to fit the width of its content.
      Implementation Requirements:
      The resulting column width for this implementation is the maximum of the preferred width of the header cell and the preferred width of the first maxRow cells.

      Subclasses can either use this method or override it (without the need to call super()) to provide their custom implementation (such as ones that exclude the header, exclude null content, compute the minimum width, etc.).

      Parameters:
      maxRows - the number of rows considered when resizing. If -1 is given, all rows are considered.
      Since:
      14
    • getClassCssMetaData

      public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
      Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
      Returns:
      the CssMetaData associated with this class, which may include the CssMetaData of its superclasses