Package org.eclipse.swt.widgets

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


        final Button locationPathChooseButton = new Button(baseFolderGroup, SWT.BORDER);
        locationPathChooseButton.setText("...");
        locationPathChooseButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog fileDialog = new DirectoryDialog(locationPathChooseButton.getShell(), SWT.OPEN);
                String path = fileDialog.open();
                if (path != null)
                    path = path.replaceAll("\\s+", "_");
                if (isBaseFolderValid(path)) {
                    properties.basePath = path;
                    baseFolderText.setText(path);
View Full Code Here


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

                    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

        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

        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

                }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

         
      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

        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

    }

    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

    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);
    }

    protected String validate(File file) {
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.