Package com.google.gwt.event.dom.client

Examples of com.google.gwt.event.dom.client.MouseDownHandler


     * Adds a mouse down handler to activate the editing widget.<p>
     */
    private void addActivationHandler() {

        if (m_activationHandlerRegistration == null) {
            m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() {

                public void onMouseDown(MouseDownEvent event) {

                    // only act on click if not inside the button bar
                    if (!m_buttonBar.getElement().isOrHasChild((Node)event.getNativeEvent().getEventTarget().cast())) {
View Full Code Here


import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.user.client.ui.Image;

public class Utils {
  public static void preventDrag(Image img) {
    img.addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        event.preventDefault();
      }
    });
    preventDragIE(img.getElement());
View Full Code Here

    mouseBehavior = new MouseBehavior(this);
    //Focus when current photo clicked
    focusBehavior = new FocusBehavior(this);
   
    //These are used to help make sure a photo click is not registered when the mouse is dragged.
    addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        mouseMoved = false;
      }
    });
    addMouseMoveHandler(new MouseMoveHandler() {
View Full Code Here

  public MouseBehavior(Carousel carousel) {
    this.target = carousel;
   
    //rotate when mouse dragged
    target.addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        mouseDown = true;
        if ((event.getNativeButton() & NativeEvent.BUTTON_LEFT) != 0) {
          lastXValue = event.getX();
          target.setVelocity(0.0);
View Full Code Here

      focusBehavior.start();
    }

    // These are used to help make sure a photo click is not registered when
    // the mouse is dragged.
    addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        mouseMoved = false;
      }
    });
    addMouseMoveHandler(new MouseMoveHandler() {
View Full Code Here

      @Override
      public void onMouseOut(MouseOutEvent event) {
        rightArrow.setUrl("/images/arrow-right.png");
      }
    });
    leftArrow.addMouseDownHandler(new MouseDownHandler() {
      @Override
      public void onMouseDown(MouseDownEvent event) {
        leftArrow.setUrl("/images/arrow-left-press.png");
       
      }
    });
    rightArrow.addMouseDownHandler(new MouseDownHandler() {
      @Override
      public void onMouseDown(MouseDownEvent event) {
        rightArrow.setUrl("/images/arrow-right-press.png");
      }
    });
View Full Code Here

  public void start() {
    if (eventHandlers.size() > 0)
      return; //already started
   
    //rotate when mouse dragged
    eventHandlers.add(target.addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        mouseDown = true;
        if ((event.getNativeButton() & NativeEvent.BUTTON_LEFT) != 0) {
          lastXValue = event.getX();
          lastTime = System.currentTimeMillis();
View Full Code Here

/**
* Copied from http://code.google.com/p/spiral-carousel-gwt/
*/
public class Utils {
  public static void preventDrag(Image img) {
    img.addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        event.preventDefault();
      }
    });
    preventDragIE(img.getElement());
View Full Code Here

    mouseBehavior = new MouseBehavior(this);
    //Focus when current photo clicked
    focusBehavior = new FocusBehavior(this);
   
    //These are used to help make sure a photo click is not registered when the mouse is dragged.
    addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        mouseMoved = false;
      }
    });
    addMouseMoveHandler(new MouseMoveHandler() {
View Full Code Here

  public MouseBehavior(Carousel carousel) {
    this.target = carousel;
   
    //rotate when mouse dragged
    target.addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        mouseDown = true;
        if ((event.getNativeButton() & NativeEvent.BUTTON_LEFT) != 0) {
          lastXValue = event.getX();
          target.setVelocity(0.0);
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.MouseDownHandler

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.