本文整理了Java中com.google.gwt.user.client.Event.getClientX()
方法的一些代码示例,展示了Event.getClientX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getClientX()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Event
类名称:Event
方法名:getClientX
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected int getEventPosition(Event event) {
return event.getClientX();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the mouse x-position within the browser window's client area.
*
* @param evt the event to be tested
* @return the mouse x-position
* @deprecated Use {@link Event#getClientX()} instead.
*/
@Deprecated
public static int eventGetClientX(Event evt) {
return evt.getClientX();
}
代码示例来源:origin: pt.ist/svgwt
/**
* Returns the event's x coordinate.
*
* @return the x coordinate or -1 if no dom event.
*/
public int getX() {
return _event.getClientX();
}
代码示例来源:origin: pt.ist/svgwt
/**
* Returns the event's x coordinate.
*
* @return the x coordinate or -1 if no dom event.
*/
public int getX() {
return _event.getClientX();
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
protected int getEventPosition(Event event) {
return event.getClientX();
}
代码示例来源:origin: org.jbpm/jbpm-gwt-form-api
@Override
public final int getClientX() {
return event.getClientX();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
protected int getEventPosition(Event event) {
return event.getClientX();
}
代码示例来源:origin: kiegroup/appformer
@Override
protected int getEventPosition(Event event) {
return event.getClientX();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the mouse x-position within the browser window's client area.
*
* @param evt the event to be tested
* @return the mouse x-position
* @deprecated Use {@link Event#getClientX()} instead.
*/
@Deprecated
public static int eventGetClientX(Event evt) {
return evt.getClientX();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the mouse x-position within the browser window's client area.
*
* @param evt the event to be tested
* @return the mouse x-position
* @deprecated Use {@link Event#getClientX()} instead.
*/
@Deprecated
public static int eventGetClientX(Event evt) {
return evt.getClientX();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
Element target = DOM.eventGetTarget(event);
if (splitElem.isOrHasChild(target)) {
startResizingFrom(event.getClientX() - getAbsoluteLeft(),
event.getClientY() - getAbsoluteTop());
DOM.setCapture(getElement());
if (isResizing()) {
assert DOM.getCaptureElement() != null;
onSplitterResize(event.getClientX() - getAbsoluteLeft(),
event.getClientY() - getAbsoluteTop());
event.preventDefault();
代码示例来源:origin: com.google.gwt/gwt-servlet
int x = event.getClientX() - senderElem.getAbsoluteLeft()
+ senderElem.getPropertyInt("scrollLeft")
+ Window.getScrollLeft();
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
private boolean cursorInsideBrowserContentArea(Event event) {
if (event.getClientX() < 0 || event.getClientY() < 0) {
// Outside to the left or above
return false;
}
if (event.getClientX() > Window.getClientWidth()
|| event.getClientY() > Window.getClientHeight()) {
// Outside to the right or below
return false;
}
return true;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
int clientX = event.getClientX() + Window.getScrollLeft();
int clientY = event.getClientY() + Window.getScrollTop();
int rowLeft = hoveringRow.getAbsoluteLeft();
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
protected int getClientX(Event e) {
if (touchSupported) {
return e.getTouches().get(0).getClientX();
} else {
return e.getClientX();
}
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public void choose(Event event) {
if (menu == null) {
menu = new DateFilterMenu();
}
menu.showAt(event.getClientX(), event.getClientY(), new SelectionCallback<DateRange>() {
@Override
public void onSelected(DateRange selection) {
Filter filter = new Filter(getValue());
filter.setEndDateRange(selection);
setValue(filter);
}
});
}
代码示例来源:origin: dennisjzh/GwtMobile-UI
public void onMouseUp(Event e) {
e.preventDefault();
e.stopPropagation();
onEnd(e, new Point(e.getClientX(), e.getClientY()));
}
代码示例来源:origin: dennisjzh/GwtMobile-UI
public void onMouseMove(Event e) {
e.preventDefault();
e.stopPropagation();
onMove(e, new Point(e.getClientX(), e.getClientY()));
}
代码示例来源:origin: com.sencha.gxt/gxt-chart
/**
* Returns the point of the event adjusted for the position of the chart.
*
* @param event the event
* @return the adjusted point
*/
protected PrecisePoint getEventXY(Event event) {
return new PrecisePoint(event.getClientX() - this.getAbsoluteLeft() + XDOM.getBodyScrollLeft(), event.getClientY() - this.getAbsoluteTop() + XDOM.getBodyScrollTop());
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
protected void onBrowserEvent2(Event event) {
// Enable multiple selection only when Control/Shift key is pressed
mousePosition[0] = event.getClientX();
mousePosition[1] = event.getClientY();
if (BrowserEvents.CLICK.equals(event.getType())) {
selectionModel.asMultiSelectionModel().setMultiSelectEnabled(event.getCtrlKey());
selectionModel.asMultiSelectionModel().setMultiRangeSelectEnabled(event.getShiftKey());
}
// Remove focus from the table so refreshes won't try to focus on the
// selected row. This is important when the user has scrolled the selected
// row off the screen, we don't want the browser to scroll back.
table.setFocus(false);
super.onBrowserEvent2(event);
}
内容来源于网络,如有侵权,请联系作者删除!