Пример #1
0
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * Update the targetName Label
   *
   * @generated NOT
   */
  private void updateTargetNameLabel() {
    Label targetName = (Label) ((AssociationFigure) getFigure()).gettargetNameEdgeObjectFigure();

    Association association = (Association) Utils.getElement(getGraphEdge());

    targetName.setText(association.getSecondEnd().getName());
  }
Пример #2
0
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * Update the targetCount Label
   *
   * @generated NOT
   */
  private void updateTargetCountLabel() {
    Label targetCount = (Label) ((AssociationFigure) getFigure()).gettargetCountEdgeObjectFigure();

    Association association = (Association) Utils.getElement(getGraphEdge());
    if (association != null) {

      String lowerBound = association.getSecondEnd().getCardMin();
      String upperBound = association.getSecondEnd().getCardMax();

      if (upperBound == null) {
        upperBound = new String("0");
      }

      if (lowerBound == null) {
        lowerBound = new String("0");
      }

      if (upperBound.equals("-1")) {
        upperBound = "*";
      }

      if (lowerBound.equals(upperBound)) {
        if (!(lowerBound.equals("1"))) targetCount.setText(lowerBound);
        else targetCount.setText("");
      } else {
        targetCount.setText(lowerBound + ".." + upperBound);
      }
    }
  }
Пример #3
0
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * Update the srcName Label
   *
   * @generated NOT
   */
  private void updateSrcNameLabel() {
    Label srcName = (Label) ((AssociationFigure) getFigure()).getsrcNameEdgeObjectFigure();

    Association association = (Association) Utils.getElement(getGraphEdge());
    srcName.setText(association.getFirstEnd().getName());
  }