Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Text


    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL);
    txtStyle.minimumWidth = convertWidthInCharsToPixels(80);
   
    Label lblName = new Label(composite, SWT.None);
    lblName.setText("Name:");
    _txtName = new Text(composite, SWT.BORDER);   
    _txtName.setLayoutData(GridDataFactory.copyData(txtStyle));
   
   
    if (_snippet != null) {
      _txtName.setText(_snippet.getName());     
    }
    _txtName.addModifyListener(this);     
   
    Label lblDescription = new Label(composite, SWT.None);
    lblDescription.setText("Description:");
    _txtDescription = new Text(composite, SWT.BORDER|SWT.MULTI);
    GridData descLayout = new GridData(GridData.FILL_BOTH);
    descLayout.minimumHeight = WidgetFactory.computeFontHeight(_txtDescription) * 3;
    _txtDescription.setLayoutData(descLayout);
    if (_snippet != null) {
      _txtDescription.setText(_snippet.getDescription());
    }
    _txtDescription.addModifyListener(this);
   
    Label lblContext = new Label(composite, SWT.None);
    lblContext.setText("Context:");
    _comboContext = new Combo(composite, SWT.BORDER|SWT.READ_ONLY);
    _comboContext.setItems(new String[] {Snippet.CONTEXT_TML, Snippet.CONTEXT_TMLScript});   
    if (_snippet != null) {
      _comboContext.setText(_snippet.getContext());
    } else {
      _comboContext.setText(Snippet.CONTEXT_TML);
    }
    _comboContext.addModifyListener(this);
   
    Label lblEnabled = new Label(composite, SWT.None);
    lblEnabled.setText("");
    _chkEnabled = new Button(composite, SWT.CHECK);
    _chkEnabled.setText("enabled");
    if (_snippet != null) {
      _chkEnabled.setSelection(_snippet.isEnabled());
    } else {
      _chkEnabled.setSelection(true);
    }
   
   
    Label lblCode = new Label(composite, SWT.None);
    lblCode.setText("Code:");
    _txtCode = new Text(composite, SWT.BORDER|SWT.MULTI|SWT.V_SCROLL);
    GridData codeLayout = new GridData(GridData.FILL_BOTH);
    codeLayout.minimumHeight = WidgetFactory.computeFontHeight(_txtCode) * 8;
    _txtCode.setLayoutData(codeLayout);
    if (_snippet != null) {
      _txtCode.setText(_snippet.getCode());
View Full Code Here


    Label label = new Label(shell, SWT.NULL);
    label.setText(MessageText.getString("openUrl.url"));
    gridData = new GridData();
    label.setLayoutData(gridData);
   
    final Text url = new Text(shell, SWT.BORDER);

    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.widthHint=400;
    gridData.horizontalSpan  = 2;
    url.setLayoutData(gridData);
    if(linkURL == null)
      Utils.setTextLinkFromClipboard(shell, url, true);
    else
      url.setText(linkURL);
    url.setSelection(url.getText().length());
   
   
   
    // help field
    Label help_label = new Label(shell, SWT.NULL);
    help_label.setText(MessageText.getString("openUrl.url.info"));
    gridData = new GridData();
    gridData.horizontalSpan  = 3;
    help_label.setLayoutData(gridData);
      
    Label space = new Label(shell, SWT.NULL);
    gridData = new GridData();
    gridData.horizontalSpan  = 3;
    space.setLayoutData(gridData);
   
      // referrer field
   
    Label referrer_label = new Label(shell, SWT.NULL);
    referrer_label.setText(MessageText.getString("openUrl.referrer"));
    gridData = new GridData();
    referrer_label.setLayoutData(gridData);
   
    final Combo referrer_combo = new Combo(shell, SWT.BORDER);

    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.widthHint=150;
  gridData.grabExcessHorizontalSpace = true;
  referrer_combo.setLayoutData(gridData);
   
    final StringList referrers = COConfigurationManager.getStringListParameter("url_open_referrers");
    StringIterator iter = referrers.iterator();
    while(iter.hasNext()) {
      referrer_combo.add(iter.next());
    }
   
    if ( referrer != null && referrer.length() > 0 ){
     
      referrer_combo.setText( referrer );
     
    }else if ( last_referrer != null ){
     
      referrer_combo.setText( last_referrer );
    }
   
    Label referrer_info = new Label(shell, SWT.NULL);
    referrer_info.setText(MessageText.getString("openUrl.referrer.info"));
   
  // line
 
  Label labelSeparator = new Label(shell,SWT.SEPARATOR | SWT.HORIZONTAL);
  gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_END);
  gridData.horizontalSpan = 3;
  labelSeparator.setLayoutData(gridData);

      // buttons
   
    Composite panel = new Composite(shell, SWT.NULL);
    layout = new GridLayout();
    layout.numColumns = 3;
    panel.setLayout(layout);       
    gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_END);
    gridData.horizontalSpan = 3;
  gridData.grabExcessHorizontalSpace = true;
    panel.setLayoutData(gridData);
  
    new Label(panel, SWT.NULL);
   
    Button ok = new Button(panel,SWT.PUSH);
    gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_END);
    gridData.widthHint = 70;   
  gridData.grabExcessHorizontalSpace = true;
    ok.setLayoutData(gridData);
    ok.setText(MessageText.getString("Button.ok"));
    ok.addListener(SWT.Selection,new Listener() {
      public void handleEvent(Event e) {    
        last_referrer  = referrer_combo.getText().trim();
       
        if(! referrers.contains(last_referrer)) {
          referrers.add(last_referrer);
          COConfigurationManager.setParameter("url_open_referrers",referrers);
          COConfigurationManager.save();
        }
       
        COConfigurationManager.setParameter( CONFIG_REFERRER_DEFAULT, last_referrer );
        COConfigurationManager.save();
       
        String  url_str = url.getText();
       
        url_str = UrlUtils.parseTextForURL( url_str, true );
       
        if (url_str == null) {
          url_str = UrlUtils.parseTextForMagnets(url.getText());
        }
       
        if ( url_str == null ){
         
          url_str = url.getText();
        }
       
        new FileDownloadWindow(parent,url_str, last_referrer, null, listener );
        shell.dispose();
      }
View Full Code Here

    container.setLayout(layout);
    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL | SWT.LEFT);
    Display display = getWizard().getContainer().getShell().getDisplay();

    new Label(container, SWT.NONE).setText("Module name: ");
    _moduleName = new Text(container, SWT.BORDER);
    _moduleName.addModifyListener(this);
    _moduleName.setLayoutData(txtStyle);

    new Label(container, SWT.None).setText("Target location: ");
    _txtTargetLocation = new Text(container, SWT.READ_ONLY);
    _txtTargetLocation.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
    GridData innerLayout = new GridData(GridData.FILL_HORIZONTAL);
    _txtTargetLocation.setLayoutData(innerLayout);
   
    if(_selectedContainer!=null){
      _txtTargetLocation.setText(_selectedContainer.getFullPath().toString());
    }

    new Label(container, SWT.NONE).setText("Script type: ");
    _typeLable = new Text(container, SWT.READ_ONLY);

    _typeLable.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));

    _tmlscriptOptionsGrp = new Group(container, SWT.None);
    _tmlscriptOptionsGrp.setText("tmlscript options:");
