Examples of FileDialog


Examples of org.eclipse.swt.widgets.FileDialog

    /**
     * This method is called when the exportSingleFile 'browse' button is selected.
     */
    private void chooseExportFile()
    {
        FileDialog dialog = new FileDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.SAVE );
        dialog.setText( Messages.getString( "ExportSchemasForADSWizardPage.SelectFile" ) ); //$NON-NLS-1$
        dialog.setFilterExtensions( new String[]
            { "*.ldif", "*" } ); //$NON-NLS-1$ //$NON-NLS-2$
        dialog
            .setFilterNames( new String[]
                {
                    Messages.getString( "ExportSchemasForADSWizardPage.LDIFFiles" ), Messages.getString( "ExportSchemasForADSWizardPage.AllFiles" ) } ); //$NON-NLS-1$ //$NON-NLS-2$
        if ( "".equals( exportSingleFileText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_APACHE_DS ) );
        }
        else
        {
            dialog.setFilterPath( exportSingleFileText.getText() );
        }

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

Examples of org.eclipse.swt.widgets.FileDialog

            }
        }
    }

    void doAddExternal() {
        FileDialog dialog = new FileDialog(getShell(), SWT.OPEN | SWT.MULTI);
        dialog.setFilterExtensions(new String[] {
            "*.jar"}); //$NON-NLS-1$
        String res = dialog.open();
        if (res != null) {
            IPath filterPath = new Path(dialog.getFilterPath());

            String[] fileNames = dialog.getFileNames();
            List<File> added = new ArrayList<File>(fileNames.length);
            for (String fileName : fileNames) {
                added.add(filterPath.append(fileName).toFile());
            }
            if (!added.isEmpty()) {
View Full Code Here

Examples of org.eclipse.swt.widgets.FileDialog

        btnFolder.addListener(SWT.Selection, listener);

        btnBrowseJar.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
                dialog.setFilterExtensions(new String[] {
                    "*.jar"
                });
                dialog.setFilterNames(new String[] {
                    "JAR Files"
                });
                String path = dialog.open();
                if (path != null)
                    txtJarPath.setText(path);
            }
        });
    }
View Full Code Here

Examples of org.pentaho.mantle.client.dialogs.FileDialog

    RepositoryFileTreeManager.getInstance().fetchRepositoryFileTree( new AsyncCallback<RepositoryFileTree>() {
      public void onFailure( Throwable caught ) {
      }

      public void onSuccess( RepositoryFileTree repositoryFileTree ) {
        FileDialog dialog = new FileDialog( repositoryFileTree, path, title, okText, fileTypes.split( "," ) );
        dialog.addFileChooserListener( new FileChooserListener() {

          public void fileSelected( RepositoryFile repositoryFile, String filePath, String fileName, String title ) {
            notifyOpenFileCallback( callback, repositoryFile, filePath, fileName, title );
          }

          public void fileSelectionChanged( RepositoryFile repositoryFile, String filePath, String fileName,
              String title ) {
          }

          public void dialogCanceled() {

          }

        } );
        dialog.show();
      }
    }, false, null, null, showHidden );
  }
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.