Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Label


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


        _container = new Composite(parent, SWT.NULL);
        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        _container.setLayout(layout);

        Label label = new Label(_container, SWT.NONE);
        label.setText("Local runtime:");       
        _lblLocalRuntime = new Label(_container, SWT.NONE);
        _lblLocalRuntime.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
        label.setText("Local web application:");       
        _lblWebApplication = new Label(_container, SWT.NONE);
        _lblWebApplication.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));       
       
        label = new Label(_container, SWT.NONE);
        label.setText("Remote location:");       
        _lblRemoteLocation = new Label(_container, SWT.NONE);
        _lblRemoteLocation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
        label.setText("Remote database server:");       
        _lblRemoteDatabaseServer = new Label(_container, SWT.NONE);
        _lblRemoteDatabaseServer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
        label.setText("Remote database name:");       
        _lblRemoteDatabaseName = new Label(_container, SWT.NONE);
        _lblRemoteDatabaseName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
       
        GridData chkGridData = new GridData(GridData.FILL_HORIZONTAL);       
        _chkCopyLocalContent = new Button(_container, SWT.CHECK);
        _chkCopyLocalContent.setText("copy local content");
        _chkCopyLocalContent.setLayoutData(chkGridData);
        _chkCopyLocalContent.setEnabled(false);
       
        label = new Label(_container, SWT.NONE);
       
        _chkIncludeACL = new Button(_container, SWT.CHECK);
        _chkIncludeACL.setText("include ACL on content copy");
        _chkIncludeACL.setLayoutData(GridDataFactory.copyData(chkGridData));
        _chkIncludeACL.setEnabled(false);
View Full Code Here

        Composite container = new Composite(parent, SWT.NULL);
        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        container.setLayout(layout);
       
        Label label = new Label(container, SWT.NONE);
        label.setText("Available database servers on remote location:");
       
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalSpan = 2;
        label.setLayoutData(gd);
      
       
        _tblDatabaseServers = new TableViewer(container);
        _tblDatabaseServers.setLabelProvider(new DBServerLabelProvider());
        _tblDatabaseServers.setContentProvider(new DBServerContentProvider());
        _tblDatabaseServers.setInput(_config);

        _tblDatabaseServers.addSelectionChangedListener(this);
       
        gd = new GridData(GridData.FILL_BOTH);
        gd.horizontalSpan = 2;
        _tblDatabaseServers.getTable().setLayoutData(gd);
       
        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);
        label.setText("Options:");
       
        GridData chkGridData = new GridData(GridData.FILL_HORIZONTAL);
           
        _chkCopyLocalContent = new Button(container, SWT.CHECK);
        _chkCopyLocalContent.setText("copy local content");
        _chkCopyLocalContent.setLayoutData(chkGridData);
        _chkCopyLocalContent.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                if (_chkCopyLocalContent.getSelection()) {
                    _chkIncludeACL.setEnabled(true);
                } else {
                    _chkIncludeACL.setEnabled(false);
                }               
                performValidation();
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
                if (_chkCopyLocalContent.getSelection()) {
                    _chkIncludeACL.setEnabled(true);
                } else {
                    _chkIncludeACL.setEnabled(false);
                }   
                performValidation();
            }
        });
       
        Label filler = new Label(container, SWT.NONE);
       
        _chkIncludeACL = new Button(container, SWT.CHECK);
        _chkIncludeACL.setText("include ACL on content copy");
        _chkIncludeACL.setLayoutData(GridDataFactory.copyData(chkGridData));
        _chkIncludeACL.addSelectionListener(this);
View Full Code Here

        _container = new Composite(parent, SWT.NULL);
        GridLayout layout = new GridLayout();
        layout.numColumns = 1;
        _container.setLayout(layout);
       
        _lblHeader = new Label(_container, SWT.NONE);
       
        _tblWebApplications = new TableViewer(_container);
        _tblWebApplications.setLabelProvider(new WebApplicationsLabelProvider());
        _tblWebApplications.setContentProvider(new WebApplicationsContentProvider());
       
View Full Code Here

    composite.setLayout(layout);

    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);
View Full Code Here

    GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
    composite.setLayoutData(data);
    GridLayout layout = new GridLayout(1, false);
    composite.setLayout(layout);   
   
    Label label = new Label(composite,SWT.NONE);
    label.setLayoutData(data);
    label.setText("Choose ContentStore");
    _combo = new Combo(composite,SWT.BORDER | SWT.READ_ONLY);
    _combo.setItems(_contentStore.toArray(new String[0]));
   
    _combo.setLayoutData(GridDataFactory.copyData(data));
    _combo.select(0);
View Full Code Here

    composite.setLayout(layout);

    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);