View Full Code Here

    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    container.setLayout(layout);
    new Label(container, SWT.NONE).setText("Module Name: ");
    GridData innerGrpData = new GridData(GridData.FILL_HORIZONTAL);
    _moduleName = new Text(container, SWT.BORDER);
    _moduleName.setLayoutData(innerGrpData);
    _moduleName.addModifyListener(this);

    new Label(container, SWT.None).setText("Target location: ");
    _txtTargetLocation = new Text(container, SWT.READ_ONLY);
    Display display = getWizard().getContainer().getShell().getDisplay();
    _txtTargetLocation.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
    _txtTargetLocation.setLayoutData(innerGrpData);

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

    lblPath.setText(_design.getLocation().toFile().getAbsolutePath());
    new Label(container, SWT.None);
   
    Label lblExportLocation = new Label(container, SWT.None);
    lblExportLocation.setText("Export directory:");
    _txtExportLocation = new Text(container, SWT.BORDER|SWT.READ_ONLY);
    _txtExportLocation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
   
    String exportLocation = Plugin.getDefault().getPreferenceStore().getString(Preferences.PLUGIN_EXPORT_LOCATION);
    _txtExportLocation.setText(exportLocation);
   
    _txtExportLocation.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        pageChanged();       
      }
     
    });
   
    _btnBrowse = new Button(container, SWT.None);
    _btnBrowse.setText("...");
    _btnBrowse.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        handleBrowse();
      }
     
    });
   
   
    Label lblBuild = new Label(container, SWT.None);
    lblBuild.setText("Build:");
   
    _txtBuild = new Text(container, SWT.BORDER);
    _txtBuild.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    _txtBuild.setText(Integer.toString(getModel().getPluginBuild()));   
    _txtBuild.addModifyListener(new ModifyListener() {

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

    lblPath.setText(_design.getLocation().toFile().getAbsolutePath());
    new Label(container, SWT.None);
   
    Label lblExportLocation = new Label(container, SWT.None);
    lblExportLocation.setText("Export directory:");
    _txtExportLocation = new Text(container, SWT.BORDER|SWT.READ_ONLY);
    _txtExportLocation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
   
    String exportLocation = Plugin.getDefault().getPreferenceStore().getString(Preferences.DESIGN_EXPORT_LOCATION);
    _txtExportLocation.setText(new File(exportLocation, _model.getDesignKey() + ".wgadesign").getAbsolutePath());
   
    _txtExportLocation.addModifyListener(this);
   
    _btnBrowse = new Button(container, SWT.None);
    _btnBrowse.setText("...");
    _btnBrowse.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        handleBrowse();
      }
     
    });
   
   
    Label lblBuild = new Label(container, SWT.None);
    lblBuild.setText("Signature:");   
    Label lblSignatureValue = new Label(container, SWT.None);
    _buildProperties = _model.createBuildProperties();
    lblSignatureValue.setText(_buildProperties.getProperty(WGADesignConfigurationModel.BUILD_PROP_SIGNATURE));
    new Label(container, SWT.None);
   
   
    Label lblComment = new Label(container, SWT.None);
    lblComment.setText("Comment:");   
    _txtComment = new Text(container, SWT.BORDER);
    _txtComment.setLayoutData(new GridData(GridData.FILL_HORIZONTAL))
    _txtComment.addModifyListener(this);
    new Label(container, SWT.None);
       
    setControl(container);
