Package CH.ifa.draw.framework

Examples of CH.ifa.draw.framework.Figure


  {
    Rectangle db = presentationFigure.displayBox();

    for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();
      Rectangle kind = f.displayBox();
      db = db.union(kind);
    }

    return db;
  }
View Full Code Here


  {
    Vector v = null;

    for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();

      Vector subHandles = f.handles();
      if (subHandles.size() > 0)
      {
        if (v == null)
          v = new Vector();
        v.addAll(subHandles);
View Full Code Here

  public void translateChildren(int dx, int dy)
  {
    for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();
      f.moveBy(dx, dy);
    }
  }
View Full Code Here

    }

    // Perform the socket layout
    for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();
      if (f instanceof AbstractTagFigure)
      {
        ((AbstractTagFigure) f).layoutTag();
      }
    }
View Full Code Here

    }

    // We set the visible status of all children as well
    for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();
      if (f instanceof AbstractTagFigure)
      {
        ((AbstractTagFigure) f).setVisible(visible);
      }
    }
View Full Code Here

        // Pass selection events to the tags of this node
        // (this will cause hidden control anchors to be displayed when the element is selected).
        boolean ret = false;
        for (FigureEnumeration fe = this.figures(); fe.hasMoreElements();)
        {
          Figure f = fe.nextFigure();

          if (f instanceof VisualElement)
          {
            if (((VisualElement) f).handleEvent(event))
              ret = true;
View Full Code Here

    initIcon();

    for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
    {
      Figure next = fe.nextFigure();

      if (next instanceof UpdatableFigure)
      {
        ((UpdatableFigure) next).updateFigure();
      }
View Full Code Here

        if (regionId instanceof String && ((String) regionId).endsWith("-All"))
        {
          // CTRL+drop color means colorize the sockets, too
          for (FigureEnumeration fe = figures(); fe.hasMoreElements();)
          {
            Figure f = fe.nextFigure();
            if (f instanceof SocketFigure)
            {
              SocketFigure socketFigure = (SocketFigure) f;

              socketFigure.setFillColor(color);
View Full Code Here

    int height = 0;
    int width = 0;

    for (FigureEnumeration en = tagFigure.figures(); en.hasMoreElements();)
    {
      Figure subFigure = en.nextFigure();
      Rectangle r;

      if (subFigure instanceof Expandable)
      {
        r = ((Expandable) subFigure).compactDisplayBox();
      }
      else if (subFigure instanceof LayoutableTag)
      {
        r = ((LayoutableTag) subFigure).getLayouter().calculateSize();
      }
      else
      {
        r = subFigure.displayBox();
      }

      width = Math.max(r.width, width);

      // Add sub figure height and vertical insets
View Full Code Here

    // Add sub top vertical inset
    int yPos = insets.top + box.y;

    for (FigureEnumeration en = (vAlign == Orientation.BOTTOM ? tagFigure.figures() : tagFigure.figuresReverse()); en.hasMoreElements();)
    {
      Figure subFigure = en.nextFigure();
      Rectangle r;

      // Calculate the sub figure size
      if (subFigure instanceof Expandable)
      {
        r = ((Expandable) subFigure).compactDisplayBox();
      }
      else if (subFigure instanceof LayoutableTag)
      {
        r = ((LayoutableTag) subFigure).getLayouter().calculateSize();
      }
      else
      {
        r = subFigure.displayBox();
      }

      // Set the sub figure position and size
      int x = xBaseLine + CommonUtil.rnd(xFactor * r.width);
      r.setLocation(x, yPos);
      subFigure.displayBox(r);

      // Add sub figure height and vertical insets
      yPos += insets.top + insets.bottom + r.height;
    }
  }
View Full Code Here

TOP

Related Classes of CH.ifa.draw.framework.Figure

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.