本文整理汇总了Java中org.controlsfx.control.CheckTreeView类的典型用法代码示例。如果您正苦于以下问题:Java CheckTreeView类的具体用法?Java CheckTreeView怎么用?Java CheckTreeView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckTreeView类属于org.controlsfx.control包,在下文中一共展示了CheckTreeView类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: FileSelection
import org.controlsfx.control.CheckTreeView; //导入依赖的package包/类
public FileSelection(File parent) {
DialogPane dialogPane = this.getDialogPane();
dialogPane.setMaxWidth(1.7976931348623157E308D);
this.directoryView = new CheckTreeView<>();
this.directoryView.setMaxWidth(1.7976931348623157E308D);
CheckBoxTreeItem<File> root = createTree(new CheckBoxTreeItem<>(parent));
root.setExpanded(true);
directoryView.setRoot(root);
GridPane.setHgrow(this.directoryView, Priority.ALWAYS);
GridPane.setFillWidth(this.directoryView, true);
this.grid = new GridPane();
this.grid.setHgap(10.0D);
this.grid.setMaxWidth(1.7976931348623157E308D);
this.grid.setAlignment(Pos.CENTER_LEFT);
dialogPane.contentTextProperty().addListener((o) -> this.updateGrid());
this.setTitle(ControlResources.getString("Dialog.confirm.title"));
dialogPane.setHeaderText(ControlResources.getString("Dialog.confirm.header"));
dialogPane.getStyleClass().add("text-input-dialog");
dialogPane.getButtonTypes().addAll(new ButtonType[] { ButtonType.APPLY, ButtonType.CANCEL });
this.updateGrid();
this.setResultConverter((dialogButton) -> {
ButtonBar.ButtonData data = dialogButton == null ? null : dialogButton.getButtonData();
return data == ButtonData.APPLY ? this.getValues() : null;
});
}
开发者ID:HearthProject,项目名称:OneClient,代码行数:26,代码来源:FileSelection.java
示例2: CheckBoxFxControlsTreeItem
import org.controlsfx.control.CheckTreeView; //导入依赖的package包/类
public CheckBoxFxControlsTreeItem(CheckTreeView<Node> tv) {
this.tv = tv;
tv.setCellFactory(param -> {
CheckBoxTreeCell<Node> treeCell = new CheckBoxTreeCell<Node>();
treeCell.setConverter(new StringConverter<TreeItem<Node>>() {
@Override
public String toString(TreeItem<Node> n) {
return getName(n.getValue());
}
@Override
public TreeItem<Node> fromString(String string) {
// TODO Auto-generated method stub
return null;
}
});
return treeCell;
});
}
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:23,代码来源:CheckBoxFxControlsTreeItem.java
示例3: initialize
import org.controlsfx.control.CheckTreeView; //导入依赖的package包/类
/**
* Native init method.
* Create VUFS folders tree view
* @param location
* @param resources
*/
@Override
public void initialize(URL location, ResourceBundle resources) {
//TODO: replace to getting elements from Repository
CheckBoxTreeItem<String> root = new CheckBoxTreeItem<>("Root");
root.setExpanded(true);
CheckBoxTreeItem<String> folder1 = new CheckBoxTreeItem<>("Folder1");
folder1.getChildren().addAll(
new CheckBoxTreeItem<>("MyFoto"),
new CheckBoxTreeItem<>("OtherFiles")
);
root.getChildren().addAll(
folder1,
new CheckBoxTreeItem<>("Documents"),
new CheckBoxTreeItem<>("WorkFiles"),
new CheckBoxTreeItem<>("Projects"));
// Create the CheckTreeView with the data
final CheckTreeView<String> checkTreeView = new CheckTreeView<>(root);
checkTreeView.getCheckModel().getCheckedItems().addListener((ListChangeListener<TreeItem<String>>) c -> {
System.out.println(checkTreeView.getCheckModel().getCheckedItems());
});
checkTreeView.setId("sync-tree-view");
container.getChildren().add(checkTreeView);
}
开发者ID:StnetixDevTeam,项目名称:ariADDna,代码行数:31,代码来源:SyncSettingsController.java
示例4: initTreeView
import org.controlsfx.control.CheckTreeView; //导入依赖的package包/类
private void initTreeView(){
CheckBoxTreeItem<FileItem> root = new CheckBoxTreeItem<>( dataManager.getRoot());
setTreeChildren(root);
treeView = new CheckTreeView<>(root);
treeViewPane.getChildren().add(treeView);
root.setExpanded(true);
treeView.setShowRoot(true);
treeView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
treeView.getCheckModel().getCheckedItems().addListener(this::onCheckListener);
selected.forEach(item -> item.setSelected(true));
}
开发者ID:StnetixDevTeam,项目名称:CloudRaid-DesktopApp,代码行数:14,代码来源:SyncManagerController.java
示例5: buildSchemaTree
import org.controlsfx.control.CheckTreeView; //导入依赖的package包/类
private CheckTreeView<String> buildSchemaTree(Relation root) {
CheckTreeView<String> view = new CheckTreeView<>();
view.setRoot(buildItem(root));
return view;
}
开发者ID:ChiralBehaviors,项目名称:Kramer,代码行数:6,代码来源:SchemaView.java
注:本文中的org.controlsfx.control.CheckTreeView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论