Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Label


    setBorder(new LineBorder(ColorConstants.black,1));
    backgroundColor = new Color(null,255,255,255);
    setBackgroundColor(backgroundColor);
    setOpaque(true);
    String name = typeService.getSimpleName();
    Label nameLabel = new Label(name, createTypeIcon());
    add(nameLabel);
  }
View Full Code Here


      }
      else {
        icon = createDefaultPropertyIcon();
      }
      String name = propertySrv.getSimpleName();
      Label propertyLabel =
        new Label(visibility + ' ' +name);
      add(propertyLabel, icon);
    }
  }
View Full Code Here

    for(IClassService<?, ?> classSrv : displayedMembersServices) {
      if(extendedDisplay) {
        add(new ClassFigure(classSrv));
      }
      else {
        Label classLabel =
          new Label(
              classSrv.getSimpleName(),
              ClassFigure.createClassIcon()
          );
        add(classLabel);
      }
View Full Code Here

              e.getMessage(),
              e
          );
        }
      }
      Label operationLabel =
        new Label(value);
      add(operationLabel);
    }
  }
View Full Code Here

  /**
   * Initializes the labels.
   */
  private void initLabels() {
    // Label id
    labelId = new Label();
    labelId.setForegroundColor(ColorConstants.black);

    // Sets the tool tip and adds it so that it is visible
    labelToolTip = new Label();
    labelToolTip.setForegroundColor(ColorConstants.black);
    setToolTip(labelToolTip);
  }
View Full Code Here

   * @param horizontalSpan
   *            The horizontal span, <code>1</code> or <code>2</code>.
   */
  private void updatePortLabel(Entry<String, Label> entry,
      int horizontalAlignment, int horizontalSpan) {
    Label label = new Label(entry.getKey());
    entry.setValue(label);
    GridData data = new GridData(horizontalAlignment, SWT.CENTER, false,
        false);
    data.horizontalSpan = horizontalSpan;
    shape.add(label, data);
View Full Code Here

    // Adds undirected ports with an horizontal span of 2.
    for (Entry<String, Label> entry : portList) {
      updatePortLabel(entry, SWT.CENTER, 2);
      String portName = entry.getKey();
      Label label = entry.getValue();
      inputPorts.put(portName, label);
      outputPorts.put(portName, label);
    }
  }
View Full Code Here

      cause.printStackTrace(new PrintStream(bos));
    }

    Display d = Display.getCurrent();
    Image image = d.getSystemImage(SWT.ICON_ERROR);
    Label labelImage = new Label(image);
    root.add(labelImage, new Rectangle(5, 5, -1, -1));

    Label label = new Label(status.getMessage() + ": " + exc.getMessage()
        + "\n" + bos.toString());
    root.add(label, new Rectangle(10 + image.getBounds().width, 5, -1, -1));

    return root;
  }
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createSelectionFeedbackFigure() {
    if (getHostFigure() instanceof Label) {
      Label feedbackFigure = new Label();
      feedbackFigure.setOpaque(true);
      feedbackFigure
          .setBackgroundColor(ColorConstants.menuBackgroundSelected);
      feedbackFigure
          .setForegroundColor(ColorConstants.menuForegroundSelected);
      return feedbackFigure;
    } else {
      RectangleFigure feedbackFigure = new RectangleFigure();
      feedbackFigure.setFill(false);
      return feedbackFigure;
    }
  }
View Full Code Here

  /**
   * @generated
   */
  protected void updateLabel(Label target) {
    Label source = (Label) getHostFigure();
    target.setText(source.getText());
    target.setTextAlignment(source.getTextAlignment());
    target.setFont(source.getFont());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.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.