本文整理汇总了Java中com.google.gwt.event.dom.client.DoubleClickHandler类的典型用法代码示例。如果您正苦于以下问题:Java DoubleClickHandler类的具体用法?Java DoubleClickHandler怎么用?Java DoubleClickHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DoubleClickHandler类属于com.google.gwt.event.dom.client包,在下文中一共展示了DoubleClickHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FilterButton
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
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);
}
}
示例2: getStreamFilter
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
/**
* 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;
}
示例3: addMapHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
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);
}
}
示例4: LogPanel
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
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);
}
示例5: addDoubleClickHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
protected HandlerRegistration addDoubleClickHandler(DoubleClickHandler doubleClickhandler)
{
return addDomHandler(doubleClickhandler, DoubleClickEvent.getType());
}
示例6: blockDoubleClicking
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
/** 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());
}
示例7: addDoubleClick
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
private void addDoubleClick(final TablePanel table, final boolean isTags) {
DoubleClickHandler dch = new DoubleClickHandler() {
public void onDoubleClick(DoubleClickEvent event) {
resubmitSearch(table, isTags);
}
};
table.addDoubleClickListner(dch);
}
示例8: createDoubleClickListener
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
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);
}
};
}
示例9: onDoubleClick
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
public void onDoubleClick(DoubleClickEvent event) {
if (service.getIndexStateService().isEnabled(index)) {
for (DoubleClickHandler handler : doubleClickHandlers) {
handler.onDoubleClick(event);
}
}
}
示例10: addDoubleClickHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
return addDomHandler(handler, DoubleClickEvent.getType());
}
示例11: addDoubleClickHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
@Override
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
return addDomHandler(handler, DoubleClickEvent.getType());
}
示例12: addDoubleClickHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
@Override
public HandlerRegistration addDoubleClickHandler( DoubleClickHandler handler) {
return addDomHandler(handler, DoubleClickEvent.getType() );
}
示例13: addDoubleClickHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
@Override
public final HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
return addDomHandler(handler, DoubleClickEvent.getType());
}
示例14: FileStructureImpl
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
@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);
}
示例15: addDoubleClickHandler
import com.google.gwt.event.dom.client.DoubleClickHandler; //导入依赖的package包/类
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
return addDomHandler(handler, DoubleClickEvent.getType());
}