View Full Code Here

   
    Composite composite = new Composite(parent, SWT.FILL);
    composite.setLayout(new GridLayout(2, false));

    if (hasMDHeader()) {
      Label label = new Label(composite, SWT.None);
      label.setText("Note:");
      label = new Label(composite, SWT.None);
      label.setText("Metadata headers are present in this tml file. Editing metadata with this editor is not possible. Please remove metadata headers first.");
      noDefaultAndApplyButton();
    } else {
      Label label = new Label(composite, SWT.None);
      label.setText("Description:");
      label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
      _txtDescription = new Text(composite, SWT.MULTI|SWT.BORDER);
      _txtDescription.setData("description");
      GridData descriptionLayout = new GridData(SWT.FILL, SWT.FILL, true, false);
      descriptionLayout.heightHint = WidgetFactory.computeFontHeight(_txtDescription) * 5;
        _txtDescription.setLayoutData(descriptionLayout);
     
     
      label = new Label(composite, SWT.None);
      label.setText("DirectAccess:");
      _chkDirectAccess = new Button(composite, SWT.CHECK);
      _chkDirectAccess.setText("enabled");
      _chkDirectAccess.setData("directAccess");
     
      label = new Label(composite, SWT.None);
      label.setText("Caching:");
      _chkCachable = new Button(composite, SWT.CHECK);
      _chkCachable.setText("enabled");
      _chkCachable.setData("cachable");
     
     
      Label filler = new Label(composite, SWT.None);
      GridData fillerLayout = new GridData(SWT.FILL, SWT.FILL, true, true);
      fillerLayout.horizontalSpan = 2;
      filler.setLayoutData(fillerLayout);
       
      bind(composite);           
    }
    return composite;
  }
View Full Code Here

  panel.setLayoutData(gridData);
  layout = new GridLayout();
  layout.numColumns = 3;
  panel.setLayout(layout);

  Label label = new Label(panel, SWT.WRAP);
  gridData = new GridData();
  gridData.horizontalSpan = 3;
  gridData.widthHint = 380;
  label.setLayoutData(gridData);
  Messages.setLanguageText(label, "exportTorrentWizard.finish.message");
  }
View Full Code Here

    data.top  = new FormAttachment(0,0);
    data.bottom  = new FormAttachment(100,0);

    cancel_button.setLayoutData( data );
     
    final Label label = new Label(parent, SWT.NULL );
   
    label.setText( "blah blah " );
   
    data = new FormData();
    data.left   = new FormAttachment(0,0);
    data.top  = new FormAttachment(cancel_button,0, SWT.CENTER);

    label.setLayoutData( data );

    final ProgressBar progress = new ProgressBar(parent, SWT.NULL );
   
    progress.setMinimum( 0 );
    progress.setMaximum( 100 );
    progress.setSelection( 0 );
   
   
    data = new FormData();
    data.left   = new FormAttachment(label,4);
    data.top  = new FormAttachment(cancel_button, 0, SWT.CENTER);
    data.right  = new FormAttachment(cancel_button,-4);

    progress.setLayoutData( data );
   
    parent.layout( true, true );
   
    new AEThread2( "SimpleInstallerUI", true )
    {
      public void
      run()
      {
        try{
          Update[] updates = instance.getUpdates();

          for ( Update update: updates ){
           
            String  name = update.getName();
           
            int  pos = name.indexOf('/');
           
            if ( pos >= 0 ){
             
              name = name.substring( pos+1 );
            }
           
            setLabel( name );

            ResourceDownloader[] downloaders = update.getDownloaders();
           
            for ( ResourceDownloader downloader: downloaders ){
             
              synchronized( SimpleInstallUI.this ){
               
                if ( cancelled ){
                 
                  return;
                }
               
                current_downloader = downloader;
              }
             
              setProgress( 0 );
             
              downloader.addListener(
                new ResourceDownloaderAdapter()
                {
                  public void
                  reportPercentComplete(
                    ResourceDownloader  downloader,
                    int          percentage )
                  {
                    setProgress( percentage );
                  }
                 
                  public void
                  reportAmountComplete(
                    ResourceDownloader  downloader,
                    long        amount )
                  {
                   
                  }
                });
             
              downloader.download();
            }
          }
         
          boolean  restart_required = false;
         
          for (int i=0;i<updates.length;i++){
   
            if ( updates[i].getRestartRequired() == Update.RESTART_REQUIRED_YES ){
             
              restart_required = true;
            }
          }
         
          if ( restart_required ){
           
            monitor.handleRestart();
          }
        }catch( Throwable e ){
         
          Debug.out( "Install failed", e );
         
          instance.cancel();
        }
      }
     
      protected void
      setLabel(
        final String    str )
      {
        Utils.execSWTThread(
          new Runnable()
          {
            public void
            run()
            {
              if (label != null && !label.isDisposed()) {
                label.setText( str );
                label.getParent().layout();
              }
            }
          });
      }
     
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.