Package gwt.g2d.shared.math

Examples of gwt.g2d.shared.math.Vector2


      // hit is not transparent - we got a hit!
      if (alpha > Double.MIN_VALUE) {
       
        // we entered on an object, signal it
        Handlers handlers = fIdToHandlers.get(id);
        if (handlers != null && handlers.mouseOverHandler != null) handlers.mouseOverHandler.onMouseOver(new Vector2(x, y), id);
        fLastId = id;
        return;
      }
    }
  }
View Full Code Here


    // no entity selected when we left the surface - don't do anything
    if (fLastId == null) return;
   
    // look up color
    Handlers handlers = fIdToHandlers.get(fLastId);
    if (handlers != null && handlers.mouseOutHandler != null) handlers.mouseOutHandler.onMouseOut(new Vector2(x, y));
    fLastId = null;
  }
View Full Code Here

        hit = true;
       
        // we were hovering over another id and now we're hovering over nothing or a new id - send a mouse out event
        if (fLastId != null && fLastId != id) {
          Handlers handlers = fIdToHandlers.get(fLastId);
          if (handlers != null && handlers.mouseOutHandler != null) handlers.mouseOutHandler.onMouseOut(new Vector2(x, y));
          fLastId = null;
         
        }
       
        // we enter a new object
        if (fLastId == null) {
          fLastId = id;
          Handlers handlers = fIdToHandlers.get(fLastId);
          if (handlers != null && handlers.mouseOverHandler != null) handlers.mouseOverHandler.onMouseOver(new Vector2(x, y), fLastId);
        }
       
        // we were already on this object, but we moved the mouse
        else {
          Handlers handlers = fIdToHandlers.get(fLastId);
          if (handlers != null && handlers.mouseMoveHandler != null) handlers.mouseMoveHandler.onMouseMove(new Vector2(x, y), fLastId);
        }
       
        // only process one hit
        break;
      }
    }
   
    // update drag
    if (fStartDragLoc != null) {
      for (SurfaceMouseDragHandler handler : fDragHandlers) {
        handler.onDragChange(fStartDragLoc, new Vector2(x, y), fStartDragId, fLastId);
      }
    }
   
    // we got here - this means there was no hit
    // if we were above an object in the previous cycle, let it know we left
    if (!hit) {
      Handlers handlers = fIdToHandlers.get(fLastId);
      if (handlers != null && handlers.mouseOutHandler != null) handlers.mouseOutHandler.onMouseOut(new Vector2(x, y));
      fLastId = null;
    }
  }
View Full Code Here

   *
   * @param vector
   * @return a new Vector2
   */
  public final Vector2 transform(Vector2 vector) {
    return mutableTransform(new Vector2(vector));
  }
View Full Code Here

TOP

Related Classes of gwt.g2d.shared.math.Vector2

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.