示例#1
0
 public ProcessFigure() {
   inAnchor = new FixedAnchor(this);
   inAnchor.place = new Point(1, 0);
   targetAnchors.put("in_proc", inAnchor);
   outAnchor = new FixedAnchor(this);
   outAnchor.place = new Point(1, 2);
   sourceAnchors.put("out_proc", outAnchor);
 }
示例#2
0
 public DecisionFigure() {
   inAnchor = new FixedAnchor(this);
   inAnchor.place = new Point(1, 0);
   targetAnchors.put("in_dec", inAnchor);
   noAnchor = new FixedAnchor(this);
   noAnchor.place = new Point(2, 1);
   sourceAnchors.put("no", noAnchor);
   yesAnchor = new FixedAnchor(this);
   yesAnchor.place = new Point(1, 2);
   sourceAnchors.put("yes", yesAnchor);
 }
示例#3
0
  public TerminatorFigure() {

    inAnchor = new FixedAnchor(this);
    // 1,2的值不是draw2d给出来的而是自己算出来的
    //  int x = r.x + place.x * r.width / 2;
    inAnchor.place = new Point(1, 0); // 整个节点图形是个矩形,0是左边,1是中点,2是右边
    targetAnchors.put("in_term", inAnchor);

    outAnchor = new FixedAnchor(this);
    // int y = r.y + place.y * r.height / 2;
    outAnchor.place = new Point(1, 2); // 那么1,2 就表示 在x轴的中点,y轴的底部
    sourceAnchors.put("out_term", outAnchor);
  }