Package cl.alejo.jcsim.csim.circuit

Examples of cl.alejo.jcsim.csim.circuit.Box


        // "Exiting RefreshScrollBar: recursive level-------> " +
        // recursivo);
        return;
      }
      // El calculo de proporciones
      Box boxViewport = new Box(_canvas.getViewport());
      boxViewport.scale(1.0 / _canvas.zoom);
      Box boxWorld = new Box(boxViewport);
      Box boxExtent;

      // El extent se calcula solo si hay circuito
      if (_circuit != null)
        boxExtent = _circuit.getExtent();
      else
        boxExtent = new Box(0, 0, 0, 0);

      // SI el circuito no esta vacio
      if (boxExtent.getXi() < boxExtent.getXf())
        boxWorld.extend(boxExtent);

      // Calculamos todo en vertical
      int worldYMin = boxWorld.getYi();
      int worldYMax = boxWorld.getYf();
View Full Code Here


  /**
   * Insert the method's description here. Creation date: (24/10/01 0:50:39)
   */
  public void setViewportPosition(int hValue, int vValue) {
    Box boxViewport = new Box(_canvas.getViewport());
    boxViewport.scale(1.0 / _canvas.zoom);
    Box boxWorld = new Box(boxViewport);
    Box boxExtent;

    if (_circuit != null)
      boxExtent = _circuit.getExtent();
    else
      boxExtent = new Box(0, 0, 0, 0);

    if (boxExtent.getXi() < boxExtent.getXf())
      boxWorld.extend(boxExtent);

    _canvas.setViewportCorner(hValue, vValue);
  }
View Full Code Here

  }

  public void drawCircuit(Graphics2D g2) {

    // Una nueva caja zoomeada
    Box boxZoomed = new Box(boxViewport);
    boxZoomed.scale(1.0 / zoom);

    this.circuit.paint(g2, boxZoomed);
  }
View Full Code Here

TOP

Related Classes of cl.alejo.jcsim.csim.circuit.Box

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.