Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Label


    Composite  composite,
    GridData  gridData,
    String    resource,
    String    link )
  {
      linkLabel = new Label(composite, SWT.NULL);
      Messages.setLanguageText(linkLabel,resource);
      linkLabel.setLayoutData( gridData );
      makeLinkedLabel(linkLabel, link);
  }
View Full Code Here


            config.removeRGBParameter(keys[index]);
          }
        }
      });

      Label lblDesc = new Label(colorSet, SWT.NULL);
      Messages.setLanguageText(lblDesc, keys[i]);

      data = new RowData();
      data.width = 20;
      data.height = lblDesc.computeSize(SWT.DEFAULT, SWT.DEFAULT).y - 3;
      cColor.setLayoutData(data);
     
      // If color changes, update our legend
      config.addParameterListener(keys[i],paramListeners[i] = new ParameterListener() {
        public void parameterChanged(String parameterName) {
View Full Code Here

  Control[] controls;
 
  public PluginStringParameter(Composite pluginGroup,StringParameterImpl parameter) {
    controls = new Control[2];
          
    controls[0] = new Label(pluginGroup,SWT.NULL);
    Messages.setLanguageText(controls[0],parameter.getLabelKey());
   
    org.gudy.azureus2.ui.swt.config.StringParameter sp =
      new org.gudy.azureus2.ui.swt.config.StringParameter(
          pluginGroup,
          parameter.getKey(),
          parameter.getDefaultValue());
    controls[1] = sp.getControl();
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    controls[1].setLayoutData(gridData);
    new Label(pluginGroup,SWT.NULL);
  }
View Full Code Here

  Control[] controls;
 
  public PluginColorParameter(Composite pluginGroup,ColorParameter parameter) {
    controls = new Control[2];
          
    controls[0] = new Label(pluginGroup,SWT.NULL);
    Messages.setLanguageText(controls[0],parameter.getLabelKey());
   
    org.gudy.azureus2.ui.swt.config.ColorParameter cp =
      new org.gudy.azureus2.ui.swt.config.ColorParameter(
          pluginGroup,
          parameter.getKey(),
          parameter.getDefaultRed(),
          parameter.getDefaultGreen(),
          parameter.getDefaultBlue());
    controls[1] = cp.getControl();
    new Label(pluginGroup,SWT.NULL);
  }
View Full Code Here

    shell.setText(MessageText.getString("subscriptions.listwindow.title"));
   
    shell.setLayout(new FormLayout());
   
    mainComposite = new Composite(shell,SWT.NONE);
    Label separator = new Label(shell,SWT.SEPARATOR | SWT.HORIZONTAL);
    Button cancel = new Button(shell,SWT.PUSH);
    action = new Button(shell,SWT.PUSH);
    cancel.setText(MessageText.getString("Button.cancel"));
   
    FormData data;
   
    data = new FormData();
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    data.top = new FormAttachment(0,0);
    data.bottom = new FormAttachment(separator,0);
    mainComposite.setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    data.bottom = new FormAttachment(cancel,-2);
    separator.setLayoutData(data);
   
    data = new FormData();
    data.right = new FormAttachment(action);
    data.width = 100;
    data.bottom = new FormAttachment(100,-5);
    cancel.setLayoutData(data);
   
    data = new FormData();
    data.right = new FormAttachment(100,-5);
    data.width = 100;
    data.bottom = new FormAttachment(100,-5);
    action.setLayoutData(data);
   
    cancel.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        if(lookup != null) {
          lookup.cancel();
        }
        if(!shell.isDisposed()) {
          shell.dispose();
        }
      }
    });
   
    mainLayout = new StackLayout();
    mainComposite.setLayout(mainLayout);
   
    loadingPanel = new Composite(mainComposite,SWT.NONE);
    loadingPanel.setLayout(new FormLayout());
   
    listPanel = new Composite(mainComposite,SWT.NONE);
    listPanel.setLayout(new FillLayout());
   
    subscriptionsList = new Table(listPanel,SWT.V_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION | SWT.VIRTUAL);
    subscriptionsList.setHeaderVisible(true);
   
    TableColumn name = new TableColumn(subscriptionsList,SWT.NONE);
    name.setText(MessageText.getString("subscriptions.listwindow.name"));
    name.setWidth(310);
    name.setResizable(false);
   
    TableColumn popularity = new TableColumn(subscriptionsList,SWT.NONE);
    popularity.setText(MessageText.getString("subscriptions.listwindow.popularity"));
    popularity.setWidth(70);
    popularity.setResizable(false);
   
    subscriptionsList.addListener(SWT.SetData, new Listener() {
      public void handleEvent(Event e) {
        TableItem item = (TableItem) e.item;
        int index = subscriptionsList.indexOf(item);
        if(index >= 0 && index < subscriptionItems.length) {
          SubscriptionItemModel subscriptionItem = subscriptionItems[index];
          item.setText(0,subscriptionItem.name);
          item.setText(1,subscriptionItem.popularityDisplay);
        }
      }
    });
   
    subscriptionsList.setSortColumn(popularity);
    subscriptionsList.setSortDirection(SWT.DOWN);
   
    subscriptionsList.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        action.setEnabled(subscriptionsList.getSelectionIndex() != -1);
      }
    });
   
    Listener sortListener = new Listener() {
      public void handleEvent(Event e) {
        // determine new sort column and direction
        TableColumn sortColumn = subscriptionsList.getSortColumn();
        TableColumn currentColumn = (TableColumn) e.widget;
        int dir = subscriptionsList.getSortDirection();
        if (sortColumn == currentColumn) {
          dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
        } else {
          subscriptionsList.setSortColumn(currentColumn);
          dir = SWT.DOWN;
        }
        subscriptionsList.setSortDirection(dir);
        sortAndRefresh();
      }
    };
    name.addListener(SWT.Selection, sortListener);
    popularity.addListener(SWT.Selection, sortListener);
   
    animatedImage = new AnimatedImage(loadingPanel);
    loadingText = new Label(loadingPanel,SWT.WRAP | SWT.CENTER);
    loadingProgress = new ProgressBar(loadingPanel,SWT.HORIZONTAL);
   
    animatedImage.setImageFromName("spinner_big");
    String contentName = "Dummy";
    if(download != null) {
      contentName = download.getDisplayName();
    }
    loadingText.setText(MessageText.getString("subscriptions.listwindow.loadingtext", new String[] {contentName}));
   
    loadingProgress.setMinimum(0);
    loadingProgress.setMaximum(300);
    loadingProgress.setSelection(0);
   
    data = new FormData();
    data.left = new FormAttachment(1,2,-16);
    data.top = new FormAttachment(1,2,-32);
    data.width = 32;
    data.height = 32;
    animatedImage.setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(0,5);
    data.right = new FormAttachment(100,-5);
    data.top = new FormAttachment(animatedImage.getControl(),10);
    data.height = 50;
    loadingText.setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(0,5);
    data.right = new FormAttachment(100,-5);
    data.top = new FormAttachment(loadingText,5);
    loadingProgress.setLayoutData(data);
   
    boolean autoCheck = COConfigurationManager.getBooleanParameter("subscriptions.autocheck");
   
    if(autoCheck) {
      startChecking();
    } else {
      action.setText(MessageText.getString("Button.yes"));
      Composite acceptPanel = new Composite(mainComposite,SWT.NONE);
      acceptPanel.setLayout(new FormLayout());
     
      Label acceptLabel = new Label(acceptPanel,SWT.WRAP | SWT.CENTER);
     
      acceptLabel.setText(MessageText.getString("subscriptions.listwindow.autochecktext"));
     
      data = new FormData();
      data.left = new FormAttachment(0,5);
      data.right = new FormAttachment(100,-5);
      data.top = new FormAttachment(1,3,0);
      acceptLabel.setLayoutData(data);
     
      action.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
          action.removeListener(SWT.Selection,this);
          COConfigurationManager.setParameter("subscriptions.autocheck",true);
View Full Code Here

  Control[] controls;
 
  public PluginStringsParameter(Composite pluginGroup,StringListParameterImpl parameter) {
    controls = new Control[2];
          
    controls[0] = new Label(pluginGroup,SWT.NULL);
    Messages.setLanguageText(controls[0],parameter.getLabelKey());
   
    org.gudy.azureus2.ui.swt.config.StringListParameter slp =
      new org.gudy.azureus2.ui.swt.config.StringListParameter(
          pluginGroup,
          parameter.getKey(),
          parameter.getDefaultValue(),
          parameter.getLabels(),
          parameter.getValues());
    controls[1] = slp.getControl();
    GridData gridData = new GridData();
    gridData.widthHint = 100;
    controls[1].setLayoutData(gridData);
    new Label(pluginGroup,SWT.NULL);
  }
View Full Code Here

  org.gudy.azureus2.ui.swt.config.BooleanParameter booleanParameter;
 
  public PluginBooleanParameter(Composite pluginGroup,BooleanParameterImpl parameter) {
    controls = new Control[2];
          
    controls[0] = new Label(pluginGroup,SWT.NULL);
    Messages.setLanguageText(controls[0],parameter.getLabelKey());
   
    booleanParameter =
      new org.gudy.azureus2.ui.swt.config.BooleanParameter(
          pluginGroup,
          parameter.getKey(),
          parameter.getDefaultValue());
    controls[1] = booleanParameter.getControl();   
    new Label(pluginGroup,SWT.NULL);
  }
View Full Code Here

  Control[] controls;
 
  public PluginIntParameter(Composite pluginGroup,IntParameterImpl parameter) {
    controls = new Control[2];
          
    controls[0] = new Label(pluginGroup,SWT.NULL);
    Messages.setLanguageText(controls[0],parameter.getLabelKey());
   
    org.gudy.azureus2.ui.swt.config.IntParameter ip =
      new org.gudy.azureus2.ui.swt.config.IntParameter(
          pluginGroup,
          parameter.getKey(),
          parameter.getDefaultValue());
    controls[1] = ip.getControl();
    GridData gridData = new GridData();
    gridData.widthHint = 100;
    controls[1].setLayoutData(gridData);
    new Label(pluginGroup,SWT.NULL);
  }
View Full Code Here

  Control[] controls;
 
  public PluginIntsParameter(Composite pluginGroup,IntsParameter parameter) {
    controls = new Control[2];
          
    controls[0] = new Label(pluginGroup,SWT.NULL);
    Messages.setLanguageText(controls[0],parameter.getLabelKey());
   
    org.gudy.azureus2.ui.swt.config.IntListParameter ilp =
      new org.gudy.azureus2.ui.swt.config.IntListParameter(
          pluginGroup,
          parameter.getKey(),
          parameter.getDefaultValue(),
          parameter.getLabels(),
          parameter.getValues());
    controls[1] = ilp.getControl();
    GridData gridData = new GridData();
    gridData.widthHint = 100;
    controls[1].setLayoutData(gridData);
    new Label(pluginGroup,SWT.NULL);
  }
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, "configureWizard.finish.message");
  }
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.