Package CH.ifa.draw.framework

Examples of CH.ifa.draw.framework.Figure


  {
    List li = new ArrayList();

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

      if (f instanceof ParamConnection)
      {
        li.add(f);
      }
View Full Code Here


  {
    List li = new ArrayList();

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

      if (f instanceof FlowConnection)
      {
        li.add(f);
      }
View Full Code Here

    if (figure == null)
    {
      return null;
    }

    Figure result = super.add(figure);

    if (result instanceof VisualElement)
    {
      ((VisualElement) result).setDrawing(this);
    }
View Full Code Here

  public void setTagState(int stateUpdate)
  {
    // Change the state of all tag figures of each node figure
    for (Enumeration drawingFigures = figures(); drawingFigures.hasMoreElements();)
    {
      Figure f = (Figure) drawingFigures.nextElement();

      if (f instanceof NodeFigure)
      {
        for (FigureEnumeration nodeFigures = ((NodeFigure) f).figures(); nodeFigures.hasMoreElements();)
        {
          Figure nodeChild = nodeFigures.nextFigure();
          if (nodeChild instanceof SocketFigure)
          {
            SocketFigure socketFigure = (SocketFigure) nodeChild;

            int contentState = socketFigure.getContentState();
View Full Code Here

  public void layoutAllConnections()
  {
    // Changing the tag state may require a recomputation of the connection figures
    for (FigureEnumeration drawingFigures = figures(); drawingFigures.hasMoreElements();)
    {
      Figure f = drawingFigures.nextFigure();

      if (f instanceof PolySplineConnection)
      {
        ((PolySplineConnection) f).layoutConnection();
      }
View Full Code Here

  public Figure remove(Figure figure)
  {
    if (figure instanceof ProcessElementContainer)
    {
      Figure parent = ((ProcessElementContainer) figure).getParentElement();
      if (parent instanceof ProcessDrawing)
      {
        return super.remove(figure);
      }
      else if (parent instanceof CompositeFigure)
View Full Code Here

  public Figure findFigure(int x, int y)
  {
    FigureEnumeration figures = figures();
    while (figures.hasMoreElements())
    {
      Figure figure = figures.nextFigure();
      if (figure.containsPoint(x, y))
      {
        return figure;
      }
    }
    return null;
View Full Code Here

    // Reorder z-values
    int n = fFigures.size();
    for (int i = 0; i < n; ++i)
    {
      Figure f = (Figure) fFigures.elementAt(i);
      f.setZValue(i);
    }

    // Update low/high z value
    _nLowestZ = 0;
    _nHighestZ = n - 1;
View Full Code Here

    }

    Rectangle r = ((Figure) fFigures.elementAt(0)).displayBox();
    for (int i = 1; i < n; ++i)
    {
      Figure f = (Figure) fFigures.elementAt(i);

      if (f instanceof LineFigure)
      {
        // Line figures have an inifinite dimension, so we skip them
        continue;
      }

      r.add(f.displayBox());
    }

    // Ensure that the display box of the drawing itself always starts at (0,0)
    r.x = r.y = 0;
View Full Code Here

    process.setGeometry(geometry);

    // Add dependent objects from the drawing
    for (Enumeration en = figures(); en.hasMoreElements();)
    {
      Figure f = (Figure) en.nextElement();

      if (f instanceof NodeFigure)
      {
        ((NodeFigure) f).encodeGeometry();
      }
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.