com.jfoenix.controls.datamodels.treetable.RecursiveTreeObject Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.jfoenix.controls.datamodels.treetable;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.TreeTableColumn;
/**
* data model that is used in JFXTreeTableView, it's used to implement
* the grouping feature.
*
* Note: the data object used in JFXTreeTableView must extends this class
*
* @param is the concrete object of the Tree table
* @author Shadi Shaheen
* @version 1.0
* @since 2016-03-09
*/
public class RecursiveTreeObject {
/**
* grouped children objects
*/
ObservableList children = FXCollections.observableArrayList();
public ObservableList getChildren() {
return children;
}
public void setChildren(ObservableList children) {
this.children = children;
}
/**
* Whether or not the object is grouped by a specified tree table column
*/
ObjectProperty> groupedColumn = new SimpleObjectProperty<>();
public final ObjectProperty> groupedColumnProperty() {
return this.groupedColumn;
}
public final TreeTableColumn getGroupedColumn() {
return this.groupedColumnProperty().get();
}
public final void setGroupedColumn(final TreeTableColumn groupedColumn) {
this.groupedColumnProperty().set(groupedColumn);
}
/**
* the value that must be shown when grouped
*/
ObjectProperty