View Full Code Here

            GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
            data.minimumWidth = 500;
            data.minimumHeight = 200;
            composite.setLayoutData(data);
            composite.setLayout(new FillLayout());
            _text = new Text(composite, SWT.MULTI|SWT.V_SCROLL);
            _text.setText(_initialValue);
            return composite;
        }
View Full Code Here

    layout.verticalSpacing = 9;
    container.setLayout(layout);
    Display display = getWizard().getContainer().getShell().getDisplay();
    new Label(container, SWT.NULL).setText("Portlet name:");

    _txtPortletName = new Text(container, SWT.BORDER);
    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL | SWT.LEFT);

    _txtPortletName.setLayoutData(txtStyle);
    _txtPortletName.addModifyListener(this);
    String defaultPortletName = ((NewWGAPortlet) getWizard()).getDefaultPortletName();
    if (defaultPortletName != null) {
      _txtPortletName.setText(defaultPortletName);
    }

    new Label(container, SWT.None).setText("Target location: ");
    _txtTargetLocation = new Text(container, SWT.READ_ONLY);
    _txtTargetLocation.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
    GridData innerLayout = new GridData(GridData.FILL_HORIZONTAL);
    _txtTargetLocation.setLayoutData(innerLayout);

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

    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    container.setLayout(layout);
    new Label(container, SWT.NONE).setText("Module name for the outerlayout:");
    _txtOuterLayoutName = new Text(container, SWT.BORDER);
    _txtOuterLayoutName.setText(DEFAULT_OUTERLAYOUT_NAME);
    _txtOuterLayoutName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    _txtOuterLayoutName.addModifyListener(this);

    new Label(container, SWT.NONE).setText("Module name for the innerlayout:");
    _txtInnerLayoutName = new Text(container, SWT.BORDER);
    _txtInnerLayoutName.setText(DEFAULT_INNERLAYOUT_NAME);
    _txtInnerLayoutName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    _txtInnerLayoutName.addModifyListener(this);
   
    setControl(container);
View Full Code Here

    // textfield key

    Label keylbl = new Label(composite, SWT.None);
    keylbl.setText("Labelkey:");
    _txtKeyTabNew = new Text(composite, SWT.BORDER);

    _txtKeyTabNew.setLayoutData(GridDataFactory.copyData(txtStyle));   
    _txtKeyTabNew.setFocus();

    _currentLabelContent = WGADesignStructureHelper.loadLabel(getCurrentSelectedLabelContainer().getFile(getCurrentSelectedLabelFileName()));
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.