All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dlsc.gemsfx.skins.AdvancedNestedTableColumnHeader Maven / Gradle / Ivy

There is a newer version: 2.67.0
Show newest version
package com.dlsc.gemsfx.skins;

import javafx.scene.control.TableColumnBase;
import javafx.scene.control.skin.NestedTableColumnHeader;
import javafx.scene.control.skin.TableColumnHeader;

public class AdvancedNestedTableColumnHeader extends NestedTableColumnHeader {

    /**
     * Creates a new NestedTableColumnHeader instance to visually represent the given
     * {@link TableColumnBase} instance.
     *
     * @param tc The table column to be visually represented by this instance.
     */
    public AdvancedNestedTableColumnHeader(TableColumnBase tc) {
        super(tc);
    }

    /**
     * Creates a new TableColumnHeader instance for the given TableColumnBase instance. The general pattern for
     * implementing this method is as follows:
     *
     * 
    *
  • If the given TableColumnBase instance is null, has no child columns, or if the given TableColumnBase * instance equals the TableColumnBase instance returned by calling {@link #getTableColumn()}, then it is * suggested to return a {@link TableColumnHeader} instance comprised of the given column.
  • *
  • Otherwise, we can presume that the given TableColumnBase instance has child columns, and in this case * it is suggested to return a {@link NestedTableColumnHeader} instance instead.
  • *
* * Note: In most circumstances this method should not be overridden, but in some circumstances it * makes sense (e.g. testing, or when extreme customization is desired). * * @param col the table column * @return A new TableColumnHeader instance. */ protected TableColumnHeader createTableColumnHeader(TableColumnBase col) { return col == null || col.getColumns().isEmpty() || col == getTableColumn() ? new AdvancedTableColumnHeader(col) : new AdvancedNestedTableColumnHeader(col); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy