本文整理匯總了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();
}