Examples of FolderChooser


Examples of com.jidesoft.swing.FolderChooser

         {
            final BrowserAction action = (BrowserAction) HermesBrowser.getBrowser().getDocumentPane().getActiveDocument();

            if (action.getSelectedMessages().size() > 0)
            {
               FolderChooser chooser;

               if (DirectoryCache.lastSaveAsDirectory == null)
               {
                  chooser = new FolderChooser(new File(HermesBrowser.getBrowser().getRepositoryManager().getDirectory()));
               }
               else
               {
                  chooser = new FolderChooser(DirectoryCache.lastSaveAsDirectory);
               }


               if (chooser.showDialog(HermesBrowser.getBrowser(), "Select directory for messages") == FolderChooser.APPROVE_OPTION)
               {
                  DirectoryCache.lastSaveAsDirectory = chooser.getSelectedFile();

                  for (final Message message : action.getSelectedMessages())
                  {
                     if (message instanceof TextMessage)
                     {
View Full Code Here

Examples of com.jidesoft.swing.FolderChooser

   * @return the file or null
   */
  public File[] openDialog(final boolean multiple, final boolean folder, FileFilter filter) {
    // what kind of folder?
    if (folder) {
      FolderChooser fc = new FolderChooser();
      fc.setNavigationFieldVisible(true);
      // fc.setRecentListVisible(true);
      fc.setRecentList(Arrays.asList(Setting
          .get("integration.folderlist", new String[] { SystemUtils.USER_HOME })));
      fc.setAvailableButtons(FolderChooser.BUTTON_ALL);
      fc.setMultiSelectionEnabled(multiple);
      fc.setDialogTitle("");
     
      // show it
      int result = fc.showOpenDialog(null);
      if (result == FolderChooser.APPROVE_OPTION) {
        // collect & save
        List<String> s = fc.getRecentList();
        s.add(0, fc.getSelectedFile().getAbsolutePath());
        if (s.size() >= 10) {
          s.remove(10);
        }
        Setting.set("integration.folderlist", s);
       
        // get
        return fc.getSelectedFiles();
      } else {
        return new File[] {};
      }
    } else {
     
      // Create a file chooser
      final JFileChooser fc = new JFileChooser();
      fc.setMultiSelectionEnabled(multiple);
      fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
      if (filter != null) {
        fc.setFileFilter(filter);
      }
     
      // In response to a button click:
      final int returnVal = fc.showOpenDialog(null);
      if (returnVal == JFileChooser.APPROVE_OPTION) {
        return fc.getSelectedFiles();
      } else {
        return new File[] {};
      }
    }
  }
View Full Code Here

Examples of com.jidesoft.swing.FolderChooser

         {
            BrowserAction action = (BrowserAction) HermesBrowser.getBrowser().getDocumentPane().getActiveDocument();

            if (action.getSelectedMessages().size() > 0)
            {
               FolderChooser chooser;

               if (DirectoryCache.lastSaveAsDirectory == null)
               {
                  chooser = new FolderChooser(new File(HermesBrowser.getBrowser().getRepositoryManager().getDirectory()));
               }
               else
               {
                  chooser = new FolderChooser(DirectoryCache.lastSaveAsDirectory);
               }

               //chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

               if (chooser.showDialog(HermesBrowser.getBrowser(), "Select directory for messages") == FolderChooser.APPROVE_OPTION)
               {
                  DirectoryCache.lastSaveAsDirectory = chooser.getSelectedFile();

                  for (final Message m : action.getSelectedMessages())
                  {
                     final String filename = DirectoryCache.lastSaveAsDirectory.getAbsolutePath() + File.separator + JMSUtils.getFilenameFromMessageID(m.getJMSMessageID()) + ".xml";
                     final File file = new File(filename);
View Full Code Here

Examples of com.jidesoft.swing.FolderChooser

      if (file != null)
      {
         textField.setText(file.getAbsolutePath());

         chooser = new FolderChooser((File) arg1);

         chooser.setSelectedFile(file);
        
         if (chooser.showDialog(table, "Select directory") == FolderChooser.APPROVE_OPTION)
         {
View Full Code Here

Examples of org.rssowl.ui.internal.FolderChooser

    /* Location */
    Label locationLabel = new Label(container, SWT.None);
    locationLabel.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
    locationLabel.setText("Location: ");

    fFolderChooser = new FolderChooser(container, mark.getParent(), SWT.BORDER);
    fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
    fFolderChooser.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));

    Composite radioContainer = new Composite(container, SWT.None);
View Full Code Here

Examples of org.rssowl.ui.internal.FolderChooser

      Label locationLabel = new Label(container, SWT.None);
      locationLabel.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
      locationLabel.setText("Location: ");

      fFolderChooser = new FolderChooser(container, sameParent, null, SWT.BORDER);
      fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
      fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
      fFolderChooser.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    }
View Full Code Here

Examples of org.rssowl.ui.internal.FolderChooser

      Label folderLabel = new Label(control, SWT.NONE);
      folderLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      folderLabel.setText("Location: ");

      /* Folder Chooser */
      fFolderChooser = new FolderChooser(control, getParent(), SWT.BORDER);
      fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
      fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
      fFolderChooser.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_WHITE));

      Composite radioContainer = new Composite(control, SWT.None);
View Full Code Here

Examples of org.rssowl.ui.internal.FolderChooser

      for (IEntity entity : fEntities) {
        if (entity instanceof IFolder)
          excludes.add((IFolder) entity);
      }

      fFolderChooser = new FolderChooser(container, sameParent, excludes, SWT.BORDER);
      fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
      fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
      fFolderChooser.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    }
View Full Code Here

Examples of org.rssowl.ui.internal.FolderChooser

      Label l3 = new Label(control, SWT.NONE);
      l3.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      l3.setText("Location: ");

      /* Folder Chooser */
      fFolderChooser = new FolderChooser(control, getParent(), SWT.BORDER);
      fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
      fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
      fFolderChooser.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_WHITE));

      setControl(control);
View Full Code Here

Examples of org.rssowl.ui.internal.FolderChooser

      for (IEntity entity : fEntities) {
        if (entity instanceof IFolder)
          excludes.add((IFolder) entity);
      }

      fFolderChooser = new FolderChooser(container, sameParent, excludes, SWT.BORDER);
      fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
      fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
      fFolderChooser.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.