本文整理了Java中org.zkoss.zk.ui.event.Event.getTarget()
方法的一些代码示例,展示了Event.getTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getTarget()
方法的具体详情如下:
包路径:org.zkoss.zk.ui.event.Event
类名称:Event
方法名:getTarget
[英]Returns the target component that receives this event, or null if broadcast.
[中]
代码示例来源:origin: org.zkoss.zk/zkplus
public AfterEvent(String evtnm, Event event) {
super(evtnm, event.getTarget(), event);
}
}
代码示例来源:origin: org.zkoss.zk/zk
/** Sends the event to the target specified in the event, and processes it immediately.
*
* <p>Note: {@link Event#getTarget} cannot be null.
*/
public static void sendEvent(Event event) {
sendEvent(event.getTarget(), event);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.skintest
public void onSort$lbTests(Event event) {
event = ZKUtil.getEventOrigin(event);
colSort = (Listheader) event.getTarget();
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.problem
public void onSort$lbProblems(Event event) {
event = ZKUtil.getEventOrigin(event);
colSort = (Listheader) event.getTarget();
}
代码示例来源:origin: org.zkoss.zk/zkbind
public void onEvent(Event event) throws Exception {
final Component comp = event.getTarget();
comp.removeEventListener(BinderImpl.ON_BIND_INIT, this);
getExtension().removeLifeCycleHandling(comp);
reInitBinder(comp);
}
});
代码示例来源:origin: org.carewebframework/org.carewebframework.ext.performance
/**
* Returns the event log for the given event.
*
* @param event event.
* @return the event log for the given event.
*/
public EventLog getEventLog(Event event) {
return getEventLog(event.getTarget(), event.getName(), null, true, false);
}
代码示例来源:origin: org.zkoss.zkforge/ckez
public void onEvent(Event event) throws Exception {
if (selBtn !=null)
selBtn.setSclass(null);
selBtn = (Toolbarbutton) event.getTarget();
selBtn.setSclass("sel");
}
});
代码示例来源:origin: org.zkoss.zk/zk
public void postEvent(int priority, Component realTarget, Event evt) {
postEvent(priority, realTarget != evt.getTarget() ? new ProxyEvent(realTarget, evt) : evt);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.documents
/**
* Double-clicking enters document view mode.
*
* @param event The onDoubleClick event.
*/
public void onDoubleClick$listBox(Event event) {
Component cmpt = ZKUtil.getEventOrigin(event).getTarget();
if (cmpt instanceof Listitem) {
Events.postEvent("onDeferredOpen", listBox, cmpt);
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification
/**
* Process a double-clicked notification.
*
* @param event The process item event.
*/
public void onProcessItem$lstNotification(Event event) {
event = ZKUtil.getEventOrigin(event);
Listitem item = (Listitem) event.getTarget();
Notification notification = (Notification) item.getValue();
processingController.process(Collections.singleton(notification));
}
代码示例来源:origin: org.zkoss.zk/zk
/** Constructor.
*
* <p>Notice that {@link #getTarget} is the same as the target of the given
* event. To retrieve the real target (passed thru the argument), please
* use {@link #getRealTarget} instead.
*
* @param realTarget the real target. If null, it means broadcast.
* @param event the proxied event.
*/
public ProxyEvent(Component realTarget, Event event) {
super(event.getName(), event.getTarget(), event.getData());
_realTarget = realTarget;
_event = event;
}
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1
private AbstractPatientListFilter getFilter(Event event) {
return getFilter((Listbox) ZKUtil.getEventOrigin(event).getTarget());
}
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1
private PatientListItem getItem(Event event) {
return getItem((Listbox) ZKUtil.getEventOrigin(event).getTarget());
}
代码示例来源:origin: org.zkoss.zk/zk
@SuppressWarnings("unchecked")
public void onEvent(Event event) throws Exception {
final Component clone = event.getTarget();
final GenericAutowireComposer composerClone = (GenericAutowireComposer) event.getData();
composerClone.doAfterCompose(clone);
clone.removeEventListener(ON_CLONE_DO_AFTER_COMPOSE, this);
}
}
代码示例来源:origin: org.zkoss.zk/zkbind
public void onEvent(Event event) throws Exception {
final Component comp = event.getTarget();
//remove mark to prevent zkbind1(B36-1968616) cause it not removed in detach handling listener
comp.removeAttribute(REMOVE_MARK);
comp.removeEventListener(ON_ZKBIND_LATER, this);
handleComponentAttached(comp);
}
});
代码示例来源:origin: org.zkoss.zk/zk
/** Echos an event.
* By echo we mean the event is fired after the client receives the AU
* responses and then echoes back.
* In other words, the event won't be processed in the current execution.
* Rather, it executes after the client receives the AU responses
* and then echoes back the event back.
*
* <p>It is usually if you want to prompt the user before doing a long
* operation. A typical case is to open a highlighted window to
* prevent the user from clicking any button before the operation gets done.
*
* @since 5.0.4
* @see #sendEvent
*/
public static final void echoEvent(Event event) {
echoEvent(event.getName(), event.getTarget(), event.getData());
}
代码示例来源:origin: org.zkoss.zk/zkbind
public void onEvent(Event event) throws Exception {
BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
try {
if (collector != null) {
collector.pushStack("ON_EVENT");
collector.addInfo(new EventInfo(event.getTarget(), event.getName(), null));
}
onEvent0(event);
} catch (Exception x) {
_log.error(x.getMessage(), x);
throw x;
} finally {
if (collector != null) {
collector.popStack();
}
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.problem
public void onDeleteNote$lstNotes(Event event) {
event = ZKUtil.getEventOrigin(event);
Listitem item = ZKUtil.findAncestor(event.getTarget(), Listitem.class);
ProblemNote pn = (ProblemNote) item.getValue();
if (PromptDialog
.confirm("Are you sure that you wish to delete this note:\n" + pn.getNumber() + " - " + pn.getNarrative(),
"Delete Note?")) {
item.detach();
if (VistAUtil.validateIEN(pn)) {
changedNotes.add(pn);
} else {
changedNotes.remove(pn);
}
}
}
代码示例来源:origin: org.zkoss.zk/zkbind
public void onEvent(Event event) throws Exception {
final Component comp = event.getTarget();
comp.removeAttribute(REMOVE_MARK);
comp.removeEventListener(BinderImpl.ON_BIND_CLEAN, this);
// Bug ZK-3045, we need to handle the detached component
// to remove all its references in a tracker.
if (comp.hasAttribute(BinderImpl.VAR)) {
Object ref = comp.getAttribute((String) comp.getAttribute(BinderImpl.VAR));
if (ref instanceof ReferenceBinding) {
BinderUtil.markHandling(comp, ((ReferenceBinding) ref).getBinder());
}
}
removeBindings(comp);
}
});
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.wonderbar
@Override
public void onEvent(Event event) throws Exception {
// TODO Auto-generated method stub
Component c = event.getTarget();
currentSelectedItem = (WonderbarItem) c.getAttribute(OBJECT_FOR_SELECT);
currentSelectedText = (String) c.getAttribute(STRING_FOR_SELECT);
Event fevent = new Event("onSelectFromBandbox", TestMenu.this);
Executions.getCurrent().postEvent(fevent);
}
内容来源于网络,如有侵权,请联系作者删除!