Package com.tulskiy.musique.gui.dialogs

Examples of com.tulskiy.musique.gui.dialogs.TreeFileChooser


     
      final JButton btnBrowse = new JButton("Browse...");
      btnBrowse.setToolTipText("Choose custom folder via File Chooser dialog.");
      btnBrowse.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
              TreeFileChooser fc = new TreeFileChooser(btnBrowse, "Open folder", false);
              File[] files = fc.showOpenDialog();
              if (files != null) {
                try {
            txtCustomFolder.setText(files[0].getCanonicalPath());
          } catch (Exception e) {
            // TODO Auto-generated catch block
View Full Code Here


        });
    }

    private void addItems(int selectionMode) {
        boolean allowFiles = selectionMode != JFileChooser.DIRECTORIES_ONLY;
        TreeFileChooser fc = new TreeFileChooser(this,
                allowFiles ? "Open file" : "Open folder",
                allowFiles);
        File[] files = fc.showOpenDialog();

        if (files != null) {
            final PlaylistTable table = tabs.getSelectedTable();
            if (table == null)
                return;
View Full Code Here

        } else {
            item = tableMenu.add("Add Files");
            item.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    TreeFileChooser fc = new TreeFileChooser(PlaylistTable.this, "Add Files", true);
                    File[] files = fc.showOpenDialog();

                    if (files != null) {
                        ProgressDialog dialog = new ProgressDialog(PlaylistTable.this, "Adding Files");
                        dialog.show(new Task.FileAddingTask(getPlaylist(), files, getPlaylist().size()));
                    }
View Full Code Here

TOP

Related Classes of com.tulskiy.musique.gui.dialogs.TreeFileChooser

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.