Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.DirectoryDialog


  addButton.setLayoutData(addButtonGd);
  addButton.addListener( SWT.Selection, new Listener()
  {
   public void handleEvent(Event e)
   {
    DirectoryDialog dd = new DirectoryDialog(composite.getShell());
    dd.setMessage("Please select a directory to include in 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



      butDirectory = new Button(eventgroup, SWT.NONE);
      butDirectory.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          DirectoryDialog fdialog = new DirectoryDialog(MainWindow.getSShell(), SWT.MULTI);
          fdialog.setFilterPath(Options.getLastDirectory());
          fdialog.setText("Save Event Handler ...");

          String path = fdialog.open();   
          if(path != null)            
            lblDirectory.setText(normalized(path));
         
        }
      });
View Full Code Here

      //if (filename != null && filename.equals("#xml#")) {
      if(isDirectory) {

        String path = filename;
        if(filename == null || filename.length() == 0) {
          DirectoryDialog fdialog = new DirectoryDialog(MainWindow.getSShell(), SWT.MULTI);
          fdialog.setFilterPath(Options.getLastDirectory());

          fdialog.setText("Open" + getDomInstance(dom) + " File");

          String fname = fdialog.open();
          if (fname == null)
            return false;
          //path = fdialog.getFilterPath();
          path = fname;
View Full Code Here

    Document currDoc = dom.getDoc();
    File configFile = null;
    try {
      if(dom.getFilename() == null || saveas) {

        DirectoryDialog fdialog = new DirectoryDialog(MainWindow.getSShell(), SWT.MULTI);
        fdialog.setFilterPath(Options.getLastDirectory());
        fdialog.setText("Save object to hot folder ...");

        String path = fdialog.open();                 

        if(path == null) {
          return false;
       
        File _file = null;
View Full Code Here

    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseFromDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ImportSchemasFromXmlWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ImportSchemasFromXmlWizardPage.SelectFolderToImportFrom" ) ); //$NON-NLS-1$
        if ( "".equals( fromDirectoryText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_IMPORT_SCHEMAS_XML ) );
        }
        else
        {
            dialog.setFilterPath( fromDirectoryText.getText() );
        }

        String selectedDirectory = dialog.open();
        if ( selectedDirectory != null )
        {
            fromDirectoryText.setText( selectedDirectory );
            fillInSchemaFilesTable( selectedDirectory );
        }
View Full Code Here

    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseExportDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.SelectFolderToExport" ) ); //$NON-NLS-1$
        if ( "".equals( exportDirectoryText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_OPENLDAP ) );
        }
        else
        {
            dialog.setFilterPath( exportDirectoryText.getText() );
        }

        String selectedDirectory = dialog.open();
        if ( selectedDirectory != null )
        {
            exportDirectoryText.setText( selectedDirectory );
        }
    }
View Full Code Here

    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseExportDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ExportProjectsWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ExportProjectsWizardPage.SelectFolderToExportTo" ) ); //$NON-NLS-1$
        if ( "".equals( exportDirectoryText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_EXPORT_PROJECTS ) );
        }
        else
        {
            dialog.setFilterPath( exportDirectoryText.getText() );
        }

        String selectedDirectory = dialog.open();
        if ( selectedDirectory != null )
        {
            exportDirectoryText.setText( selectedDirectory );
        }
    }
View Full Code Here

    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseFromDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ImportProjectsWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ImportProjectsWizardPage.SelectFoldertoImportFrom" ) ); //$NON-NLS-1$
        if ( "".equals( fromDirectoryText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_IMPORT_PROJECTS ) );
        }
        else
        {
            dialog.setFilterPath( fromDirectoryText.getText() );
        }

        String selectedDirectory = dialog.open();
        if ( selectedDirectory != null )
        {
            fromDirectoryText.setText( selectedDirectory );
            fillInSchemaFilesTable( selectedDirectory );
        }
View Full Code Here

    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseExportDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ExportSchemasForADSWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ExportSchemasForADSWizardPage.SelectFolderToExportTo" ) ); //$NON-NLS-1$
        if ( "".equals( exportMultipleFilesText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_APACHE_DS ) );
        }
        else
        {
            dialog.setFilterPath( exportMultipleFilesText.getText() );
        }

        String selectedDirectory = dialog.open();
        if ( selectedDirectory != null )
        {
            exportMultipleFilesText.setText( selectedDirectory );
        }
    }
View Full Code Here

            }
        });
        btnBrowse.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                DirectoryDialog dialog = new DirectoryDialog(group.getShell());
                dialog.setMessage("Choose a directory for the project contents:");
                String directoryName = txtLocation.getText().trim();
                if (directoryName == null || directoryName.length() == 0) {
                    String previous = JavaPlugin.getDefault().getDialogSettings().get(DIALOGSTORE_LAST_EXTERNAL_LOC);
                    if (previous != null)
                        directoryName = previous;
                }

                assert (directoryName != null);

                if (directoryName.length() > 0) {
                    File path = new File(directoryName);
                    if (path.exists())
                        dialog.setFilterPath(directoryName);
                }

                String selected = dialog.open();
                if (selected != null) {
                    txtLocation.setText(selected);
                }
            }
        });
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.DirectoryDialog

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.