java类com.google.gwt.event.dom.client.DoubleClickHandler的实例源码

LogPanel.java 文件源码 项目:walkaround 阅读 28 收藏 0 点赞 0 评论 0
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);
  }
}
LogPanel.java 文件源码 项目:walkaround 阅读 31 收藏 0 点赞 0 评论 0
/**
 * 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;
}
CompositeGeometryIndexController.java 文件源码 项目:geomajas-project-client-gwt 阅读 27 收藏 0 点赞 0 评论 0
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);
    }
}
CompositeGeometryIndexController.java 文件源码 项目:geomajas-project-client-gwt2 阅读 34 收藏 0 点赞 0 评论 0
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);
    }
}
LogPanel.java 文件源码 项目:walkaround 阅读 23 收藏 0 点赞 0 评论 0
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);
}
ItemsTable.java 文件源码 项目:listmaker 阅读 23 收藏 0 点赞 0 评论 0
protected HandlerRegistration addDoubleClickHandler(DoubleClickHandler doubleClickhandler)
{
    return addDomHandler(doubleClickhandler, DoubleClickEvent.getType());
}
ToolButton.java 文件源码 项目:che 阅读 25 收藏 0 点赞 0 评论 0
/** 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());
}
HistoryTagsCmd.java 文件源码 项目:firefly 阅读 84 收藏 0 点赞 0 评论 0
private void addDoubleClick(final TablePanel table, final boolean isTags) {
    DoubleClickHandler dch = new DoubleClickHandler() {
        public void onDoubleClick(DoubleClickEvent event) {
            resubmitSearch(table, isTags);
        }
    };
    table.addDoubleClickListner(dch);
}
EventFactory.java 文件源码 项目:qafe-platform 阅读 23 收藏 0 点赞 0 评论 0
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);
        }
    };
}
CompositeGeometryIndexController.java 文件源码 项目:geomajas-project-client-gwt 阅读 20 收藏 0 点赞 0 评论 0
public void onDoubleClick(DoubleClickEvent event) {
    if (service.getIndexStateService().isEnabled(index)) {
        for (DoubleClickHandler handler : doubleClickHandlers) {
            handler.onDoubleClick(event);
        }
    }
}
CompositeGeometryIndexController.java 文件源码 项目:geomajas-project-client-gwt2 阅读 25 收藏 0 点赞 0 评论 0
public void onDoubleClick(DoubleClickEvent event) {
    if (service.getIndexStateService().isEnabled(index)) {
        for (DoubleClickHandler handler : doubleClickHandlers) {
            handler.onDoubleClick(event);
        }
    }
}
HandlerPanel.java 文件源码 项目:appinventor-extensions 阅读 22 收藏 0 点赞 0 评论 0
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
  return addDomHandler(handler, DoubleClickEvent.getType());
}
ImplPanel.java 文件源码 项目:Wiab.pro 阅读 24 收藏 0 点赞 0 评论 0
@Override
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
  return addDomHandler(handler, DoubleClickEvent.getType());
}
DoubleClickFocusPanel.java 文件源码 项目:x-cure-chat 阅读 20 收藏 0 点赞 0 评论 0
@Override
public HandlerRegistration addDoubleClickHandler( DoubleClickHandler handler) {
    return addDomHandler(handler, DoubleClickEvent.getType() );
}
Table.java 文件源码 项目:ephesoft 阅读 21 收藏 0 点赞 0 评论 0
@Override
public final HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return addDomHandler(handler, DoubleClickEvent.getType());
}
FileStructureImpl.java 文件源码 项目:che 阅读 19 收藏 0 点赞 0 评论 0
@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);
}
ThumbnailWidget.java 文件源码 项目:firefly 阅读 20 收藏 0 点赞 0 评论 0
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
     return addDomHandler(handler, DoubleClickEvent.getType());
}
BasicPagingImageGrid.java 文件源码 项目:firefly 阅读 22 收藏 0 点赞 0 评论 0
public void addDoubleClickHandler(DoubleClickHandler doubleClickHandler) {
    this.doubleClickHandler = doubleClickHandler;
}
BasicPagingTable.java 文件源码 项目:firefly 阅读 18 收藏 0 点赞 0 评论 0
public void addDoubleClickListener(DoubleClickHandler dch){
    this.addDomHandler(dch, DoubleClickEvent.getType());
}
TablePanel.java 文件源码 项目:firefly 阅读 33 收藏 0 点赞 0 评论 0
public void addDoubleClickListner(DoubleClickHandler dch) {
    table.addDoubleClickListener(dch);
}
WgtIntBox.java 文件源码 项目:fullmetalgalaxy 阅读 25 收藏 0 点赞 0 评论 0
@Override
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler p_handler)
{
  return m_intBox.addDoubleClickHandler( p_handler );
}
GWTUIGenerator.java 文件源码 项目:qafe-platform 阅读 19 收藏 0 点赞 0 评论 0
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);
        }
    }
SpreadsheetCell.java 文件源码 项目:qafe-platform 阅读 23 收藏 0 点赞 0 评论 0
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return addDomHandler(handler, DoubleClickEvent.getType());
}
DesktopIcon.java 文件源码 项目:qafe-platform 阅读 20 收藏 0 点赞 0 评论 0
public HandlerRegistration addDoubleClickHandler(final DoubleClickHandler handler) { 
    return addDomHandler(handler, DoubleClickEvent.getType()); 
}
DesktopIcon.java 文件源码 项目:qafe-platform 阅读 21 收藏 0 点赞 0 评论 0
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return image.addDoubleClickHandler(handler);
}
HTMLTable.java 文件源码 项目:gwt-gantt 阅读 19 收藏 0 点赞 0 评论 0
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
  return addDomHandler(handler, DoubleClickEvent.getType());
}
DataTable.java 文件源码 项目:hexa.tools 阅读 29 收藏 0 点赞 0 评论 0
public HandlerRegistration addCellDoubleClickHandler( final DoubleClickHandler handler )
{
    return addDomHandler( handler, DoubleClickEvent.getType() );
}
AbstractInput.java 文件源码 项目:putnami-web-toolkit 阅读 19 收藏 0 点赞 0 评论 0
@Override
public com.google.gwt.event.shared.HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return this.addDomHandler(handler, DoubleClickEvent.getType());
}
ListItem.java 文件源码 项目:putnami-web-toolkit 阅读 20 收藏 0 点赞 0 评论 0
@Override
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return this.addDomHandler(handler, DoubleClickEvent.getType());
}
Anchor.java 文件源码 项目:putnami-web-toolkit 阅读 24 收藏 0 点赞 0 评论 0
@Override
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return this.addDomHandler(handler, DoubleClickEvent.getType());
}


问题


面经


文章

微信
公众号

扫码关注公众号