Package com.kodcu.other

Examples of com.kodcu.other.Item


    public void browse(TreeView<Item> treeView, AsciiDocController controller, String browserPath)   {

        Platform.runLater(() -> {

            rootItem = new TreeItem<>(new Item(Paths.get(browserPath), String.format("Working Directory (%s)", browserPath)));
            rootItem.setExpanded(true);
            DirectoryStream<Path> files = null;
            try {
                Path dir = Paths.get(browserPath);
                files = Files.newDirectoryStream(dir);
View Full Code Here


    }

    private void addToTreeView(Path path) {

        if (Files.isDirectory(path) && !path.getFileName().toString().startsWith("."))
            rootItem.getChildren().add(new TreeItem<>(new Item(path)));
        else if (matcher.matches(path))
            rootItem.getChildren().add(new TreeItem<>(new Item(path)));

    }
View Full Code Here

            if (event.getButton() == MouseButton.PRIMARY)
                if (Files.isDirectory(selectedPath)) {
                    try {
                        if (selectedItem.getChildren().size() == 0)
                            Files.newDirectoryStream(selectedPath).forEach(path -> {
                                selectedItem.getChildren().add(new TreeItem<>(new Item(path)));
                            });
                        selectedItem.setExpanded(!selectedItem.isExpanded());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
View Full Code Here

    }

    private Path getSelectedTabPath() {
        TreeItem<Item> selectedItem = treeView.getSelectionModel().getSelectedItem();
        Item value = selectedItem.getValue();
        Path path = value.getPath();
        return path;
    }
View Full Code Here

TOP

Related Classes of com.kodcu.other.Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.