コード例 #1
0
  /** The constructor. */
  public FigGeneralization() {
    // UML spec for Generalizations doesn't call for name or stereotype
    //        middleGroup.addFig(getNameFig());
    //        middleGroup.addFig(getStereotypeFig());
    //        middleGroup.calcBounds();
    //        addPathItem(middleGroup,
    //                new PathConvPercent2(this, middleGroup, 50, 25));
    endArrow = new ArrowHeadTriangle();

    discriminator.setFont(getLabelFont());
    discriminator.setTextColor(Color.black);
    discriminator.setTextFilled(false);
    discriminator.setFilled(false);
    discriminator.setLineWidth(0);
    discriminator.setExpandOnly(false);
    discriminator.setReturnAction(FigText.END_EDITING);
    discriminator.setTabAction(FigText.END_EDITING);
    addPathItem(discriminator, new PathConvPercent(this, 40, -10));
    endArrow.setFillColor(Color.white);
    setDestArrowHead(endArrow);
    setBetweenNearestPoints(true);

    if (getLayer() == null) {
      setLayer(ProjectManager.getManager().getCurrentProject().getActiveDiagram().getLayer());
    }
  }
コード例 #2
0
  /**
   * Partially construct a new FigNode. This method creates the _name element that holds the name of
   * the model element and adds itself as a listener.
   */
  public FigEdgeModelElement() {

    nameFig = new FigSingleLineText(10, 30, 90, 20, false);
    nameFig.setTextFilled(false);

    stereotypeFig = new FigStereotypesCompartment(10, 10, 90, 15);

    setBetweenNearestPoints(true);

    ArgoEventPump.addListener(ArgoEventTypes.ANY_NOTATION_EVENT, this);
  }