• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JFXTreeTableView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jfoenix.controls.JFXTreeTableView的典型用法代码示例。如果您正苦于以下问题:Java JFXTreeTableView类的具体用法?Java JFXTreeTableView怎么用?Java JFXTreeTableView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JFXTreeTableView类属于com.jfoenix.controls包,在下文中一共展示了JFXTreeTableView类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setupGroupView

import com.jfoenix.controls.JFXTreeTableView; //导入依赖的package包/类
private void setupGroupView() {
	groupList = new JFXTreeTableView<>();

	TreeTableColumn<GroupTreeObject, String> nameColumn = new JFXTreeTableColumn<>("Name");
	nameColumn.setPrefWidth(150);
	nameColumn.setCellValueFactory((TreeTableColumn.CellDataFeatures<GroupTreeObject, String> param) -> {
		Group group = fromItem(param.getValue());
		if (group == null) {
			return new SimpleStringProperty();
		}
		return new SimpleStringProperty(group.getDisplayName());
	});
	groupList.getColumns().add(nameColumn);
	TreeItem treeItem = new TreeItem<>();
	treeItem.setExpanded(true);
	groupList.setRoot(treeItem);
	groupList.setShowRoot(false);
	groupList.setPrefHeight(Short.MAX_VALUE);
}
 
开发者ID:MakerTim,项目名称:LuckPermsUI,代码行数:20,代码来源:GroupListManager.java


示例2: fillTable

import com.jfoenix.controls.JFXTreeTableView; //导入依赖的package包/类
/**
 * 
 * @param index
 * @param student 
 * This methos will fill the data with studnes information
 */
public void fillTable(int index, ObservableList<Student> student) {

    TreeItem<Student> root = new RecursiveTreeItem<Student>(student, RecursiveTreeObject::getChildren);
    JFXTreeTableView<Student> table = new JFXTreeTableView<>();
    table.getColumns().setAll(studentUOB, studentName, emailAddress, studentYear, personalContact, dept);
    table.setRoot(root);
    table.setShowRoot(false);

    Label groupNumber = new Label("Group Number:  " + (index + 1));
    groupNumber.setFont(Font.font("Verdana", FontWeight.BOLD, 15));
    Label teacherName = new Label("Personal Accadeic Tutor Name: " + teachersInformation.get(index).split(",")[1]);
    teacherName.setFont(Font.font("Verdana", FontWeight.BOLD, 15));
    VBox vbox = new VBox();
    vbox.getChildren().addAll(groupNumber, teacherName, table);
    vbox.setSpacing(10);
    vBox.getChildren().addAll(groupNumber, teacherName, vbox);

}
 
开发者ID:badarshahzad,项目名称:SEGP_Group10,代码行数:25,代码来源:AllocatedPATsController.java


示例3: addSearchField

import com.jfoenix.controls.JFXTreeTableView; //导入依赖的package包/类
public void addSearchField(JFXTextField searchTextField, JFXTreeTableView treeTable) {

        searchTextField.textProperty().addListener(new ChangeListener<String>() {
            @Override
            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {

                treeTable.setPredicate(new Predicate<TreeItem<Student>>() {

                    @Override
                    public boolean test(TreeItem<Student> student) {

                        Boolean flag = student.getValue().studentUOB.getValue().contains(newValue)
                                || student.getValue().studentName.getValue().contains(newValue)
                                || student.getValue().studentYear.getValue().contains(newValue)
                                || student.getValue().dept.getValue().contains(newValue)
                                || student.getValue().allocatedPAT.getValue().contains(newValue)
                                || student.getValue().emailAddress.getValue().contains(newValue);
                        return flag;
                    }
                });
            }
        });

    }
 
开发者ID:badarshahzad,项目名称:SEGP_Group10,代码行数:25,代码来源:Studentsinformation.java


示例4: setupSearchField

import com.jfoenix.controls.JFXTreeTableView; //导入依赖的package包/类
private ChangeListener<String> setupSearchField(final JFXTreeTableView<FXHost> tableView) {
    return (o, oldVal, newVal) ->
            tableView.setPredicate(hostProp -> {
                final FXHost host = hostProp.getValue();
                return host.ipAddress.get().contains(newVal)
                        || host.domainName.get().contains(newVal);
            });
}
 
开发者ID:b3log,项目名称:JHosts,代码行数:9,代码来源:HostController.java


示例5: setStudentsData

