Package javax.swing.filechooser

Examples of javax.swing.filechooser.FileSystemView$AbstractFileSystemView


    public FileSystemView getFileSystemView() {
        return fileSystemView;
    }

    public void setFileSystemView(final FileSystemView fsv) {
        FileSystemView oldValue = fileSystemView;
        fileSystemView = fsv;
        firePropertyChange(FILE_SYSTEM_VIEW_CHANGED_PROPERTY, oldValue, fsv);
    }
View Full Code Here


        public Boolean isHidden(final File f) {
            return f.isHidden() ? Boolean.TRUE : Boolean.FALSE;
        }

        private Icon getIconForFile(final File file) {
            FileSystemView view = getFileChooser().getFileSystemView();
            if (file == null) {
                return null;
            } else if (view.isComputerNode(file)) {
                return computerIcon;
            } else if (view.isFloppyDrive(file)) {
                return floppyDriveIcon;
            } else if (view.isDrive(file)) {
                return hardDriveIcon;
            } else if (file.isFile()) {
                return fileIcon;
            } else if (file.isDirectory()) {
                return directoryIcon;
View Full Code Here

            processRoots();
            appendFileStructure(getFileChooser().getFileSystemView().getDefaultDirectory(), predefinedStructure);
        }

        private void processRoots() {
            FileSystemView fileSystemView = getFileChooser().getFileSystemView();
            File[] roots = fileSystemView.getRoots();
            for (int i = 0; i < roots.length; i++) {
                predefinedStructure.add(roots[i]);
                File[] children = fileSystemView.getFiles(roots[i], false);
                if (children != null) {
                    for (int j = 0; j < children.length; j++) {
                        processRoot(children[j]);
                    }
                }
View Full Code Here

                }
            }
        }

        private void processRoot(final File root) {
            FileSystemView fileSystemView = getFileChooser().getFileSystemView();
            if (!fileSystemView.isFileSystem(root) || fileSystemView.isFileSystemRoot(root)) {
                predefinedStructure.add(root);
                if (!fileSystemView.isFileSystemRoot(root)) {
                    File[] children = fileSystemView.getFiles(root, false);
                    if (files != null) {
                        for (int i = 0; i < children.length; i++) {
                            if (fileSystemView.isFileSystemRoot(children[i])) {
                                predefinedStructure.add(children[i]);
                            }
                        }
                    }
                }
View Full Code Here

    public MyComputerTreeNode(FileSystemView fsv) {
      super(fsv);
    }

    protected void loadChildren() {
      FileSystemView fsv = (FileSystemView)getUserObject();
      File[] roots = fsv.getRoots();
      if (roots != null) {
        Arrays.sort(roots);
        for (int i = 0, c = roots.length; i < c; i++) {
          add(new FileTreeNode(roots[i]));
        }
View Full Code Here

            processRoots();
            appendFileStructure(getFileChooser().getFileSystemView().getDefaultDirectory(), predefinedStructure);
        }

        private void processRoots() {
            FileSystemView fileSystemView = getFileChooser().getFileSystemView();
            File[] roots = fileSystemView.getRoots();
            for (int i = 0; i < roots.length; i++) {
                predefinedStructure.add(roots[i]);
                File[] children = fileSystemView.getFiles(roots[i], false);
                if (children != null) {
                    for (int j = 0; j < children.length; j++) {
                        processRoot(children[j]);
                    }
                }
View Full Code Here

                }
            }
        }

        private void processRoot(final File root) {
            FileSystemView fileSystemView = getFileChooser().getFileSystemView();
            if (!fileSystemView.isFileSystem(root) || fileSystemView.isFileSystemRoot(root)) {
                predefinedStructure.add(root);
                if (!fileSystemView.isFileSystemRoot(root)) {
                    File[] children = fileSystemView.getFiles(root, false);
                    if (files != null) {
                        for (int i = 0; i < children.length; i++) {
                            if (fileSystemView.isFileSystemRoot(children[i])) {
                                predefinedStructure.add(children[i]);
                            }
                        }
                    }
                }
View Full Code Here

        public Boolean isHidden(final File f) {
            return f.isHidden() ? Boolean.TRUE : Boolean.FALSE;
        }

        private Icon getIconForFile(final File file) {
            FileSystemView view = getFileChooser().getFileSystemView();
            if (file == null) {
                return null;
            } else if (view.isComputerNode(file)) {
                return computerIcon;
            } else if (view.isFloppyDrive(file)) {
                return floppyDriveIcon;
            } else if (view.isDrive(file)) {
                return hardDriveIcon;
            } else if (file.isFile()) {
                return fileIcon;
            } else if (file.isDirectory()) {
                return directoryIcon;
View Full Code Here

            processRoots();
            appendFileStructure(getFileChooser().getFileSystemView().getDefaultDirectory(), predefinedStructure);
        }

        private void processRoots() {
            FileSystemView fileSystemView = getFileChooser().getFileSystemView();
            File[] roots = fileSystemView.getRoots();
            for (int i = 0; i < roots.length; i++) {
                predefinedStructure.add(roots[i]);
                File[] children = fileSystemView.getFiles(roots[i], false);
                if (children != null) {
                    for (int j = 0; j < children.length; j++) {
                        processRoot(children[j]);
                    }
                }
View Full Code Here

                }
            }
        }

        private void processRoot(final File root) {
            FileSystemView fileSystemView = getFileChooser().getFileSystemView();
            if (!fileSystemView.isFileSystem(root) || fileSystemView.isFileSystemRoot(root)) {
                predefinedStructure.add(root);
                if (!fileSystemView.isFileSystemRoot(root)) {
                    File[] children = fileSystemView.getFiles(root, false);
                    if (files != null) {
                        for (int i = 0; i < children.length; i++) {
                            if (fileSystemView.isFileSystemRoot(children[i])) {
                                predefinedStructure.add(children[i]);
                            }
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of javax.swing.filechooser.FileSystemView$AbstractFileSystemView

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.