Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Text


    filler.setLayoutData(data);
  }
 
  public Text createText(Composite container, String label, String bindingKey) {
      _toolkit.createLabel(container, label);
      Text text = _toolkit.createText(container, "", DEFAULT_TEXT_STYLE);
      text.setData(bindingKey);
      return text;
  }
View Full Code Here


  }
 
  public Text createTextArea(Composite container, String label, String bindingKey) {
      Label swtLabel = _toolkit.createLabel(container, label);
      swtLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
      Text text = _toolkit.createText(container, "", DEFAULT_TEXTBOX_STYLE);
      text.setData(bindingKey);
      return text;
  }
View Full Code Here

    layout.numColumns = 3;
    layout.verticalSpacing = 9;
    _container.setLayout(layout);

    new Label(_container, SWT.NULL).setText("Name:");
    _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() {
View Full Code Here

        layout.numColumns = 3;
        layout.verticalSpacing = 9;

        Label label = new Label(_container, SWT.NULL);
        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) {
View Full Code Here

   

    Label lblBuild = new Label(composite, SWT.None);
    lblBuild.setText("Build:");

    _txtBuild = new Text(composite, SWT.BORDER);
    _txtBuild.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    _txtBuild.setText(Integer.toString(_model.getPluginBuild()));       
    _txtBuild.addModifyListener(this);
   
   
View Full Code Here

    layout.numColumns = 2;
    layout.verticalSpacing = 9;
    container.setLayout(layout);
   
    new Label(container, SWT.NULL).setText("Plugin unique name:");
    _txtPluginUniqueName = new Text(container, SWT.BORDER);
    GridData g = new GridData(GridData.FILL_HORIZONTAL);
    g.horizontalSpan = 1;
    _txtPluginUniqueName.setLayoutData(g);

    _txtPluginUniqueName.addModifyListener(new ModifyListener() {
View Full Code Here

    layout.numColumns = 2;
    layout.verticalSpacing = 9;
    container.setLayout(layout);

    new Label(container, SWT.NULL).setText("Design name:");
    _designName = new Text(container, SWT.BORDER);
    GridData g = new GridData(GridData.FILL_HORIZONTAL);
    g.horizontalSpan = 1;
    _designName.setLayoutData(g);

    _designName.addModifyListener(new ModifyListener() {
View Full Code Here

       
        label = new Label(container, SWT.NONE);
        label.setText("Database name:");
       
       
        _txtDatabaseName = new Text(container, SWT.BORDER);
        _txtDatabaseName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        _txtDatabaseName.addModifyListener(this);
       
        label = new Label(container, SWT.NONE);
View Full Code Here

    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL);
    txtStyle.minimumWidth = convertWidthInCharsToPixels(60);

    Label lblTemplateName = new Label(composite, SWT.None);
    lblTemplateName.setText("Template name:");
    _tmplName = new Text(composite, SWT.BORDER);
    _tmplName.setLayoutData(txtStyle);

    _tmplName.addModifyListener(this);

    Label filler = new Label(composite, SWT.None);
    filler.setText("");

    Label lblLocation = new Label(composite, SWT.None);
    lblLocation.setText("Location:");
    _tmplFile = new Text(composite, SWT.BORDER);
    _tmplFile.setLayoutData(txtStyle);
    _tmplFile.addModifyListener(this);

    _btnBrowse = new Button(composite, SWT.PUSH);
    _btnBrowse.setText("...");
View Full Code Here

    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL);
    txtStyle.minimumWidth = convertWidthInCharsToPixels(60);

    Label lblTemplateName = new Label(composite, SWT.None);
    lblTemplateName.setText("Server name:");
    _srvName = new Text(composite, SWT.BORDER);
    _srvName.setLayoutData(txtStyle);
    _srvName.addModifyListener(this);

    //Label filler = new Label(composite, SWT.None);
    //filler.setText("");

    Label lblUrl = new Label(composite, SWT.None);
    lblUrl.setText("URL:");
    _srvURL = new Text(composite, SWT.BORDER);
    _srvURL.setLayoutData(txtStyle);
    _srvURL.addModifyListener(this);

    //filler = new Label(composite, SWT.None);
    //filler.setText("");

    Label lblUser = new Label(composite, SWT.None);
    lblUser.setText("User:");
    _srvUser = new Text(composite, SWT.BORDER);
    _srvUser.setLayoutData(txtStyle);
    _srvUser.addModifyListener(this);

    //filler = new Label(composite, SWT.None);
    //filler.setText("");

    Label lblPW = new Label(composite, SWT.None);
    lblPW.setText("Password:");
    _srvPW = new Text(composite, SWT.PASSWORD | SWT.BORDER);
    _srvPW.setLayoutData(txtStyle);
    _srvPW.addModifyListener(this);

    _btnTestConnection = new Button(composite, SWT.PUSH);
    _btnTestConnection.addSelectionListener(new SelectionListener() {
View Full Code Here

TOP

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

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.