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

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


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


                           }

                       },
                       MouseMoveEvent.getType() );

        addDomHandler( new MouseDownHandler() {

                           public void onMouseDown(MouseDownEvent event) {
                               if ( !bResizePrimed ) {
                                   return;
                               }
View Full Code Here

   }

   @Test
   public void mouseDown() {
      // Arrange
      b.addMouseDownHandler(new MouseDownHandler() {

         public void onMouseDown(MouseDownEvent event) {
            tested = !tested;

            assertEquals(b.getElement(), event.getNativeEvent().getEventTarget());
View Full Code Here

                    return;
                }
                onNodeMouseUp(nodeEvent);
            }
        });
        m_lienzo.addMouseDownHandler(new MouseDownHandler()
        {
            @Override
            public void onMouseDown(MouseDownEvent event)
            {
                event.preventDefault();
View Full Code Here

                           }

                       },
                       MouseMoveEvent.getType() );

        addDomHandler( new MouseDownHandler() {

                           public void onMouseDown(MouseDownEvent event) {
                               if ( !resizerInfo.isResizePrimed ) {
                                   return;
                               }
View Full Code Here

    public VDragAndDropWrapper() {
        super();
        hookHtml5Events(getElement());
        setStyleName(CLASSNAME);
        addDomHandler(new MouseDownHandler() {
            public void onMouseDown(MouseDownEvent event) {
                if (dragStarMode > 0) {
                    VTransferable transferable = new VTransferable();
                    transferable.setDragSource(VDragAndDropWrapper.this);
View Full Code Here

     * 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 (!DomUtil.checkPositionInside(m_buttonBar.getElement(), event.getClientX(), event.getClientY())) {
View Full Code Here

        }
      }
    }
    );
   
    textArea.addMouseDownHandler(new MouseDownHandler()
    {
      public void onMouseDown(MouseDownEvent md)
      {
        // capture the old position
        positionOnMouseDown = textArea.getCursorPos();
View Full Code Here

    });

    /**
     * This is the handler that is responsible for resizing columns.
     */
    focusPanel.addMouseDownHandler(new MouseDownHandler() {
      public void onMouseDown(MouseDownEvent event) {
        if (!selectionList.isEmpty() && selectionList.lastElement().isEdit()) {
          return;
        }

View Full Code Here

        final PopupTitleBar header = new PopupTitleBar(title, this);

        // dnd

        header.addMouseDownHandler( new MouseDownHandler() {

            public void onMouseDown(MouseDownEvent event) {
                dragged = true;
                dragStartX = event.getRelativeX( getElement() );
                dragStartY = event.getRelativeY( getElement() );
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.