Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Dialog


      }
    };

    textSelectionListener = new SelectionListener() {
      public void widgetSelected(SelectionEvent event) {
        Dialog settingsDialog = null;
        Button button = ((Button)event.widget);
        String selection = "";

        if (button.getData().equals("default_browser")) {
          settingsDialog = new FileDialog(Display.getDefault().getShells()[0], SWT.OPEN);
          settingsDialog.setText("Choose your default browser");
          selection = ((FileDialog)settingsDialog).open();
          if (selection != null) defaultBrowserText.setText(selection);
        }

        if (button.getData().equals("default_exc_dir")) {
          settingsDialog = new DirectoryDialog(Display.getDefault().getShells()[0], SWT.OPEN);
          settingsDialog.setText("Choose your default problem directory");
          selection = ((DirectoryDialog)settingsDialog).open();
          if (selection != null) defaultExcDirText.setText(selection);
        }

        if (selection != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Dialog

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.