Package org.eclipse.swt.widgets

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


  private void handleAddTomcatLibrary() {
    Shell shell = getManagedForm().getForm().getShell();
    FileDialog dialog = new FileDialog(shell, SWT.MULTI);
    dialog.setText("Select libraries to add");
    dialog.setFilterExtensions(new String[] {"*.jar"});
    String selectedFile = dialog.open();
    if (selectedFile != null) {
      String[] fileNames = dialog.getFileNames();
      File dir = new File(dialog.getFilterPath());
      for (int i = 0; i < fileNames.length; i++) {
        String filename = fileNames[i];
View Full Code Here


  private void handleBrowse() {
    FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE);
    dialog.setText("Select wga.war file");
    dialog.setFilterExtensions(new String[] {"*.war"});
    String selectedFile = dialog.open();
    if (selectedFile != null) {
      String[] fileNames = dialog.getFileNames();
      File dir = new File(dialog.getFilterPath());
      if (fileNames.length > 0) {
        // TODO check if this is really a wga.war dist
View Full Code Here

  protected void handleAddDefaultPlugin() {
    FileDialog dialog = new FileDialog(getShell(), SWT.MULTI);
    dialog.setText("Select plugin files to add");
    dialog.setFilterExtensions(new String[] {"*.wgaplugin"});
    String selectedFile = dialog.open();
    if (selectedFile != null) {
      String[] fileNames = dialog.getFileNames();
      File dir = new File(dialog.getFilterPath());
      for (int i = 0; i < fileNames.length; i++) {
        String filename = fileNames[i];
View Full Code Here

              "*.vuze",
              "*.vuz",
              Constants.FILE_WILDCARD
            });
         
          String path = TorrentOpener.setFilterPathData( dialog.open());

          if ( path != null ){
           
            String lc = path.toLowerCase();
           
View Full Code Here

        FileDialog dialog = new FileDialog(shell, SWT.APPLICATION_MODAL);
        dialog.setFilterPath(old_value);
        if (this.extension_list != null) {
          dialog.setFilterExtensions(this.extension_list);
        }
        return dialog.open();
  }
}
View Full Code Here

     
      fd.setFileName(textPath.getText());
     
      fd.setFilterExtensions(new String[]{"*.torrent", "*.tor", Constants.FILE_WILDCARD});
     
      String path = fd.open();
     
      if(path != null) {
       
        textPath.setText(path);
      }    
View Full Code Here

     
      fd.setFileName(textPath.getText());
     
      fd.setFilterExtensions(new String[]{"*.xml", Constants.FILE_WILDCARD});
     
      String path = fd.open();
     
      if(path != null) {
       
        textPath.setText(path);     
      }    
View Full Code Here

                  "*.vuze",
                  "*.vuz",
                  Constants.FILE_WILDCARD
                });
             
              String path = TorrentOpener.setFilterPathData( dialog.open());
   
              if ( path != null ){
               
                String lc = path.toLowerCase();
               
View Full Code Here

                "*.vuze",
                "*.vuz",
                Constants.FILE_WILDCARD
              });
           
            String path = TorrentOpener.setFilterPathData( dialog.open());
 
            if ( path != null ){
             
              VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
             
View Full Code Here

    save_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        FileDialog dialog = new FileDialog (getShell(), SWT.SAVE);
        dialog.setFilterNames (new String [] {"All Files (*.*)"});
        dialog.setFilterExtensions (new String [] {"*.*"});
        dialog.open();
        String filename = dialog.getFileName();
        if (filename == null) return ;
        final String full_path = (dialog.getFilterPath() + File.separator + filename);
        final String content = log_content.getText();
        new Thread( new JMRunnable() {
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.