Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.ModifyListener


    _txtDesignName = new Text(_container, SWT.BORDER);
    GridData g = new GridData(GridData.FILL_HORIZONTAL);
    g.horizontalSpan = 2;
    _txtDesignName.setLayoutData(g);

    _txtDesignName.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
    });
   
    new Label(_container, SWT.NULL).setText("Runtime: ");
    _comboRuntimeList = new Combo(_container, SWT.READ_ONLY);
    updateRuntimeCombo();

    _comboRuntimeList.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        _selectedRuntime = WGADesignerPlugin.getAllRuntimes().get(_comboRuntimeList.getText());
        updateDomainCombo(_selectedRuntime);
        dialogChanged(e);
      }
    });

    HyperlinkGroup linkGroup = new HyperlinkGroup(_container.getDisplay());
    ImageHyperlink linkCreateNewRuntime = new ImageHyperlink(_container, SWT.NONE);
    linkCreateNewRuntime.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_RUNTIME_ADD));
    linkGroup.add(linkCreateNewRuntime);
    linkCreateNewRuntime.setText("create new WGA Runtime Project");
    linkCreateNewRuntime.addHyperlinkListener(new HyperlinkAdapter() {

      @Override
      public void linkActivated(HyperlinkEvent e) {
        try {
          IWorkbenchWizard wizard = WorkbenchUtils.openWizard(WGADesignerPlugin.getDefault().getWorkbench(), de.innovationgate.eclipse.wgadesigner.ResourceIDs.WIZARD_NEW_WGA_RUNTIME);
          if (wizard != null) {
            NewWGARuntime runtimeWizard = (NewWGARuntime) wizard;
            _selectedRuntime = runtimeWizard.getCreatedRuntime();
            updateRuntimeCombo();           
          }                   
        } catch (CoreException e1) {
          WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getShell(), "Open runtime wizard failed", "Unable to open 'New Runtime' wizard.", e1);
        }
      }
    });
     
   
    new Label(_container, SWT.NULL).setText("Use template:");
    _comboTemplateList = new Combo(_container, SWT.READ_ONLY);

    ArrayList<String> designTemplateNames = new ArrayList<String>(_designTemplates.keySet());
    Collections.sort(designTemplateNames,  new Comparator<String>() {

      public int compare(String o1, String o2) {
        if (o1.equals("empty")) {
          return -1;
        } else if (o2.equals("empty")) {
          return 1;
        } else {
          return o1.compareTo(o2);
        }
       
      }
     
    });
    _comboTemplateList.setItems(designTemplateNames.toArray(new String[0]));
    _comboTemplateList.select(0);
    _comboTemplateList.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
    });
    GridData comboTemplateData = new GridData();
    comboTemplateData.horizontalSpan = 2;
    _comboTemplateList.setLayoutData(comboTemplateData);
   
    Label label = new Label(_container, SWT.NONE);
    label.setText("Register as new application:");
    _chkCreateContentStore = new Button(_container, SWT.CHECK);
    _chkCreateContentStore.setText("yes");
    _chkCreateContentStore.setSelection(true);
   
    _chkCreateContentStore.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        super.widgetSelected(e);
        _grpCreateContentStore.setVisible(!_grpCreateContentStore.isVisible());
        dialogChanged(e);
      }
     
    });
   
    _grpCreateContentStore = new Group(_container, SWT.SHADOW_NONE);
    GridData grpData = new GridData(GridData.FILL_HORIZONTAL);
    grpData.horizontalSpan = 3;
    _grpCreateContentStore.setLayoutData(grpData);
    _grpCreateContentStore.setText("Contentstore options");
   
    _grpCreateContentStore.setLayout(new GridLayout(2, false));
    GridData innerGrpData = new GridData(GridData.FILL_HORIZONTAL);
    label = new Label(_grpCreateContentStore, SWT.NONE);
    label.setText("Database key:");
    _txtDatabaseKey = new Text(_grpCreateContentStore, SWT.BORDER);
    DefaultedText dflHandler = new DefaultedText(DEFAULT_DBKEY);
    dflHandler.apply(_txtDatabaseKey);
    _txtDatabaseKey.setLayoutData(GridDataFactory.copyData(innerGrpData));
    _txtDatabaseKey.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
     
    });
   
    label = new Label(_grpCreateContentStore, SWT.NONE);
    label.setText("Title:");
    _txtTitle = new Text(_grpCreateContentStore, SWT.BORDER);
    dflHandler = new DefaultedText(DEFAULT_TITLE);
    dflHandler.apply(_txtTitle);
    _txtTitle.setLayoutData(GridDataFactory.copyData(innerGrpData));
    _txtTitle.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
     
