Package org.zkoss.zk.ui.event

Examples of org.zkoss.zk.ui.event.EventThreadInit


    final List inits = new LinkedList();
    for (int j = 0; j < ary.length; ++j) {
      final Class klass = (Class)ary[j];
      try {
        final EventThreadInit init =
          (EventThreadInit)klass.newInstance();
        init.prepare(comp, evt);
        inits.add(init);
      } catch (Throwable ex) {
        throw UiException.Aide.wrap(ex);
        //Don't intercept; to prevent the event being processed
      }
View Full Code Here


  public boolean invokeEventThreadInits(List inits, Component comp, Event evt)
  throws UiException {
    if (inits == null || inits.isEmpty()) return true; //not to ignore

    for (Iterator it = inits.iterator(); it.hasNext();) {
      final EventThreadInit fn = (EventThreadInit)it.next();
      try {
        try {
          if (!fn.init(comp, evt))
            return false; //ignore the event
        } catch (AbstractMethodError ex) { //backward compatible prior to 3.0
          final Method m = fn.getClass().getMethod(
            "init", new Class[] {Component.class, Event.class});
          Fields.setAccessible(m, true);
          m.invoke(fn, new Object[] {comp, evt});
        }
      } catch (Throwable ex) {
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.event.EventThreadInit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.