本文整理了Java中com.google.gwt.user.client.Event.getTarget()
方法的一些代码示例,展示了Event.getTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getTarget()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Event
类名称:Event
方法名:getTarget
[英]Returns the element that was the actual target of the given event.
[中]返回作为给定事件的实际目标的元素。
代码示例来源:origin: stackoverflow.com
@Command
public void setFocusOnRow(@BindingParam("evt") Event event) {
Combobox c = (Combobox) event.getTarget();
// select: highlight the value
c.select();
}
代码示例来源:origin: stackoverflow.com
@Listen("onClick = #menubar ~ menuitem")
public void changePage(Event event) {
event.getTarget(); // the specific button clicked
}
代码示例来源:origin: stackoverflow.com
@Listen("onClick = #contatti; onClick = #listeDiDistribuzione; onClick = #sottoscrizioni")
public void changePage(Event event) {
event.getTarget(); // the specific button clicked
}
代码示例来源:origin: stackoverflow.com
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.EventInterceptor;
public class LogEventInterceptor implements EventInterceptor {
public Event beforeProcessEvent(Event event) {
System.out.println(event.getName() + " event received for + "
+ event.getTarget().getId() + "!!!");
return event;
}
// rest of the impl
代码示例来源:origin: org.eclipse.che.plugin/che-plugin-git-ext-git
private void setCheckBoxClickHandler(Path nodePath, Element checkBoxElement, boolean isChecked) {
Event.sinkEvents(checkBoxElement, Event.ONCLICK);
Event.setEventListener(
checkBoxElement,
event -> {
if (Event.ONCLICK == event.getTypeInt()
&& event.getTarget().getTagName().equalsIgnoreCase("label")) {
handleCheckBoxSelection(nodePath, isChecked);
delegate.refreshNodes();
}
});
}
代码示例来源:origin: stackoverflow.com
@Command
public void setupQuicksearchByEvent(@BindingParam("searchlayout")Event event, @BindingParam("prefix") String prefix, @BindingParam("tags") String tags) throws WrongValueException, SearchException, IOException
{
if(event instanceof InputEvent)
{
InputEvent inputEvent = (InputEvent) event;
String inputText = inputEvent.getValue();
List<String> searchFields = Arrays.asList(tags.split(","));
Map<UID, String> publishers = ZKLogic.findDocsStartingWith(prefix, searchFields, "proxy", inputText);
Combobox searchBox = (Combobox) event.getTarget();
searchBox.getChildren().clear();
for (Map.Entry<UID, String > entry : publishers.entrySet())
{
Comboitem item = new Comboitem();
item.setLabel(entry.getValue());
item.setValue(entry.getKey());
searchBox.appendChild(item);
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
Element target = nativeEvent.getTarget();
if (modal && !eventTargetsPopupOrPartner && (target != null)) {
blur(target);
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
Element target = nativeEvent.getTarget();
if (modal && !eventTargetsPopupOrPartner && (target != null)) {
blur(target);
代码示例来源:origin: net.wetheinter/gwt-user
Element target = nativeEvent.getTarget();
if (modal && !eventTargetsPopupOrPartner && (target != null)) {
blur(target);
内容来源于网络,如有侵权,请联系作者删除!