Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.DirectoryDialog.open()


          if ( def.length() > 0 ){
           
            fd.setFilterPath( def );
          }
        }
        String f = fd.open();
        if (f != null){
          file.setText(f);
         
          File  ff = new File(f);
         
View Full Code Here


       */
      public void handleEvent(Event event) {
        DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
      dialog.setFilterPath(pathParameter.getValue());
      dialog.setText(MessageText.getString("ConfigView.section.stats.choosedefaultsavepath")); //$NON-NLS-1$
      String path = dialog.open();
      if (path != null) {
        pathParameter.setValue(path);
      }
      }
    });
View Full Code Here

  }

  private void handleBrowse() {
    DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.SINGLE);
    dialog.setText("Select export directory");
    String selectedDirectory = dialog.open();
    if (selectedDirectory != null) {
      _txtExportLocation.setText(selectedDirectory);
      Plugin.getDefault().getPreferenceStore().putValue(Preferences.PLUGIN_EXPORT_LOCATION, _txtExportLocation.getText());
    }
  }
View Full Code Here

  }
 
  protected String openDialog(Shell shell, String old_value) {
        DirectoryDialog dialog = new DirectoryDialog(shell, SWT.APPLICATION_MODAL);
        dialog.setFilterPath(old_value);       
        return dialog.open();
  }

  public void setValue(Object value) {
    if (value instanceof String) {
      sp.setValue((String)value);
View Full Code Here

    add_button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    add_button.setAlignment(SWT.LEFT);
    add_button.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        DirectoryDialog dir_dialog = new DirectoryDialog (getShell(),SWT.MULTI | SWT.OPEN);
        String directory = dir_dialog.open();
        if (directory == null) return ;
        java.util.List<File> shared_dirs = null;
        try {
          shared_dirs = config_manager.getSharedFolders();
        } catch (ConfigurationManagerException e) {
View Full Code Here

  public void initUIComponents() {
    if (type == WindowType.SHARED_DIR) {
      shell = new Shell(SWTThread.getDisplay());
      DirectoryDialog dir_dialog = new DirectoryDialog (shell,SWT.MULTI | SWT.OPEN);
      dir_dialog.setText(_._("newwindow.title.shared_dir"));
      String directory = dir_dialog.open();
      if (directory == null) return ;
     
      List<File> shared_dirs = null;
      try {
        shared_dirs = config_manager.getSharedFolders();
View Full Code Here

  {
   public void handleEvent(Event e)
   {
    DirectoryDialog dd = new DirectoryDialog(composite.getShell());
    dd.setMessage("Please select a directory to exclude from the scan");
    String dir = dd.open();
    if (dir != null)  { dirs.add(dir); fillUpTable(); }
   }
  });

  final Button deleteButton = new Button(composite, SWT.PUSH); deleteButton.setText("Delete");
View Full Code Here

  indexButton.addListener( SWT.Selection, new Listener() {
   public void handleEvent(Event e)
   {
    DirectoryDialog dd = new DirectoryDialog(composite.getShell());
    dd.setMessage("Please select the Lucene index directory");
    String dir = dd.open();
    if (dir != null)
      { indexText.setText(dir);( (CrawlConfigWizard) getWizard() ).crawlConfig.setIndexDir(dir); }
   }
  });
View Full Code Here

  dbButton.addListener( SWT.Selection, new Listener() {
   public void handleEvent(Event e)
   {
    DirectoryDialog dd = new DirectoryDialog(composite.getShell());
    dd.setMessage("Please select the Berekeley DB directory");
    String dir = dd.open();
    if (dir != null
    { dbText.setText(dir); ( (CrawlConfigWizard) getWizard() ).crawlConfig.setDbDir(dir); }
   }
  });
View Full Code Here

  webButton.addListener( SWT.Selection, new Listener() {
   public void handleEvent(Event e)
   {
    DirectoryDialog dd = new DirectoryDialog(composite.getShell());
    dd.setMessage("Please select the Web server root directory");
    String dir = dd.open();
    if (dir != null
    { webText.setText(dir); ( (CrawlConfigWizard) getWizard() ).crawlConfig.setWebDir(dir); }
   }
  });
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.