Gets the pageX and pageY values of the given mouse event.
@param event The mouse event of which the pageX and pageX shall be got.
@returns {{x: number, y: number}} x = pageX value, y = pageY value.
161766
function(event) {
                event = event.originalEvent || event;

                var strPage = 'page';
                var strClient = 'client';
                var strX = 'X';
                var strY = 'Y';
                var target = event.target || event.srcElement || document;
                var eventDoc = target.ownerDocument || document;
                var doc = eventDoc.documentElement;
                var body = eventDoc.body;

                //if touch event return return pageX/Y of it
                if(event.touches !== undefined) {
                    var touch = event.touches[0];
                    return {
                        x : touch[strPage + strX],
                        y : touch[strPage + strY]
                    }
                }

                // Calculate pageX/Y if not native supported
                if (!event[strPage + strX] && event[strClient + strX] && event[strClient + strX] != null) {

                    return {
                        x : event[strClient + strX] +
                        (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
                        (doc && doc.clientLeft || body && body.clientLeft || 0),
                        y : event[strClient + strY] +
                        (doc && doc.scrollTop || body && body.scrollTop || 0) -
                        (doc && doc.clientTop || body && body.clientTop || 0)
                    }
                }
                return {
                    x : event[strPage + strX],
                    y : event[strPage + strY]
                };
            }
381078
function getCoords(ev) {
          var x, y, w, h, el;

          // ignore browsers without pageX for now
          if (ev.pageX === null) return;

          x = ev.pageX;
          y = ev.pageY;
          el = self.element;

          // should probably check offsetParent
          // but this is more portable
          while (el !== document.documentElement) {
              x -= el.offsetLeft;
              y -= el.offsetTop;
              el = el.parentNode;
          }

          // convert to cols/rows
          w = self.element.clientWidth;
          h = self.element.clientHeight;
          x = ((x / w) * self.cols) | 0;
          y = ((y / h) * self.rows) | 0;

          // be sure to avoid sending
          // bad positions to the program
          if (x < 0) x = 0;
          if (x > self.cols) x = self.cols;
          if (y < 0) y = 0;
          if (y > self.rows) y = self.rows;

          // xterm sends raw bytes and
          // starts at 32 (SP) for each.
          x += 32;
          y += 32;

          return {
              x: x,
              y: y,
              down: ev.type === 'mousedown',
              up: ev.type === 'mouseup',
              wheel: ev.type === wheelEvent,
              move: ev.type === 'mousemove'
          };
      }
1061604
public XEvent set(int index, XEvent event) {
		try {
			XEvent result = events.replace(event, index);
			return result;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}
499927
function(e) {
        var posx = 0;
        var posy = 0;
        if (!e) { e = window.event; }
        if (e.type == "MSPointerMove" || e.type == "MSPointerDown" || e.type == "MSPointerUp") {
          return {
            x: e.pageX + window.pageXOffset,
            y: e.pageY + window.pageYOffset
          }
        }
        if (e.pageX || e.pageY) {
            // Good browsers
            return {
                x: e.pageX,
                y: e.pageY
            };
        } else if (e.clientX || e.clientY) {
            // Internet Explorer
            return {
                x: e.clientX,
                y: e.clientY
            };
        } else if (e.touches && e.touches.length === 1) {
            // Touch browsers
            return {
                x: e.touches[0].pageX,
                y: e.touches[0].pageY
            };
        }
    }
570497
private void getInertIndex(HashMap event) {
        int iDate;
        try {
            iDate = Integer.parseInt(getValueOr(event, "date", ""));
        } catch (Exception e) {
            next = events.size();
            return;
        }
        for (int i = isEventExist() ? next : 0; i < events.size(); i++) {
            try {
                if (iDate < Integer.parseInt(getValueOr(events.get(i), "date", "0"))) {
                    next = i;
                    return;
                }
            } catch (Exception e) {
            }
        }

        next = events.size();
    }
1021768
function getPointerType( event ) {
        var pointerTypeStr;
        if ( $.MouseTracker.unprefixedPointerEvents ) {
            pointerTypeStr = event.pointerType;
        } else {
            // IE10
            //  MSPOINTER_TYPE_TOUCH: 0x00000002
            //  MSPOINTER_TYPE_PEN:   0x00000003
            //  MSPOINTER_TYPE_MOUSE: 0x00000004
            switch( event.pointerType )
            {
                case 0x00000002:
                    pointerTypeStr = 'touch';
                    break;
                case 0x00000003:
                    pointerTypeStr = 'pen';
                    break;
                case 0x00000004:
                    pointerTypeStr = 'mouse';
                    break;
                default:
                    pointerTypeStr = '';
            }
        }
        return pointerTypeStr;
    }
492714
private ListenerEvent getEvent(int eventBit, MouseEvent<?> event) {
		return new ListenerEvent(eventBit, getScreenPosition(event), getClientPosition(event), getTarget(event),
				getTransformer(), event.isAltKeyDown(), event.isControlKeyDown(), event.isShiftKeyDown(),
				event.getNativeButton());
	}
1347001
@Override
	public void fireEvent(String event) throws WidgetException {
		try {
			String javaScript = null;
			if (event.startsWith("mouse")) {
				javaScript = "if(document.createEvent){var evObj = document.createEvent('MouseEvents');evObj.initEvent('" + event
						+ "', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('on" + event + "');}";
			} else {
				javaScript = "if(document.createEvent){var evObj = document.createEvent('HTMLEvents');evObj.initEvent('" + event
						+ "', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('on" + event + "');}";
			}
			eval(javaScript);
		} catch (Exception e) {
			throw new WidgetException("Error while trying to fire event", getByLocator(), e);
		}
	}
953003
function mouseY(event){
    if ('pageY' in event)
      return event.pageY;
    else
      return 'clientY' in event
        ? event.clientY +
            (document.compatMode == 'CSS1Compat' ? document.documentElement.scrollTop : document.body.scrollTop)
        : 0;
  }
374257
function (event) {
            var own = this;
            var returnValue = true;
            // grab the event object (IE uses a global event object)
            event = event || own._fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
            // get a reference to the hash table of event handlers
            var handlers = this.events[event.type];
            // execute each event handler
            for (var i in handlers) {
                var _handleEvent = handlers[i];
                if (_handleEvent(event) === false) {
                    returnValue = false;
                }
            }
            return returnValue;
        }
842862
int getCornerIndex( SquareNode node , double x , double y ) {
		for (int i = 0; i < node.square.size(); i++) {
			Point2D_F64 c = node.square.get(i);
			if( c.x == x && c.y == y )
				return i;
		}

		throw new RuntimeException("BUG!");
	}
475123
@Override
    public final void onBrowserEvent(final Event event) {

        super.onBrowserEvent(event);
        switch (DOM.eventGetType(event)) {
            // Unhighlight and cancel keyboard events
            case Event.ONBLUR:
                m_keyTimer.cancel();
                if (m_slidingMouse) {
                    stopMouseSliding(event);

                } else if (m_slidingKeyboard) {
                    m_slidingKeyboard = false;

                }

                break;

            // Mousewheel events
            case Event.ONMOUSEWHEEL:
                int velocityY = event.getMouseWheelVelocityY() * m_stepSize;
                event.preventDefault();
                CmsDebugLog.getInstance().printLine("Whell velocity: " + velocityY);
                if (velocityY > 0) {
                    shiftDown(velocityY);
                } else {
                    shiftUp(-velocityY);
                }
                break;

            // Shift left or right on key press
            case Event.ONKEYDOWN:
                if (!m_slidingKeyboard) {
                    int multiplier = 1;
                    if (event.getCtrlKey() || event.getMetaKey()) {
                        multiplier = m_stepSize;
                    }

                    switch (event.getKeyCode()) {
                        case KeyCodes.KEY_HOME:
                            event.preventDefault();
                            setValue(Integer.valueOf(0));
                            break;
                        case KeyCodes.KEY_END:
                            event.preventDefault();
                            setValue(Integer.valueOf(getMaximumVerticalScrollPosition()));
                            break;
                        case KeyCodes.KEY_PAGEUP:
                            event.preventDefault();
                            m_slidingKeyboard = true;
                            shiftUp(m_pageSize);
                            m_keyTimer.schedule(INITIALDELAY, true, m_pageSize);
                            break;
                        case KeyCodes.KEY_PAGEDOWN:
                            event.preventDefault();
                            m_slidingKeyboard = true;

                            shiftDown(m_pageSize);
                            m_keyTimer.schedule(INITIALDELAY, false, m_pageSize);
                            break;
                        case KeyCodes.KEY_UP:
                            event.preventDefault();
                            m_slidingKeyboard = true;

                            shiftUp(multiplier);
                            m_keyTimer.schedule(INITIALDELAY, true, multiplier);
                            break;
                        case KeyCodes.KEY_DOWN:
                            event.preventDefault();
                            m_slidingKeyboard = true;

                            shiftDown(multiplier);
                            m_keyTimer.schedule(INITIALDELAY, false, multiplier);
                            break;

                        default:
                    }
                }
                break;
            // Stop shifting on key up
            case Event.ONKEYUP:
                m_keyTimer.cancel();
                if (m_slidingKeyboard) {
                    m_slidingKeyboard = false;
                }
                break;

            // Mouse Events
            case Event.ONMOUSEDOWN:
                if (sliderClicked(event)) {
                    startMouseSliding(event);
                    event.preventDefault();
                }
                break;
            case Event.ONMOUSEUP:
                stopMouseSliding(event);
                break;
            case Event.ONMOUSEMOVE:
                slideKnob(event);
                break;
            default:
        }

    }
892892
public static JMXControl getFromEvent(ApplicationEvent event) {
    	if (event instanceof ApplicationContextEvent) {
    		return getFromContext(((ApplicationContextEvent) event).getApplicationContext());
    	}
    	else {
    		return null;
    	}
    }
875503
function getX(event) {
  let originalEvent = event.originalEvent;
  let touches = originalEvent && originalEvent.changedTouches;
  let touch = touches && touches[0];

  if (touch) {
    return touch.screenX;
  } else {
    return event.pageX;
  }
}
363087
function isLeftMouseReleased(event) {
    if ('buttons' in event && isNotIEorIsIE10plus) {
      // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-buttons
      // Firefox 15+
      // Internet Explorer 10+
      return !(event.buttons | 1);
    }
    if (isChrome15OrOpera15plus || isSafari6plus) {
      // Chrome 14+
      // Opera 15+
      // Safari 6.0+
      return event.which === 0;
    }
  }
36896
function(event) {
        var changed = false;
        if(this.features) {
            if(this.num === null) {
                this.num = -1;
            }
            var start = (this.num + 1) * this.length;
            changed = this.page(start, event);
        }
        return changed;
    }
195003
function (e) {
            // This code is inspired from https://stackoverflow.com/a/3464890
            var doc = document.documentElement,
                pageX = e.clientX + (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0),
                pageY = e.clientY + (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
            return { X: pageX, Y: pageY };
        }