Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.DirectoryDialog


            final Button browseButton = new Button(parent, SWT.PUSH);
            browseButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            browseButton.setText("...");
            browseButton.addSelectionListener(new SelectionAdapter(){
                public void widgetSelected( SelectionEvent e ) {
                    DirectoryDialog directoryDialog = new DirectoryDialog(text.getShell(), isInFolder ? SWT.OPEN : SWT.SAVE);
                    String lastFolderChosen = OmsBoxPlugin.getDefault().getLastFolderChosen();
                    directoryDialog.setFilterPath(lastFolderChosen);
                    String path = directoryDialog.open();

                    if (path == null || path.length() < 1) {
                        text.setText("");
                    } else {
                        path = checkBackSlash(path, isFile);
                        text.setText(path);
                        // text.setSelection(text.getCharCount());
                        setDataValue();
                    }
                    OmsBoxPlugin.getDefault().setLastFolderChosen(directoryDialog.getFilterPath());
                }
            });
        }
        if (isCrs) {
            // the crs choice group
View Full Code Here


                Display.getDefault().syncExec(new Runnable(){
                    public void run() {

                        final Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();

                        DirectoryDialog folderDialog = new DirectoryDialog(shell, SWT.OPEN);
                        String selpath = folderDialog.open();
                        if (selpath == null) {
                            return;
                        }
                        final File folderFile = new File(selpath);
                        if (!folderFile.exists()) {
View Full Code Here

        Button browseButton = new Button(workingFolderGroup, SWT.PUSH);
        browseButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        browseButton.setText("...");
        browseButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog folderDialog = new DirectoryDialog(workingFolderGroup.getShell(), SWT.OPEN);
                String path = folderDialog.open();
                if (path != null && path.length() >= 1) {
                    OmsBoxPlugin.getDefault().setWorkingFolder(path);
                    pathText.setText(path);
                }
            }
View Full Code Here

        Button browseButton = new Button(gisbaseGroup, SWT.PUSH);
        browseButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        browseButton.setText("...");
        browseButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog folderDialog = new DirectoryDialog(gisbaseGroup.getShell(), SWT.OPEN);
                String path = folderDialog.open();
                if (path != null && path.length() >= 1) {
                    OmsBoxPlugin.getDefault().setGisbasePreference(path);
                    pathText.setText(path);
                }
            }
View Full Code Here

                if (window == null || window.getShell() == null) {
                    shell = Display.getDefault().getActiveShell();
                }else{
                    shell = window.getShell();
                }
                DirectoryDialog fileDialog = new DirectoryDialog(shell, SWT.OPEN);
                fileDialog.setMessage(Messages.SaveProject_Destination);
                String path = fileDialog.open();

                URI origURI = project.eResource().getURI();
                File file = new File(origURI.toFileString());

                String destinationUdigFolder = path + File.separator + project.getName() + ".udig";
View Full Code Here

      Shell activeShell = Display.getDefault().getActiveShell();

      while(path==null){
          // prompt the user for the path
         
      DirectoryDialog dialog = new DirectoryDialog(activeShell);
          dialog.setFilterPath(Messages.OpenProject_newProject_filename);
          dialog.setMessage(Messages.OpenProject_selectProject);
          dialog.setText(Messages.OpenProject_openProject);
          path = dialog.open();
          if (path == null){
            return; // user canceled
          }
         
          File projFile = new File(path+File.separator+ProjectRegistry.PROJECT_FILE);
View Full Code Here

    private void browse() {
        String selectedDirectory = null;
        String dirName = pathText.getText();

        DirectoryDialog dialog = new DirectoryDialog(getShell());
        dialog.setMessage("Select the Drools runtime directory.");
        dialog.setFilterPath(dirName);
        selectedDirectory = dialog.open();

        if (selectedDirectory != null) {
            pathText.setText(selectedDirectory);
        }
    }
View Full Code Here

            pathText.setText(selectedDirectory);
        }
    }

    private void createRuntime() {
        DirectoryDialog dialog = new DirectoryDialog(getShell());
        dialog.setMessage("Select the new Drools 5 runtime directory.");
        String selectedDirectory = dialog.open();

        if (selectedDirectory != null) {
            DroolsRuntimeManager.createDefaultRuntime(selectedDirectory);
            nameText.setText("Drools 5.2.0 runtime");
            pathText.setText(selectedDirectory);
View Full Code Here

import org.eclipse.swt.widgets.DirectoryDialog;

public class DirectoryComponent extends FileComponent {

    protected String getFile(String defaultPath) {
        DirectoryDialog directorySelectorDialog =
          new DirectoryDialog(textField.getShell(), SWT.OPEN);
        directorySelectorDialog.setText("Select a Directory");
        directorySelectorDialog.setFilterPath(defaultPath);
        String chosenDirectoryPath = directorySelectorDialog.open();
       
        return fixPath(chosenDirectoryPath);
    }
View Full Code Here

 
  private void browse() {
    String selectedDirectory = null;
    String dirName = pathText.getText();

    DirectoryDialog dialog = new DirectoryDialog(getShell());
    dialog.setMessage("Select the jBPM runtime directory.");
    dialog.setFilterPath(dirName);
    selectedDirectory = dialog.open();
   
    if (selectedDirectory != null) {
      pathText.setText(selectedDirectory);
    }
  }
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.