Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.DirectoryDialog


    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseExportDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ExportSchemasAsXmlWizardPage.SelectFolderToExport" ) ); //$NON-NLS-1$
        if ( "".equals( exportMultipleFilesText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_XML ) );
        }
        else
        {
            dialog.setFilterPath( exportMultipleFilesText.getText() );
        }

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


        // browse button
        Button browseButton = new Button(composite, SWT.PUSH);
        browseButton.setText(Messages.getString("jgrasswizard.browse")); //$NON-NLS-1$
        browseButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent e ) {
                DirectoryDialog directoryDialog = new DirectoryDialog(Display.getDefault()
                        .getActiveShell());
                directoryDialog.setText(Messages.getString("jgrasswizard.choosefolder")); //$NON-NLS-1$
                String selectedDirectory = directoryDialog.open();
                urlCombo.setText(selectedDirectory);
                url = selectedDirectory;
                try {
                    getResources(new NullProgressMonitor());
                    setPageComplete(true);
View Full Code Here

     * Responds to clicks of the "browse" button
     */
    protected void handleDestinationBrowseButtonPressed() {
       
        //open a directory chooser
        DirectoryDialog dialog = new DirectoryDialog(getContainer().getShell(),
                SWT.SAVE);
        dialog.setMessage("Choose a destination directory for the PDF document."); //$NON-NLS-1$
        dialog.setText("Destination Directory"); //$NON-NLS-1$
        dialog.setFilterPath(getDestinationDir());
        String selectedDirectoryName = dialog.open();

        //set chosen directory on the wizard page
        if (selectedDirectoryName != null) {
            setErrorMessage(null);
            setDestinationDir(selectedDirectoryName);
View Full Code Here

        Button folderButton = new Button(fileSelectionArea, SWT.PUSH);
        folderButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        folderButton.setText("...");
        folderButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog directoryDialog = new DirectoryDialog(fileSelectionArea.getShell(), SWT.OPEN);
                directoryDialog.setText("Select geopaparazzi folder");
                geopaparazziFolderPath = directoryDialog.open();
                if (geopaparazziFolderPath == null || geopaparazziFolderPath.length() < 1) {
                    geopaparazziFolderText.setText("");
                } else {
                    geopaparazziFolderText.setText(geopaparazziFolderPath);
                }
            }
        });

        outputFolderText = new Text(fileSelectionArea, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
        outputFolderText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        outputFolderText.setText("Select the output folder");
        outputFolderText.setEditable(false);
        Button outputFolderButton = new Button(fileSelectionArea, SWT.PUSH);
        outputFolderButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        outputFolderButton.setText("...");
        outputFolderButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog directoryDialog = new DirectoryDialog(fileSelectionArea.getShell(), SWT.SAVE);
                directoryDialog.setText("Select output folder");
                outputFolderPath = directoryDialog.open();
                if (outputFolderPath == null || outputFolderPath.length() < 1) {
                    outputFolderText.setText("");
                } else {
                    outputFolderText.setText(outputFolderPath);
                }
View Full Code Here

        public void widgetDefaultSelected(SelectionEvent e) {
            widgetSelected(e);
        }

        public void widgetSelected(SelectionEvent e) {
            DirectoryDialog d = new DirectoryDialog(e.widget.getDisplay()
                    .getActiveShell());
            String selection = d.open();
            if (selection != null) {
                destText.setText(selection);
            }
        }
View Full Code Here

        final Button outFolderButton = new Button(mainComposite, SWT.PUSH);
        outFolderButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        outFolderButton.setText("..."); //$NON-NLS-1$
        outFolderButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog folderDialog = new DirectoryDialog(outFolderButton.getShell(), SWT.OPEN);
                String path = folderDialog.open();
                if (path == null || path.length() < 1) {
                    outFolderText.setText(""); //$NON-NLS-1$
                    folderPath = null;
                } else {
                    outFolderText.setText(path);
View Full Code Here

        public void widgetDefaultSelected(SelectionEvent e) {
            widgetSelected(e);
        }

        public void widgetSelected(SelectionEvent e) {
            DirectoryDialog d = new DirectoryDialog(e.widget.getDisplay()
                    .getActiveShell());
            String selection = d.open();
            if (selection != null) {
                destText.setText(selection);
            }
        }
View Full Code Here

        Button wkspaceButton = new Button(parent, SWT.PUSH);
        wkspaceButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        wkspaceButton.setText("..."); //$NON-NLS-1$
        wkspaceButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                DirectoryDialog fileDialog = new DirectoryDialog(parent.getShell(), SWT.OPEN);
                String path = fileDialog.open();
                if (path == null || path.length() < 1) {
                    wkspaceText.setText(""); //$NON-NLS-1$
                } else {
                    wkspaceText.setText(path);
                }
View Full Code Here

        if (extension != null) {
            FileDialog browse = new FileDialog(parent.getShell(), SWT.OPEN);
            browse.setFilterExtensions(new String[]{wrapExtension(extension)});
            path = browse.open();
        } else {
            DirectoryDialog browse = new DirectoryDialog(parent.getShell(), SWT.OPEN);
            path = browse.open();
        }

        if (path != null) {
            String text = null;
            if (File.class.isAssignableFrom(targetClass)) {
View Full Code Here

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

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.