Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Label.computeSize()


      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


        x += 3;
      }

      // label

      Point p = localNameLabel.computeSize(w - IMG - GAP, SWT.DEFAULT, flushCache);
      if (apply) {
        localNameLabel.setBounds(x + IMG + GAP, y, p.x, p.y);
      }

      y += p.y + GAP;
View Full Code Here

        localLink.setBounds(x + w - p.x - 2, y, p.x, p.y);
      }

      // description
      Label localDescr = (Label) children[i + 2];
      p = localDescr.computeSize(w - IMG - GAP * 2, SWT.DEFAULT, flushCache);
      if (apply) {
        localDescr.setBounds(x + IMG + GAP, y, p.x, p.y);
      }

      y = y + p.y;
View Full Code Here

    CoolItem item = new CoolItem(bar, SWT.NONE);

    Label ctrl = new Label(bar, SWT.PUSH);
    ctrl.setText("Button 1"); //$NON-NLS-1$
    Point size = ctrl.computeSize(SWT.DEFAULT, SWT.DEFAULT);

    Point ps = item.computeSize(size.x, size.y);
    item.setPreferredSize(ps);
    item.setControl(ctrl);
View Full Code Here

   
    CoolItem item = new CoolItem (bar, SWT.NONE);
   
    Label ctrl = new Label (bar, SWT.PUSH);
    ctrl.setText ("Button 1"); //$NON-NLS-1$
      Point size = ctrl.computeSize (SWT.DEFAULT, SWT.DEFAULT);
   
      Point ps = item.computeSize (size.x, size.y);
    item.setPreferredSize (ps);
    item.setControl (ctrl);
View Full Code Here

            // Since we still want the user to know about the error .. i throw an exception for now ..
            throw new RuntimeException("An SWT Error occurred during setting game icon",error);
          }
          label.setToolTipText(proxy.getTooltipText(game, gameEx));
          System.out.println("Addin label with image: " + proxy.icon
              + ": " + label.computeSize(-1, -1));
          // label.setEnabled(true);
          // label.setText("Muh");
          label.setLayoutData(new RowData(16,16));
          if (game != null) {
            label.addListener(SWT.MouseUp, new Listener() {
View Full Code Here

    textDay.setLocation(0, 0);
    textDay.addFocusListener(this);

    Label label = new Label(this, 0);
    label.setText(".");
    Point labelSize = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
    label.setLocation(textSize.x + 1, (textSize.y - labelSize.y) / 2);
    label.setSize(labelSize.x, textSize.y);

    textMonth = new Text(this, SWT.BORDER);
    textMonth.setText("88");
View Full Code Here

        label.setText(text);
        label.setToolTipText(toolTip);
        label.pack();

        Point size = label.getSize();
        size = label.computeSize(size.x, size.y);
        coolItem.setSize(size);
        coolItem.setMinimumSize(size);
        coolItem.setPreferredSize(size);

        coolItem.setControl(label);
View Full Code Here

    Label description = new Label(composite, SWT.NONE);
    description.setText(SSEUIMessages.TaskTagPreferenceTab_33); //$NON-NLS-1$
//    description.setBackground(composite.getBackground());
    GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=104403
    Point sizeHint = description.computeSize(SWT.DEFAULT, SWT.DEFAULT);
    gd.widthHint = sizeHint.x;
    description.setLayoutData(gd);

    valueTable = new TableViewer(composite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
    valueTable.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
View Full Code Here


  private void setupUserIDLabel(Composite paramComposite) {
    String str = Messages.getString("RACLoginDialog.USERID.LABEL");
    Label localLabel = new Label(paramComposite, 0);
    calculateLabelHeight(localLabel.computeSize(-1, -1));
    FormData localFormData = new FormData();
    localFormData.height = getLabelHeight();
    localFormData.left = new FormAttachment(0, 1000, 10);
    localFormData.top = new FormAttachment(0, 1000, getDistanceFromTop());
    localLabel.setLayoutData(localFormData);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.