Examples of Shell


Examples of org.eclipse.swt.widgets.Shell

     
      HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());     
      factory.addFiller(sectionClient);
      ImageHyperlink linkEnforceEncoding = new ImageHyperlink(sectionClient, SWT.None);
      linkEnforceEncoding.setText("Enforce design encoding");
      final Shell fShell = getSite().getShell();
      linkEnforceEncoding.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        if (_editor.isDirty()) {
          MessageDialog.openInformation(fShell, "Save changes", "Please save your changes on this design first.");
          return;
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

      bind(form, SWTBinder.BINDING_STRATEGY_AS_YOU_TYPE);
  }

  private void handleAddLibrary() {
    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) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

      _lstLibraries.setItems(_model.getLibraryNames());
    }
  }
 
  private void handleRemoveLibrary() {
    Shell shell = getManagedForm().getForm().getShell();
    if (_lstLibraries.getSelectionCount() > 0) {
      boolean delete = MessageDialog.openConfirm(shell, "Remove selected libraries?", "Are you sure you want to remove the selected libraries? This will also delete the selected files from filesystem.");
      if (delete) {
        String[] fileNames = _lstLibraries.getSelection();
        for (int i=0; i < fileNames.length; i++) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

    }
   
    addActionToMenu(menu, new Action("configure snippets ...") {
      @Override
      public void run() {
        PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(new Shell(), ResourceIDs.PREFERENCES_PAGE_CODE_SNIPPETS, null, null);
        if (pref != null) {     
          pref.open();   
        }
      }
    });
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

      bind(form, SWTBinder.BINDING_STRATEGY_AS_YOU_TYPE);
  }

 
  private void handleConfigureWGADistributions() {
    PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(new Shell(), WGADesignerPlugin.PREFERENCES_PAGE_WGA_DEPLOYMENTS, null, null);
    if (pref != null) {     
      pref.open();   
    }
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

      pref.open();   
    }
  }
 
  private void openGeneralPreferencesPage() {
    PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(new Shell(), WGADesignerPlugin.PREFERENCES_PAGE_WGA_DEVELOPMENT_STUDIO, null, null);
    if (pref != null) {     
      pref.open();   
    }
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

      pref.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) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

      _lstTomcatLibraries.setItems(_model.getTomcatLibraryNames());
    }
  }
 
  private void handleRemoveTomcatLibrary() {
    Shell shell = getManagedForm().getForm().getShell();
    if (_lstTomcatLibraries.getSelectionCount() > 0) {
      boolean delete = MessageDialog.openConfirm(shell, "Remove selected libraries?", "Are you sure you want to remove the selected libraries? This will also delete the selected files from filesystem.");
      if (delete) {
        String[] fileNames = _lstTomcatLibraries.getSelection();
        for (int i=0; i < fileNames.length; i++) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

public class ChangeDirlinkTarget implements IViewActionDelegate {

  private IFolder _selectedFodler;

  public void run(IAction action) {
    Shell shell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);

    if (_selectedFodler != null) {
      ChangeDirlinkTargetDialog dialog = new ChangeDirlinkTargetDialog(shell, _selectedFodler);
      dialog.open();
    } else {
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell

  private static final int MAX_ITERATIONS = 10000;
  private static final int NB_CONTACTS = 5;
 
  public VivaldiVisualTest() {
    final Display display = new Display();
    Shell shell = new Shell(display);
    final VivaldiPanel panel = new VivaldiPanel(shell);
    shell.setLayout(new FillLayout());
    shell.setSize(800,800);
    shell.setText("Vivaldi Simulator");
    shell.open();
   
    Thread runner = new Thread("Viviladi Simulator") {
      public void run() {
        VivaldiPosition positions[][] = new VivaldiPosition[ELEMENTS_X][ELEMENTS_Y];
        final List lPos = new ArrayList(ELEMENTS_X*ELEMENTS_Y);       
        HeightCoordinatesImpl realCoordinates[][] = new HeightCoordinatesImpl[ELEMENTS_X][ELEMENTS_Y];
        //Init all
        for(int i = 0 ; i < ELEMENTS_X ; i++) {
          for(int j = 0 ; j < ELEMENTS_Y ; j++) {
            realCoordinates[i][j] = new HeightCoordinatesImpl(i*DISTANCE-ELEMENTS_X * DISTANCE/2,j*DISTANCE-ELEMENTS_Y*DISTANCE/2,MAX_HEIGHT);
            if(i >= ELEMENTS_X / 2 && 1 == 0) {
              positions[i][j] = new VivaldiPositionImpl(realCoordinates[i][j]);
              positions[i][j].setErrorEstimate(0.01f);
            } else {
              positions[i][j] = new VivaldiPositionImpl(new HeightCoordinatesImpl(1000+DISTANCE*i,1000+DISTANCE*j,20));
            }
           
            lPos.add(positions[i][j]);
          }
        }
       
        //Main loop
        for(int iter = 0 ; iter < MAX_ITERATIONS ; iter++) {
          if(iter%100 == 0) System.out.println(iter);
          if(display.isDisposed()) return;
          display.syncExec( new Runnable() {
            public void run() {
              panel.refresh(lPos);
            }
          });
          try {
            //Thread.sleep(100);
          } catch (Exception e) {
            // TODO: handle exception
          }
         
          //For each node :
          for(int i = 0 ; i < ELEMENTS_X ; i++) {
            for(int j = 0 ; j < ELEMENTS_Y ; j++) {
              VivaldiPosition position = positions[i][j];
              //Pick N random nodes
              for(int k = 0 ; k < NB_CONTACTS ; k++) {
                int i1 = (int) (Math.random() * ELEMENTS_X);
                int j1 = (int) (Math.random() * ELEMENTS_Y);
                if(i1 == i && j1 ==j) continue;
                VivaldiPosition position1 = positions[i1][j1];
                float rtt = realCoordinates[i1][j1].distance(realCoordinates[i][j]);
                //rtt *= (Math.random() - 0.5)/20 + 1; 
                position.update(rtt,position1.getCoordinates(),position1.getErrorEstimate());
              }
             
            }
          }
         
        }
      }
    };
    runner.setDaemon(true);
    runner.start();
   
    while (!shell.isDisposed ()) {
      if (!display.readAndDispatch ()) display.sleep ();
    }
    display.dispose ();
  }
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.