Package org.eclipse.swt.widgets

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


          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


      // if save file as...
      if (saveas || filename == null || filename.equals("")) { //$NON-NLS-1$
        FileDialog fdialog = new FileDialog(MainWindow.getSShell(), SWT.SAVE);
        fdialog.setFilterPath(Options.getLastDirectory());
        fdialog.setText("Save" + getDomInstance(dom) + " File");
        filename = fdialog.open();
        if (filename == null)
          return false;
        saveas = true;
      }
View Full Code Here

            while ( !canOverwrite )
            {
                // Open FileDialog
                FileDialog dialog = new FileDialog( shell, SWT.SAVE );
                path = dialog.open();
                if ( path == null )
                {
                    return false;
                }
View Full Code Here

        else if ( buttonId == SAVE_BUTTON_ID )
        {
            FileDialog fileDialog = new FileDialog( getShell(), SWT.SAVE );
            fileDialog.setText( Messages.getString( "CertificateDialog.SaveCertificate" ) ); //$NON-NLS-1$
            // fileDialog.setFilterExtensions(new String[]{"*.pem"});
            String returnedFileName = fileDialog.open();
            if ( returnedFileName != null )
            {
                try
                {
                    File file = new File( returnedFileName );
View Full Code Here

        }
        else if ( buttonId == LOAD_BUTTON_ID )
        {
            FileDialog fileDialog = new FileDialog( getShell(), SWT.OPEN );
            fileDialog.setText( Messages.getString( "CertificateDialog.LoadCertificate" ) ); //$NON-NLS-1$
            String returnedFileName = fileDialog.open();
            if ( returnedFileName != null )
            {
                try
                {
                    File file = new File( returnedFileName );
View Full Code Here

        else
        {
            dialog.setFilterPath( exportSingleFileText.getText() );
        }

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

    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);
View Full Code Here

                    "*.jar"
                });
                dialog.setFilterNames(new String[] {
                    "JAR Files"
                });
                String path = dialog.open();
                if (path != null)
                    txtJarPath.setText(path);
            }
        });
    }
View Full Code Here

            File cnfdir = new File(wsdir, Workspace.CNFDIR);
            dialog.setFilterPath(cnfdir.getAbsolutePath());
            dialog.setFilterExtensions(new String[] {
                "*.jar"}); //$NON-NLS-1$

            String res = dialog.open();
            if (res != null) {
                File baseDir = new File(dialog.getFilterPath());
                String[] fileNames = dialog.getFileNames();
                if (fileNames != null && fileNames.length > 0) {
                    for (String fileName : fileNames) {
View Full Code Here

  }
 
  public void makeScreenShot() {
    FileDialog f = new FileDialog(parent.getShell(), SWT.SAVE);
    f.setText("Select where to save your screenshot.");
    String filepath = f.open();
    if(filepath == null){
      return;
    }

   
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.