Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Label


  public
  BufferedLabel(
    Composite  composite,
    int      attrs )
  {
    super( new Label( composite, attrs ));
   
    label = (Label)getWidget();
   
    ClipboardCopy.addCopyToClipMenu(
      label,
View Full Code Here


        leftCompLayout.horizontalSpacing = 2;
        leftCompLayout.verticalSpacing = 2;
       
        leftComp.setLayout(leftCompLayout);
       
        _toolbarLblProject = new Label(leftComp, SWT.NONE);
       
        FontData[] fontData = _toolbarLblProject.getFont().getFontData();
        for(int i = 0; i < fontData.length; ++i) {
            fontData[i].setStyle(SWT.BOLD);
        }
        final Font newFont = new Font(getSite().getShell().getDisplay(), fontData);
        _toolbarLblProject.setFont(newFont);
        _toolbarLblProject.addDisposeListener(new DisposeListener() {
            public void widgetDisposed(DisposeEvent e) {
                newFont.dispose();
            }
        });
       
        _toolbarLblLocation = new Label(leftComp, SWT.NONE);
       
        updateToolbar();
    }
View Full Code Here

    composite.setLayout(layout);
   
    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());
    }
    _txtCode.addModifyListener(this);
   
    Label lblHelp = new Label(composite, SWT.None);
    lblHelp.setText("Possible variables in code block:");   
    lblHelp = new Label(composite, SWT.None);
    lblHelp.setText("$CURSOR$ - cursor position after snippet insertion");   
    lblHelp = new Label(composite, SWT.None);
    lblHelp.setText("");
    lblHelp = new Label(composite, SWT.None);
    lblHelp.setText("$SELECTION$ - will be replaced by the selected text");
   
    return composite;
  }
View Full Code Here

    layout.numColumns = 3;
    shell.setLayout(layout);
   
      // URL field
   
    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;
View Full Code Here

    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    rootPanel.setLayout(layout);
   
       
    Label info_label = new Label( rootPanel, SWT.WRAP );
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    info_label.setLayoutData(gridData);
    info_label.setText( MessageText.getString( "beta.wizard.info" ));
    LinkLabel link = new LinkLabel( rootPanel, "beta.wizard.link", MessageText.getString( "beta.wizard.link.url" ));
    Label link_label = link.getlabel();
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.verticalIndent=10;
    link_label.setLayoutData(gridData);

    final Composite gRadio = new Composite(rootPanel, SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.verticalIndent=10;
    gRadio.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 1;
    gRadio.setLayout( layout );


    Button off_button = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(off_button, "beta.wizard.off");
    final Button on_button = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(on_button, "beta.wizard.on");
   
    SelectionAdapter l = new SelectionAdapter()
      {
        public void
        widgetSelected(
          SelectionEvent arg0 )
        {
          wizard.setBetaEnabled( on_button.getSelection());
        }
      };
    off_button.addSelectionListener(l);
    on_button.addSelectionListener(l);
   
    on_button.setSelection( wizard.getBetaEnabled());
    off_button.setSelection( !wizard.getBetaEnabled());

    LinkLabel forum = new LinkLabel( rootPanel, "beta.wizard.forum", MessageText.getString( "beta.wizard.forum.url" ));
    Label forum_label = link.getlabel();
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.verticalIndent=10;
    forum_label.setLayoutData(gridData);

    Label version_label = new Label( rootPanel, SWT.WRAP );
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.verticalIndent=10;
    version_label.setLayoutData(gridData);
    version_label.setText( MessageText.getString( "beta.wizard.version", new String[]{ Constants.AZUREUS_VERSION } ));
  }
View Full Code Here

    layout.numColumns = 2;
    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);
View Full Code Here

  public void createControl(Composite parent) {
    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: ");
    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){
      _txtTargetLocation.setText(_selectedContainer.getFullPath().toString());
    }
   
   
    new Label(container, SWT.None).setText("DirectAccess:");
    _chkDirectAccess = new Button(container, SWT.CHECK);
    _chkDirectAccess.setText("enabled");
    _chkDirectAccess.setData("directAccess");

    new Label(container, SWT.None).setText("Caching:");
    _chkCachable = new Button(container, SWT.CHECK);
    _chkCachable.setText("enabled");
    _chkCachable.setData("browser cachable");

    setControl(container);
View Full Code Here

    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    container.setLayout(layout);
   
    Label lblFolder = new Label(container, SWT.None);
    lblFolder.setText("Design folder:");
    Label lblPath = new Label(container, SWT.None);
    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) {
        pageChanged();     
      }
     
    });
    _txtBuild.addVerifyListener(new VerifyListener() {

      public void verifyText(VerifyEvent e) {
        if (!Character.isIdentifierIgnorable(e.character)) {
          if (Character.isDigit(e.character)) {
            e.doit = true;
          } else {
            e.doit = false;
          }
        }
      }
     
    });
    new Label(container, SWT.None);
   
   
    Group optFileNameGroup = new Group(container, SWT.None);
    optFileNameGroup.setText("File name");
    GridLayout groupLayout = new GridLayout();
View Full Code Here

    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    container.setLayout(layout);
   
    Label lblFolder = new Label(container, SWT.None);
    lblFolder.setText("Design folder:");
    Label lblPath = new Label(container, SWT.None);
    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);
    performValidation();
  }
View Full Code Here

    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    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);
View Full Code Here

TOP

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

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.