Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Label


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

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

        // add connection label
        String label = (String) getConnectionWrapper().getConnection().getMetaData("label");
        if (label != null) {
            ConnectionEndpointLocator sourceEndpointLocator = new ConnectionEndpointLocator(result, true);
            sourceEndpointLocator.setVDistance(15);
            sourceLabel = new Label(label);
            result.add(sourceLabel, sourceEndpointLocator);
        }
        return result;
    }
View Full Code Here

            sourceLabel.setText(label == null ? "" : label);
        } else if (label != null) {
            Connection connection = (Connection) getFigure();
            ConnectionEndpointLocator endpointLocator = new ConnectionEndpointLocator(connection, true);
            endpointLocator.setVDistance(15);
            sourceLabel = new Label(label);
            connection.add(sourceLabel, endpointLocator);
        }
    }
View Full Code Here

    backgroundColor = new Color(null,255,255,206);
    setBackgroundColor(backgroundColor);
    setOpaque(true);
    String name = packageService.getSimpleName();
   
    Label nameLabel = new Label(name, createPackageIcon());
    add(nameLabel);
    List<ITypeService<?, ?>> typeServices =
      packageService.getTypesServices();
   
    ToolbarLayout membersLayout = new ToolbarLayout();
    membersLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
    membersLayout.setStretchMinorAxis(false);
    membersLayout.setSpacing(4);
   
    Figure membersFigure = new Figure();
    membersFigure.setLayoutManager(membersLayout);
    membersFigure.setBorder(new CompartmentFigureBorder());
    for(ITypeService<?, ?> typeSrv : typeServices) {
      if(extendedDisplay) {
        if(typeSrv instanceof IClassService) {
          IClassService<?, ?> classSrv =
            (IClassService<?, ?>)typeSrv;
          membersFigure.add(new ClassFigure(classSrv));
        }
        else if(typeSrv instanceof IInterfaceService) {
          IInterfaceService<?, ?> interfaceSrv =
            (IInterfaceService<?, ?>)typeSrv;
          membersFigure.add(
              new InterfaceFigure<IInterfaceService<?, ?>>(
                  interfaceSrv
              )
          );
        }
      }
      else {
        if(typeSrv instanceof IClassService) {
          Label classLabel =
            new Label(
                typeSrv.getSimpleName(),
                ClassFigure.createClassIcon()
            );
          membersFigure.add(classLabel);
        }
        else if(typeSrv instanceof IInterfaceService) {
          Label interfaceLabel =
            new Label(
                typeSrv.getSimpleName(),
                InterfaceFigure.createInterfaceIcon()
            );
          membersFigure.add(interfaceLabel);
        }
        else {
          Label label = new Label(typeSrv.getSimpleName());
          membersFigure.add(label);
        }
      }
    }
    add(membersFigure);
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.