FilterButton(DoubleClickHandler superSelect, Element itemContainer, String containerClass, String itemClass, String label, String buttonClass) { super(label); this.itemContainer = itemContainer; this.itemClass = itemClass; this.containerClass = containerClass; setStyleName(LogPanel.css.button() + " " + LogPanel.css.enabled() + " " + buttonClass); addClickHandler(this); if (superSelect != null) { addDoubleClickHandler(superSelect); } }
/** * Gets the filter for a stream, creating one if one does not already exist. */ private FilterButton getStreamFilter(final String stream) { FilterButton filter = streamFilters.get(stream); if (filter == null) { // Just in case a user can cause a stream to be called "'><script // src='evil.js'></script><pre '", we only use safe values for CSS // classes. There's no need for the class names to be human readable. int streamId = streamFilters.countEntries(); String itemClass = "w-s-" + streamId; String containerClass = STREAM_FILTER_PREFIX + streamId; filter = new FilterButton(new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { enableOnlyOneStream(stream); } }, entries, containerClass, itemClass, stream, css.stream()); self.add(filter, streamsContainer); streamFilters.put(stream, filter); // TODO(ohler): Make styles work in IE. if (!UserAgent.isIE()) { // Replace stylesheet to make the new filter work. style.setInnerText(style.getInnerText() + filter.getCssRule()); } } return filter; }
public void addMapHandler(AbstractGeometryIndexMapHandler handler) { handler.setIndex(index); handler.setService(service); handler.setEventParser(this); if (handler instanceof MapDownHandler) { downHandlers.add((MapDownHandler) handler); } if (handler instanceof MapUpHandler) { upHandlers.add((MapUpHandler) handler); } if (handler instanceof MapDragHandler) { dragHandlers.add((MapDragHandler) handler); } if (handler instanceof MouseOverHandler) { overHandlers.add((MouseOverHandler) handler); } if (handler instanceof MouseOutHandler) { outHandlers.add((MouseOutHandler) handler); } if (handler instanceof MouseMoveHandler) { moveHandlers.add((MouseMoveHandler) handler); } if (handler instanceof DoubleClickHandler) { doubleClickHandlers.add((DoubleClickHandler) handler); } }
private LogPanel(Logs log) { this.log = log; initWidget(BINDER.createAndBindUi(this)); // Add filter buttons. Global filter, then log-level filters. StringBuilder rules = new StringBuilder(); rules.append(css.getText()); for (final Level level : Level.values()) { String itemClass = LEVEL_CLASSES.get(level); String containerClass = LEVEL_FILTER_PREFIX + itemClass; FilterButton levelFilter = new FilterButton(new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { enableOnlyMoreImportantLevels(level); } }, entries, containerClass, itemClass, level.name(), css.level()); levelFilters.put(level, levelFilter); self.add(levelFilter, levelsContainer); rules.append(levelFilter.getCssRule()); } // TODO(ohler): Make styles work in IE; the log panel consumes the entire // screen without them. In IE8, I've seen this crash in setInnerText(). if (!UserAgent.isIE()) { // Inject style. style.setInnerText(rules.toString()); Document.get().getBody().appendChild(style); } setActive(true); }
protected HandlerRegistration addDoubleClickHandler(DoubleClickHandler doubleClickhandler) { return addDomHandler(doubleClickhandler, DoubleClickEvent.getType()); }
/** Blocks double clicking on the button and on the parent element. */ private void blockDoubleClicking() { addDomHandler( new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { event.stopPropagation(); event.preventDefault(); } }, DoubleClickEvent.getType()); }
private void addDoubleClick(final TablePanel table, final boolean isTags) { DoubleClickHandler dch = new DoubleClickHandler() { public void onDoubleClick(DoubleClickEvent event) { resubmitSearch(table, isTags); } }; table.addDoubleClickListner(dch); }
public static DoubleClickHandler createDoubleClickListener(final EventListenerGVO ev, final List<InputVariableGVO> input) { return new DoubleClickHandler() { public void onDoubleClick(DoubleClickEvent event) { Map<String,String> mouseInfo = getMouseInfo(event); CallbackHandler.createCallBack(event.getSource(), QAMLConstants.EVENT_ONDBLCLICK, ev, input, mouseInfo); } }; }
public void onDoubleClick(DoubleClickEvent event) { if (service.getIndexStateService().isEnabled(index)) { for (DoubleClickHandler handler : doubleClickHandlers) { handler.onDoubleClick(event); } } }
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
@Override public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
@Override public HandlerRegistration addDoubleClickHandler( DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType() ); }
@Override public final HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
@Inject public FileStructureImpl(NodeFactory nodeFactory, JavaLocalizationConstant locale) { super(false); this.nodeFactory = nodeFactory; this.locale = locale; setWidget(UI_BINDER.createAndBindUi(this)); NodeStorage storage = new NodeStorage( new NodeUniqueKeyProvider() { @Override public String getKey(@NotNull Node item) { return String.valueOf(item.hashCode()); } }); NodeLoader loader = new NodeLoader(Collections.<NodeInterceptor>emptySet()); tree = new Tree(storage, loader); tree.setAutoExpand(false); tree.getSelectionModel().setSelectionMode(SINGLE); KeyboardNavigationHandler handler = new KeyboardNavigationHandler() { @Override public void onEnter(NativeEvent evt) { hide(); } }; tree.addDomHandler( new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { if (all(tree.getSelectionModel().getSelectedNodes(), LEAFS)) { hide(); } } }, DoubleClickEvent.getType()); handler.bind(tree); treeContainer.add(tree); }
public void addDoubleClickHandler(DoubleClickHandler doubleClickHandler) { this.doubleClickHandler = doubleClickHandler; }
public void addDoubleClickListener(DoubleClickHandler dch){ this.addDomHandler(dch, DoubleClickEvent.getType()); }
public void addDoubleClickListner(DoubleClickHandler dch) { table.addDoubleClickListener(dch); }
@Override public HandlerRegistration addDoubleClickHandler(DoubleClickHandler p_handler) { return m_intBox.addDoubleClickHandler( p_handler ); }
private static void createDesktopIcon(final WindowGVO windowGVO, final String uuid, final String title, final String appId) { if (windowGVO != null && windowGVO.getIcon() != null && windowGVO.getIcon().length() > 0) { final String windowId = windowGVO.getId(); final DesktopIcon desktopIcon = new DesktopIcon(windowGVO.getIcon(), title); fillInMandatoryOnly(windowGVO, desktopIcon, uuid, windowId, appId); desktopIcon.addDoubleClickHandler(new DoubleClickHandler() { public void onDoubleClick(DoubleClickEvent event) { // ClientApplicationContext.getInstance().removeWindow(windowId, // uuid); WindowPanel existingWindowPanel = ClientApplicationContext.getInstance().windowIdExists(windowId, uuid); if (existingWindowPanel == null) { EventListenerGVO[] events = windowGVO.getEvents(); if (events != null) { String eventType = QAMLConstants.EVENT_ONCLICK; for (EventListenerGVO eventGVO : events) { if (eventGVO.getEventComponentId().equals(windowId) && eventGVO.getEventListenerType().equals(eventType)) { createCallBack4OpenWindow(desktopIcon, eventType, eventGVO); break; } } } // MainFactoryActions.getUIByUUID(uuid, windowId); } else { Iterator itr = ClientApplicationContext.getInstance().getHorizontalPanel().iterator(); while (itr.hasNext()) { Widget w = (Widget) itr.next(); if (w.getTitle().equals(title)) { existingWindowPanel.setWindowState(WindowState.NORMAL); existingWindowPanel.show(); ClientApplicationContext.getInstance().getHorizontalPanel().remove(w); } } existingWindowPanel.toFront(); } } }); ClientApplicationContext.getInstance().getDragController().makeDraggable(desktopIcon, desktopIcon.getTitleLabel()); ClientApplicationContext.getInstance().addDesktopIcon(desktopIcon); } }
public HandlerRegistration addDoubleClickHandler(final DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return image.addDoubleClickHandler(handler); }
public HandlerRegistration addCellDoubleClickHandler( final DoubleClickHandler handler ) { return addDomHandler( handler, DoubleClickEvent.getType() ); }
@Override public com.google.gwt.event.shared.HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return this.addDomHandler(handler, DoubleClickEvent.getType()); }
@Override public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return this.addDomHandler(handler, DoubleClickEvent.getType()); }
/** {@inheritDoc} */ public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
@Override public HandlerRegistration addDoubleClickHandler( DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
public void addDoubleClickHandler(DoubleClickHandler handler) { doubleClickHandlers.add(handler); }
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return widget.addDoubleClickHandler(handler); }
@Override public HandlerRegistration addDoubleClickHandler(final DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }
/** * {@inheritDoc} */ @Override public HandlerRegistration addDoubleClickHandler(final DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); }