/** 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());
    }
  }
  public FigShallowHistoryState() {
    _bigPort = new FigCircle(x, y, width, height, Color.cyan, Color.cyan);
    _head = new FigCircle(x, y, width, height, Color.black, Color.white);
    _name = new FigText(x + 5, y + 5, width - 10, height - 10);
    _name.setText("H");
    _name.setTextColor(Color.black);
    _name.setFilled(false);
    _name.setLineWidth(0);

    // add Figs to the FigNode in back-to-front order
    addFig(_bigPort);
    addFig(_head);
    addFig(_name);

    setBlinkPorts(false); // make port invisble unless mouse enters
    Rectangle r = getBounds();
  }
示例#3
0
文件: FigComment.java 项目: kopl/misc
 /*
  * @see org.tigris.gef.presentation.Fig#setFilled(boolean)
  */
 @Override
 public void setFilled(boolean f) {
   bodyTextFig.setFilled(false); // The text is always opaque.
   outlineFig.setFilled(f);
   urCorner.setFilled(f);
 }