Java Code Examples for com.google.gwt.event.dom.client.ClickEvent#stopPropagation()
The following examples show how to use
com.google.gwt.event.dom.client.ClickEvent#stopPropagation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TableSelecter.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 6 votes |
@Override public void onClick(ClickEvent event) { if (!TableSelecter.this.enable) { return; } boolean fire = false; if (event.getSource() == this) { fire = TableSelecter.this.setSelected(this.value, this.inputElem.isChecked()); event.stopPropagation(); } else if (event.getSource() instanceof TableRow) { TableRow<T> row = (TableRow<T>) event.getSource(); T clickedValue = row.getValue(); fire = TableSelecter.this.setSelected(clickedValue, !TableSelecter.this.isSelected(clickedValue)); } if (fire) { TableSelecter.this.fireEvent(new SelectionEvent(TableSelecter.this.selection)); } this.redraw(); }
Example 2
Source File: OffPageSelector.java From core with GNU Lesser General Public License v2.1 | 6 votes |
@Override public void onClick(ClickEvent event) { if (!popup.isShowing()) { popup.setValues(tabLayout.getOffPageContainer().getTexts()); int width = 200; int height = tabLayout.getOffPageContainer().getTexts().size() * 35; popup.setPopupPosition(getAbsoluteLeft() - (width - getOffsetWidth() - 35), getAbsoluteTop() + 42); popup.show(); popup.setWidth(width + "px"); popup.setHeight(height + "px"); event.stopPropagation(); } }
Example 3
Source File: SearchPanelWidget.java From swellrt with Apache License 2.0 | 5 votes |
@UiHandler("self") void handleClick(ClickEvent e) { Element target = e.getNativeEvent().getEventTarget().cast(); Element top = self.getElement(); while (!top.equals(target)) { if ("digest".equals(target.getAttribute(BuilderHelper.KIND_ATTRIBUTE))) { handleClick(byId.get(target.getAttribute(DigestDomImpl.DIGEST_ID_ATTRIBUTE))); e.stopPropagation(); return; } else if (showMore.equals(target)) { handleShowMoreClicked(); } target = target.getParentElement(); } }
Example 4
Source File: ButtonSwitch.java From swellrt with Apache License 2.0 | 5 votes |
public void onClick(ClickEvent e) { setState(!on); if (on) { listener.onOn(this); } else { listener.onOff(this); } // NOTE(user): This is used in the nav panel to make opening a popup for a // folder not select that folder. e.stopPropagation(); }
Example 5
Source File: DisplayerHtmlEditorView.java From dashbuilder with Apache License 2.0 | 5 votes |
@EventHandler("previewAnchor") private void onPreviewClicked(ClickEvent event) { if (!presenter.showDisplayer()) { event.stopPropagation(); } else { previewItem.setClassName("active"); if (selectedItem != null) { selectedItem.setClassName(""); selectedItem.getStyle().setCursor(Style.Cursor.POINTER); } } }
Example 6
Source File: DisplayerTypeSelectorView.java From dashbuilder with Apache License 2.0 | 5 votes |
public DisplayerTab(final String name, final DisplayerType type) { super(name); this.name = name; this.type = type; super.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { event.stopPropagation(); if (!presenter.getSelectedType().equals(type)) { presenter.onSelect(type); } } }); }
Example 7
Source File: Button.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void onClick(ClickEvent event) { Object source = event.getSource(); event.stopPropagation(); if (source instanceof Button) { ((Button<?>) source).fireEvent(new ButtonEvent((Button<?>) source)); } }
Example 8
Source File: SearchPanelWidget.java From incubator-retired-wave with Apache License 2.0 | 5 votes |
@UiHandler("self") void handleClick(ClickEvent e) { Element target = e.getNativeEvent().getEventTarget().cast(); Element top = self.getElement(); while (!top.equals(target)) { if ("digest".equals(target.getAttribute(BuilderHelper.KIND_ATTRIBUTE))) { handleClick(byId.get(target.getAttribute(DigestDomImpl.DIGEST_ID_ATTRIBUTE))); e.stopPropagation(); return; } else if (showMore.equals(target)) { handleShowMoreClicked(); } target = target.getParentElement(); } }
Example 9
Source File: ButtonSwitch.java From incubator-retired-wave with Apache License 2.0 | 5 votes |
public void onClick(ClickEvent e) { setState(!on); if (on) { listener.onOn(this); } else { listener.onOff(this); } // NOTE(user): This is used in the nav panel to make opening a popup for a // folder not select that folder. e.stopPropagation(); }
Example 10
Source File: EventDispatcherPanel.java From swellrt with Apache License 2.0 | 4 votes |
@Override public void onClick(ClickEvent event) { if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) { event.stopPropagation(); } }
Example 11
Source File: IconButtonTemplate.java From swellrt with Apache License 2.0 | 4 votes |
@Override public void onClick(ClickEvent event) { mouseListener.onClick(); event.stopPropagation(); }
Example 12
Source File: TableOrder.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onClick(ClickEvent event) { event.stopPropagation(); }
Example 13
Source File: EventDispatcherPanel.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@Override public void onClick(ClickEvent event) { if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) { event.stopPropagation(); } }
Example 14
Source File: IconButtonTemplate.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@Override public void onClick(ClickEvent event) { mouseListener.onClick(); event.stopPropagation(); }