Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Label


        }
    }

    private IFigure buildToolTip(Link link)
    {
        Label l = new Label();
        l.setText(getLinkText(link));
        return l;
    }
View Full Code Here


      OntoUML.diagram.part.ValidationMarker[] markers = OntoUML.diagram.part.ValidationMarker
          .getMarkers(editPart.getViewer(), viewId);
      if (markers == null || markers.length == 0) {
        return;
      }
      Label toolTip = null;
      for (int i = 0; i < markers.length; i++) {
        OntoUML.diagram.part.ValidationMarker marker = markers[i];
        int nextSeverity = marker.getStatusSeverity();
        Image nextImage = getImage(nextSeverity);
        if (foundMarker == null) {
          foundMarker = marker;
          toolTip = new Label(marker.getMessage(), nextImage);
        } else {
          if (toolTip.getChildren().isEmpty()) {
            Label comositeLabel = new Label();
            FlowLayout fl = new FlowLayout(false);
            fl.setMinorSpacing(0);
            comositeLabel.setLayoutManager(fl);
            comositeLabel.add(toolTip);
            toolTip = comositeLabel;
          }
          toolTip.add(new Label(marker.getMessage(), nextImage));
        }
        severity = (nextSeverity > severity) ? nextSeverity : severity;
      }
      if (foundMarker == null) {
        return;
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

  /**
   * @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

            String[] confs = dest.getCallerConfigurations(source);
            String tooltipText = "";
            for (int i = 0; i < confs.length; i++) {
                tooltipText += confs[i] + ", ";
            }
            return new Label(tooltipText.substring(0, tooltipText.length() - 2));
        }

        return null;
    }
View Full Code Here

    titleBarBorder.setTextAlignment(PositionConstants.CENTER);

    LineBorder lineBorder = new LineBorder(ColorConstants.black, 1);
    setBorder(new CompoundBorder(lineBorder, titleBarBorder));

    projectNameLabel = new Label();
    projectNameLabel.setOpaque(false);
    try {
      projectNameLabel.setFont(new Font(null, new FontData(Activator.getDefault().getPluginPreferences().getString(
          PreferenceConstants.PROJECT_NAME_FONT))));
    } catch (Throwable e) {
View Full Code Here

  private Label toolTipFigure;
 
  public UseConnectorFigure() {
    super();
    toolTipFigure = new Label();
    this.setToolTip(toolTipFigure);
  }
View Full Code Here

    private RectangleFigure rectangleFigure;
    private Label label;

    public BoxFigure() {
        this.rectangleFigure = new RectangleFigure();
        this.label = new Label();
        this.add(rectangleFigure);
        this.add(label);
        setOpaque(false);
    }
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.