当前位置: 首页>>代码示例>>Java>>正文


Java CheckListView类代码示例

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


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

示例1: chooseRecentReposToDelete

import org.controlsfx.control.CheckListView; //导入依赖的package包/类
/**
 * Shows a popover with all repos in a checklist
 */
public void chooseRecentReposToDelete() {
    logger.info("Remove repos button clicked");

    // creates a CheckListView with all the repos in it
    List<RepoHelper> repoHelpers = this.theModel.getAllRepoHelpers();
    CheckListView<RepoHelper> repoCheckListView = new CheckListView<>(FXCollections.observableArrayList(repoHelpers));

    // creates a popover with the list and a button used to remove repo shortcuts
    Button removeSelectedButton = new Button("Remove repository shortcuts from Elegit");
    PopOver popover = new PopOver(new VBox(repoCheckListView, removeSelectedButton));
    popover.setTitle("Manage Recent Repositories");

    // shows the popover
    popover.show(dropdownController.removeRecentReposButton);

    removeSelectedButton.setOnAction(e -> {
        this.handleRemoveReposButton(repoCheckListView.getCheckModel().getCheckedItems());
        popover.hide();
    });
}
 
开发者ID:dmusican,项目名称:Elegit,代码行数:24,代码来源:SessionController.java

示例2: getUntrackedBranchesToPush

import org.controlsfx.control.CheckListView; //导入依赖的package包/类
static ArrayList<LocalBranchHelper> getUntrackedBranchesToPush(ArrayList<LocalBranchHelper> branches) {

        final ArrayList<LocalBranchHelper> result = new ArrayList<>(branches.size());

        Alert alert = new Alert(Alert.AlertType.NONE);
        alert.setTitle("Untracked local branches");
        alert.setHeaderText("The branches below are not tracked remotely.\n" +
                            "Select the branches you want to create an upstream remote branch for.");

        CheckListView<LocalBranchHelper> untrackedBranches = new CheckListView<>(FXCollections.observableArrayList(branches));

        ButtonType okButton = new ButtonType("Cancel", ButtonBar.ButtonData.CANCEL_CLOSE);
        ButtonType trackButton = new ButtonType("Track Branches", ButtonBar.ButtonData.APPLY);
        alert.getDialogPane().setContent(untrackedBranches);
        alert.getButtonTypes().addAll(trackButton, okButton);

        Optional<?> alertResult = alert.showAndWait();

        if (alertResult.isPresent()) {
            if (alertResult.get() == trackButton) {
                result.addAll(untrackedBranches.getCheckModel().getCheckedItems());
            }
        }

        if (result.size() > 0)
            return result;
        else
            return null;
    }
 
开发者ID:dmusican,项目名称:Elegit,代码行数:30,代码来源:PopUpWindows.java

示例3: getCheckListView

import org.controlsfx.control.CheckListView; //导入依赖的package包/类
/**
 * Get check list view
 *
 * @return CheckListView<String>
 */
public CheckListView<String> getCheckListView() {
    return checkListView;
}
 
开发者ID:alexandr85,项目名称:javafx-ws-client,代码行数:9,代码来源:SendMessagesController.java


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