import com.jfoenix.controls.JFXTreeTableView; //导入依赖的package包/类
public void setStudentsData() {

        JFXTextField searchTextField = new JFXTextField();
        if (!searchBox.getChildren().isEmpty()) {
            searchBox.getChildren().clear();
        }
        searchTextField.setPromptText("Search");
        searchTextField.setMinWidth(300);
        searchBox.getChildren().add(searchTextField);

        JFXTreeTableView treeTable = new JFXTreeTableView();
        treeTable.getColumns().setAll(studentUOB, studentName, emailAddress, studentYear, personalContact, dept, allocatedPAT);
        borderPane.setCenter(treeTable);

        studentsData = dataBase.getStudentsData();
        patsInformation = dataBase.getTeachersData();

        whichPDFToGenrate = 15;
        for (int i = 0; i < studentsData.size(); i++) {

            String[] tokens = studentsData.get(i).split(",");
            int id = Integer.parseInt(tokens[6]) - 1;
            String arow;

            if (tokens[3].trim().equalsIgnoreCase("Year-1")) {
                year1Students.add(studentsData.get(i));
            } else if (tokens[3].trim().equalsIgnoreCase("Year-2")) {
                year2Students.add(studentsData.get(i));
            } else if (tokens[3].trim().equalsIgnoreCase("Year-3")) {
                year3Students.add(studentsData.get(i));
            } else if (tokens[3].trim().equalsIgnoreCase("Year-4")) {
                year4Students.add(studentsData.get(i));
            }

            students.add(new Student(tokens[0], tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], patsInformation.get(id).split(",")[1]));
        }

        /**
         * Here need to set the search text field in for the table.
         */
        final TreeItem<Studentsinformation.Student> root = new RecursiveTreeItem<Studentsinformation.Student>(students, RecursiveTreeObject::getChildren);
        treeTable.setRoot(root);
        treeTable.setShowRoot(false);
        addSearchField(searchTextField, treeTable);

    }
 
开发者ID:badarshahzad,项目名称:SEGP_Group10,代码行数:47,代码来源:Studentsinformation.java


示例6: leftLabelPadding

import com.jfoenix.controls.JFXTreeTableView; //导入依赖的package包/类
@Override
protected double leftLabelPadding() {
    double leftPadding = super.leftLabelPadding();
    final double height = getCellSize();
    TreeTableColumn<S, T> tableColumn = getSkinnable().getTableColumn();
    if (tableColumn == null) {
        return leftPadding;
    }
    TreeTableView<S> treeTable = getSkinnable().getTreeTableView();
    if (treeTable == null) {
        return leftPadding;
    }
    int columnIndex = treeTable.getVisibleLeafIndex(tableColumn);

    TreeTableColumn<S, ?> treeColumn = treeTable.getTreeColumn();
    if (!(treeTable instanceof JFXTreeTableView)) {
        if ((treeColumn == null && columnIndex != 0) || (treeColumn != null && !tableColumn.equals(treeColumn))) {
            return leftPadding;
        }
    }

    TreeTableRow<S> treeTableRow = getSkinnable().getTreeTableRow();
    if (treeTableRow == null) {
        return leftPadding;
    }
    TreeItem<S> treeItem = getSkinnable().getTreeTableRow().getTreeItem();
    if (treeItem == null) {
        return leftPadding;
    }

    // getTreeItemLevel ignore the group nodes level
    treeColumn = treeTable.getTreeColumn() == null ? treeTable.getVisibleLeafColumn(0) : treeTable.getTreeColumn();
    if (tableColumn == treeColumn) {
        int nodeLevel = treeTable.getTreeItemLevel(treeItem);
        if (!treeTable.isShowRoot()) {
            nodeLevel--;
        }
        double indentPerLevel = 10;
        if (treeTableRow.getSkin() instanceof JFXTreeTableRowSkin) {
            indentPerLevel = ((JFXTreeTableRowSkin<?>) treeTableRow.getSkin()).getIndentationPerLevel();
        }
        leftPadding += nodeLevel * indentPerLevel;
    }

    if (tableColumn == treeColumn || ((JFXTreeTableColumn<S, T>) tableColumn).isGrouped()) {
        // add in the width of the disclosure node
        if (JFXTreeTableRowSkin.disclosureWidthMap != null && JFXTreeTableRowSkin.disclosureWidthMap.containsKey(
            treeTable)) {
            leftPadding += JFXTreeTableRowSkin.disclosureWidthMap.get(treeTable);
        }
    }
    // adding in the width of the graphic on the tree item
    leftPadding += treeItem.getGraphic() == null ? 0 : treeItem.getGraphic().prefWidth(height);

    return leftPadding;
}
 
开发者ID:jfoenixadmin,项目名称:JFoenix,代码行数:57,代码来源:JFXTreeTableCellSkin.java



注:本文中的com.jfoenix.controls.JFXTreeTableView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IntegrationTest类代码示例发布时间:2022-05-23
下一篇:
Java MySqlOutputVisitor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap