Examples of CircuitCanvas


Examples of cl.alejo.jcsim.window.CircuitCanvas

   *            java.awt.event.MouseEvent
   */
  public State mouseDoubleClick(Window window, MouseEvent event) {

    // Recupero el canvas
    CircuitCanvas canvas = window.getCanvas();

    // El click
    if (window.getCircuit() != null) {
      // Donde ocurre
      int x = canvas.getTransformedX(event.getX());
      int y = canvas.getTransformedY(event.getY());
      Circuit circuit = window.getCircuit();

      // Si es el boton izquierdo
      if (SwingUtilities.isLeftMouseButton(event)) {
        if (circuit.peekV(x, y) || circuit.peekH(x, y))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.