本文整理汇总了Java中com.google.gwt.dom.client.NativeEvent.preventDefault方法的典型用法代码示例。如果您正苦于以下问题:Java NativeEvent.preventDefault方法的具体用法?Java NativeEvent.preventDefault怎么用?Java NativeEvent.preventDefault使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.dom.client.NativeEvent
的用法示例。
在下文中一共展示了NativeEvent.preventDefault方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createToolboxTouchStartHandler
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
private EventHandlerProxy createToolboxTouchStartHandler() {
Command command = new Command() {
@Override
public void execute(NativeEvent event) {
event.preventDefault();
}
};
return handlerFactory.createUserTouchStartHandler(command);
}
示例2: createZoomInButtonUserDownHandler
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
private EventHandlerProxy createZoomInButtonUserDownHandler() {
Command command = new Command() {
@Override
public void execute(NativeEvent event) {
zoomIn();
zoomInTicker.scheduleRepeating(200);
event.preventDefault();
}
};
return handlerFactory.createUserDownHandler(command);
}
示例3: createZoomOutButtonUserDownHandler
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
private EventHandlerProxy createZoomOutButtonUserDownHandler() {
Command command = new Command() {
@Override
public void execute(NativeEvent event) {
zoomOut();
zoomOutTicker.scheduleRepeating(200);
event.preventDefault();
}
};
return handlerFactory.createUserDownHandler(command);
}
示例4: createZoomInButtonUserUpHandler
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
private EventHandlerProxy createZoomInButtonUserUpHandler() {
Command command = new Command() {
@Override
public void execute(NativeEvent event) {
cancelZoomInTicker();
event.preventDefault();
}
};
return handlerFactory.createUserUpHandler(command);
}
示例5: createZoomOutButtonUserUpHandler
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
private EventHandlerProxy createZoomOutButtonUserUpHandler() {
Command command = new Command() {
@Override
public void execute(NativeEvent event) {
cancelZoomOutTicker();
event.preventDefault();
}
};
return handlerFactory.createUserUpHandler(command);
}
示例6: setPosition
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
@Override
protected void setPosition(NativeEvent event) {// NOPMD
if (isPressed() && ((Element) event.getEventTarget().cast()).getClassName().contains("qp-media-volume-scrollbar-center")) {
event.preventDefault();
int positionY = positionHelper.getYPositionRelativeToTarget(event, mainProgressDiv.getElement());
positionY = positionY > 0 ? positionY : 0;
double volume = (1f / getScrollLength()) * (getScrollLength() - positionY);
setVolume(volume > 1 ? 1 : volume < 0 ? 0 : volume);
positionY = positionY - getButtonLength() / 2;
moveScroll(positionY > 0 ? positionY : 0);
}
}
示例7: setPosition
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
@Override
protected void setPosition(NativeEvent event) {
if (isAttached()) {
event.preventDefault();
int positionX = getPositionX(event);
moveScroll(positionX > 0 ? positionX : 0, true);
if (!isPressed()) {// robimy seeka tylko gdy zakonczono dotyk
seekInMedia(positionX > 0 ? positionX : 0);
}
}
}
示例8: onTouchMove
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
public void onTouchMove(NativeEvent event) {
if (getView() != null) {
if (NOT_MOBILE_BROWSER) {
event.preventDefault();
}
callOnMoveHandlers(new ConnectionMoveEvent(getPositionX(event), getPositionY(event), event));
}
}
示例9: execute
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
@Override
public void execute(NativeEvent event) {
event.preventDefault();
}
示例10: preventDefault
import com.google.gwt.dom.client.NativeEvent; //导入方法依赖的package包/类
public void preventDefault(NativeEvent nativeEvent) {
nativeEvent.preventDefault();
}