View Full Code Here


        label.setText("&Runtime name:");
        _txtRuntimeName = new Text(_container, SWT.BORDER | SWT.SINGLE);
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalSpan = 2;
        _txtRuntimeName.setLayoutData(gd);
        _txtRuntimeName.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                dialogChanged();
            }
        });
View Full Code Here

    _txtPluginUniqueName = new Text(container, SWT.BORDER);
    GridData g = new GridData(GridData.FILL_HORIZONTAL);
    g.horizontalSpan = 1;
    _txtPluginUniqueName.setLayoutData(g);

    _txtPluginUniqueName.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
    });
    new Label(container, SWT.NULL).setText("");
    new Label(container, SWT.NULL).setText("Should be in java package format for e.g. 'de.innovationgate.myplugin'");

    new Label(container, SWT.NULL).setText("Runtime: ");
    _comboRuntimeList = new Combo(container, SWT.READ_ONLY);
    ArrayList<String> projectnames = new ArrayList<String>(_wgaRuntimeProjects.keySet());
    Collections.sort(projectnames);
    projectnames.add(0, WGARUNTIME_NONE);

    _comboRuntimeList.setItems(projectnames.toArray(new String[0]));

    if (_selectedRuntime != null) {
      _comboRuntimeList.select(_comboRuntimeList.indexOf(_selectedRuntime.getName()));
    } else {
      _comboRuntimeList.select(0);
    }

    _comboRuntimeList.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        _selectedRuntime = _wgaRuntimeProjects.get(_comboRuntimeList.getText());
        dialogChanged(e);
      }
    });
View Full Code Here

    _designName = new Text(container, SWT.BORDER);
    GridData g = new GridData(GridData.FILL_HORIZONTAL);
    g.horizontalSpan = 1;
    _designName.setLayoutData(g);

    _designName.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
    });

    new Label(container, SWT.NULL).setText("Use template:");
    _comboTemplateList = new Combo(container, SWT.READ_ONLY);

    ArrayList<String> designTemplateNames = new ArrayList<String>(_designTemplates.keySet());
    Collections.sort(designTemplateNames,  new Comparator<String>() {

      public int compare(String o1, String o2) {
        if (o1.equals("empty")) {
          return -1;
        } else if (o2.equals("empty")) {
          return 1;
        } else {
          return o1.compareTo(o2);
        }
       
      }
     
    });
    _comboTemplateList.setItems(designTemplateNames.toArray(new String[0]));
    _comboTemplateList.select(0);
    _comboTemplateList.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
      }
    });
   
View Full Code Here

    gridData = new GridData();
    gridData.widthHint = 150;
    passwordMatch.setLayoutData(gridData);
    refreshPWLabel();

    t1.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        refreshPWLabel();
      }
    });
    t2.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        refreshPWLabel();
      }
    });
View Full Code Here

    panel.setLayout(layout);
    Label label;/* = new Label(panel,SWT.NULL);
    Messages.setLanguageText(label,"wizard.file");*/
    final Text file = new Text(panel,SWT.BORDER);
   
    file.addModifyListener(new ModifyListener() {
      /* (non-Javadoc)
       * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
       */
      public void modifyText(ModifyEvent arg0) {      
        String fName = file.getText();
View Full Code Here

    shell.setLayout(new FillLayout(SWT.VERTICAL));

    final Label label = new Label(shell, SWT.BORDER);

    final Text text = new Text(shell, SWT.BORDER);
    text.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        Image pathIcon = getPathIcon(text.getText(), false, false);
        label.setImage(pathIcon);
      }
View Full Code Here

    layout.numColumns = 3;
    panel.setLayout(layout);
    Label label = new Label(panel, SWT.NULL);
    Messages.setLanguageText(label, "wizard.directory");
    file = new Text(panel, SWT.BORDER);
    file.addModifyListener(new ModifyListener() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
       */
 
View Full Code Here

   
    Label label = new Label(panel, SWT.NULL);
    Messages.setLanguageText(label, "wizard.file");
   
    file = new Text(panel, SWT.BORDER);
    file.addModifyListener(new ModifyListener() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
       */
 
View Full Code Here

        }
         shell.dispose();
      }
    });  
   
    textStartIp.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent event) {
        range.setStartIp( textStartIp.getText());
        range.checkValid();
        if(range.isValid())
          ok.setEnabled(true);
        else
          ok.setEnabled(false);
      }
    });
   
    textEndIp.addModifyListener(new ModifyListener() {
          public void modifyText(ModifyEvent event) {
            range.setEndIp( textEndIp.getText());
            range.checkValid();
            if(range.isValid())
              ok.setEnabled(true);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.ModifyListener

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.