List of usage examples for com.google.gwt.event.dom.client TouchEndEvent getType
public static Type<TouchEndHandler> getType()
From source file:com.appkit.ui.client.widgets.touch.TouchFlowPanel.java
License:Apache License
@Override public HandlerRegistration addTouchEndHandler(TouchEndHandler handler) { return addHandler(handler, TouchEndEvent.getType()); }
From source file:com.bearsoft.gwt.ui.widgets.DropDownButton.java
@Override public HandlerRegistration addTouchEndHandler(TouchEndHandler handler) { return super.addDomHandler(handler, TouchEndEvent.getType()); }
From source file:com.brazoft.foundation.gwt.client.event.Events.java
License:Apache License
public static <W extends Widget> W on(W widget, TouchEndHandler handler) { widget.addDomHandler(handler, TouchEndEvent.getType()); return widget; }
From source file:com.github.gwtbootstrap.client.ui.Button.java
License:Apache License
/** * {@inheritDoc} */ public HandlerRegistration addTouchEndHandler(TouchEndHandler handler) { return addDomHandler(handler, TouchEndEvent.getType()); }
From source file:com.google.code.gwt.crop.client.GWTCropper.java
License:Apache License
/** * Constructor with mandatory parameter of image's URL. * * @param imageURL - URL of an uncropped image *//*from ww w . j ava 2 s .co m*/ @UiConstructor public GWTCropper(String imageURL) { super(""); this.imageURL = imageURL; bundleResources.css().ensureInjected(); this._container = new AbsolutePanelImpl(); this.addCanvas(imageURL); addDomHandler(this, MouseMoveEvent.getType()); addDomHandler(this, MouseUpEvent.getType()); addDomHandler(this, MouseOutEvent.getType()); addDomHandler(this, TouchMoveEvent.getType()); addDomHandler(this, TouchEndEvent.getType()); }
From source file:com.googlecode.mgwt.ui.client.widget.touch.TouchWidgetTouchImpl.java
License:Apache License
@Override public HandlerRegistration addTouchEndHandler(Widget w, TouchEndHandler handler) { return w.addDomHandler(handler, TouchEndEvent.getType()); }
From source file:com.googlecode.mgwt.ui.client.widget.touch.TouchWidgetTouchOnlyImpl.java
License:Apache License
@Override public HandlerRegistration addTouchEndHandler(Widget w, final TouchEndHandler handler) { return w.addDomHandler(handler, TouchEndEvent.getType()); }
From source file:com.retech.reader.web.client.home.MyDownLoadPanel.java
License:Apache License
private void displayIssue(final List<IssueProxy> proxys, final boolean isDownloadFinish) { for (final IssueProxy issue : proxys) { final HTMLPanel issuePanel = new HTMLPanel(""); final HTMLPanel imagePanel = new HTMLPanel(""); issuePanel.add(imagePanel);//from www. ja v a2 s . c o m issuePanel.add(new Label(issue.getTitle())); final String myDownLoadPanelStyleName = res.mydownloadStyle().myDownLoadPanel(); final Timer timer = new Timer() { @Override public void run() { isStart = false; if (myDownLoadPanel.getStyleName().contains(myDownLoadPanelStyleName)) { myDownLoadPanel.removeStyleName(myDownLoadPanelStyleName); } else { myDownLoadPanel.addStyleName(myDownLoadPanelStyleName); } } }; issuePanel.addDomHandler(new TouchStartHandler() { @Override public void onTouchStart(final TouchStartEvent event) { timer.schedule(700); } }, TouchStartEvent.getType()); issuePanel.addDomHandler(new TouchEndHandler() { @Override public void onTouchEnd(final TouchEndEvent event) { timer.cancel(); } }, TouchEndEvent.getType()); issuePanel.addDomHandler(new MouseDownHandler() { @Override public void onMouseDown(final MouseDownEvent event) { timer.schedule(700); } }, MouseDownEvent.getType()); issuePanel.addDomHandler(new MouseUpHandler() { @Override public void onMouseUp(final MouseUpEvent event) { timer.cancel(); } }, MouseUpEvent.getType()); issuePanel.addDomHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { if (myDownLoadPanel.getStyleName().contains(myDownLoadPanelStyleName)) { if (event.getX() < 12 && event.getY() < 12) { List<IssueProxy> issueDownloadFinish = storage .get(keyUtil.listKey(IssueProxy.ISSUE_DOWN_FINISH)); if (issueDownloadFinish == null) { return; } if (issueDownloadFinish.contains(issue)) { issueDownloadFinish.remove(issue); myDownLoadPanel.remove(issuePanel); } if (issueDownloadFinish.size() == 0) { Storage.getLocalStorageIfSupported() .removeItem(keyUtil.listKey(IssueProxy.ISSUE_DOWN_FINISH)); return; } storage.put(keyUtil.listKey(IssueProxy.ISSUE_DOWN_FINISH), issueDownloadFinish); } return; } if (isStart) { EntityProxyId<IssueProxy> stableId = issue.stableId(); placeController .goTo(places.get().setPath(IssueNews.class.getName()).setParameter(stableId)); } isStart = true; } }, ClickEvent.getType()); if (isDownloadFinish) { ProgressWidget progressWidget = progresses.get(); IssueDownloadMessage issueDownloadMessage = new IssueDownloadMessage(); issueDownloadMessage.setProgress(progressWidget); issueDownloadMessage.setIssueProxy(issue); issuePanel.add(progressWidget); downLoadIssue(issueDownloadMessage, issue.stableId()); } else if (issuePanel.getWidgetCount() == 3) { issuePanel.remove(2); } myDownLoadPanel.add(issuePanel); new BaseReceiver<ResourceProxy>() { @Override public void onSuccessAndCached(final ResourceProxy response) { displayResource(response, imagePanel); } @Override public Request<ResourceProxy> provideRequest() { return f.resource().getImage(issue); } }.setKeyForProxy(issue.stableId(), ResourceProxy.class.getName()).fire(); } }
From source file:com.sciencegadgets.client.algebra.AlgebraHistory.java
License:Open Source License
public AlgebraHistory() { addStyleName(CSS.ALG_OUT);//from w w w .ja va2 s . c om if (Moderator.isTouch) { this.addDomHandler(new AlgOutTouchMove(), TouchMoveEvent.getType()); this.addDomHandler(new AlgOutTouchEnd(), TouchEndEvent.getType()); } else { this.addDomHandler(new AlgOutClickHandler(), ClickEvent.getType()); } String goalStr = URLParameters.getParameter(Parameter.goal); if (goalStr != null && !"".equals(goalStr)) { Label firstRowEq = new HTML("Simplify to: " + goalStr); FlowPanel firstRow = new FlowPanel(); firstRowEq.addStyleName(CSS.ALG_OUT_EQ_ROW); firstRow.add(firstRowEq); Label firstRowRule = new Label(); firstRowRule.addStyleName(CSS.ALG_OUT_RULE_ROW); firstRow.add(firstRowRule); firstRow.addStyleName(CSS.ALG_OUT_ROW); add(firstRow); } }
From source file:com.sciencegadgets.client.algebra.edit.ProblemSpecification.java
License:Open Source License
public ImageContainer(final ProblemSpecification problemSpec) { super();//from w w w.ja v a2s .co m this.problemSpec = problemSpec; this.varIdPanel = problemSpec.varIdPanel; if (Moderator.isTouch) { this.addDomHandler(new TouchEndHandler() { @Override public void onTouchEnd(TouchEndEvent event) { if (!varIdPanel.setInsertImageMode()) { Touch touch = event.getTouches().get(0); // TODO // pointSelection(touch); } } }, TouchEndEvent.getType()); } else { this.addDomHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (!varIdPanel.setInsertImageMode()) { pointSelection(event.getX(), event.getY()); } } }, ClickEvent.getType()); } }