Example usage for com.google.gwt.event.dom.client MouseWheelEvent isSouth

List of usage examples for com.google.gwt.event.dom.client MouseWheelEvent isSouth

Introduction

In this page you can find the example usage for com.google.gwt.event.dom.client MouseWheelEvent isSouth.

Prototype

public boolean isSouth() 

Source Link

Document

Convenience method that returns true if #getDeltaY() is a positive value (ie, the velocity is directed toward the bottom of the screen).

Usage

From source file:edu.udes.bio.genus.client.ui.canvas.DrawerMouseWheelHandler.java

License:Open Source License

@Override
public void onMouseWheel(MouseWheelEvent event) {
    if (this.dl.isHolding() == true && this.dl.rna != null) {
        if (event.isSouth()) {
            this.dl.rna.rotate((float) 10.0);
        } else if (event.isNorth()) {
            this.dl.rna.rotate((float) -10.0);
        }// w w  w.j a  va 2  s  .  c  o m
    } else {
        if (event.isSouth()) {
            ZoomUtil.doZoom(this.dr, ZoomUtil.zoomAction.zoomOut);
        } else if (event.isNorth()) {
            ZoomUtil.doZoom(this.dr, ZoomUtil.zoomAction.zoomIn);
        }
    }
}

From source file:org.openelis.gwt.widget.MenuPanel.java

License:Open Source License

public void onMouseWheel(MouseWheelEvent event) {
    if (event.isSouth() && down.getStyleName().indexOf("MenuDisabled") == -1) {
        if (ap.getWidgetTop(panel) <= ap.getOffsetHeight() - panel.getOffsetHeight()) {
            down.addStyleName("MenuDisabled");
        } else {/*w  w  w .j  a va  2s .  c  o  m*/
            ap.setWidgetPosition(panel, 0, ap.getWidgetTop(panel) - 10);
            up.removeStyleName("MenuDisabled");
        }
    }
    if (event.isNorth() && up.getStyleName().indexOf("MenuDisabled") == -1) {
        if (ap.getWidgetTop(panel) >= 0) {
            up.addStyleName("MenuDisabled");
        } else {
            ap.setWidgetPosition(panel, 0, ap.getWidgetTop(panel) + 10);
            down.removeStyleName("MenuDisabled");
        }
    }

}

From source file:org.peergreen.vaadin.diagram.client.handler.DiagramClientMouseWheelHandler.java

License:Apache License

@Override
public void onMouseWheel(MouseWheelEvent event) {
    if (event.isNorth()) {
        getConnector().doZoomOut();/*from   ww w.  ja  v  a  2s . c  om*/
    } else if (event.isSouth()) {
        getConnector().doZoomIn();
    }
}

From source file:org.vaadin.addon.itemlayout.widgetset.client.list.AbstractListLayoutConnector.java

License:Open Source License

/**
 * Add mousewheel listener to visible elements list layout
 *//*w  w w .j  a v a  2 s. c om*/
private void addMouseWheelListener() {
    getElemVisibleListLayout().addMouseWheelHandler(new MouseWheelHandler() {
        @Override
        public void onMouseWheel(final MouseWheelEvent event) {
            event.preventDefault();
            // Wheel UP
            if (event.isNorth()) {
                scrollPrevEvent();
            }
            // Wheel DOWN
            else if (event.isSouth()) {
                scrollNextEvent();
            }
        }
    });
}

From source file:us.asciiroth.client.ui.InventoryPalette.java

License:Apache License

public InventoryPalette() {
    super();/*from ww  w  . j a v a 2  s.c  o  m*/
    setTitle("Inventory");
    inventory = new VerticalPanel();
    inventory.setStyleName("paddingTable");
    inventory.setWidth("100%");

    focuser = new FocusPanel(inventory);
    focuser.addMouseWheelHandler(new MouseWheelHandler() {
        public void onMouseWheel(MouseWheelEvent event) {
            if (!DialogManager.get().isPaused()) {
                // Necessary for FF3 not to move selection twice...
                DOM.eventPreventDefault(DOM.eventGetCurrentEvent());
                if (event.isNorth()) {
                    Game.get().selectUp();
                } else if (event.isSouth()) {
                    Game.get().selectDown();
                }
            }
        }
    });

    setBodyWidget(focuser);
    RootPanel.get("sideViews").add(this);
}