Package org.zkoss.zk.ui.ext

Examples of org.zkoss.zk.ui.ext.Native


  //Handling Native Component//
  /** Sets the prolog of the specified native component.
   */
  private static final
  void setProlog(CreateInfo ci, Component comp, NativeInfo compInfo) {
    final Native nc = (Native)comp;
    final Native.Helper helper = nc.getHelper();
    StringBuffer sb = null;
    final List prokids = compInfo.getPrologChildren();
    if (!prokids.isEmpty()) {
      sb = new StringBuffer(256);
      getNativeContent(ci, sb, comp, prokids, helper);
    }

    final NativeInfo splitInfo = compInfo.getSplitChild();
    if (splitInfo != null && splitInfo.isEffective(comp)) {
      if (sb == null) sb = new StringBuffer(256);
      getNativeFirstHalf(ci, sb, comp, splitInfo, helper);
    }

    if (sb != null && sb.length() > 0)
      nc.setPrologContent(
        sb.insert(0, (String)nc.getPrologContent()).toString());
  }
View Full Code Here


  /** Sets the epilog of the specified native component.
   * @param comp the native component
   */
  private static final
  void setEpilog(CreateInfo ci, Component comp, NativeInfo compInfo) {
    final Native nc = (Native)comp;
    final Native.Helper helper = nc.getHelper();
    StringBuffer sb = null;
    final NativeInfo splitInfo = compInfo.getSplitChild();
    if (splitInfo != null && splitInfo.isEffective(comp)) {
      sb = new StringBuffer(256);
      getNativeSecondHalf(ci, sb, comp, splitInfo, helper);
    }

    final List epikids = compInfo.getEpilogChildren();
    if (!epikids.isEmpty()) {
      if (sb == null) sb = new StringBuffer(256);
      getNativeContent(ci, sb, comp, epikids, helper);
    }

    if (sb != null && sb.length() > 0)
      nc.setEpilogContent(
        sb.append(nc.getEpilogContent()).toString());
  }
View Full Code Here

  //super//
  public Component newInstance(Page page, Component parent) {
    final Component comp = super.newInstance(page, parent);

    if (_dns != null) {
      final Native nc = (Native)comp;
      for (Iterator it = _dns.iterator(); it.hasNext();)
        nc.addDeclaredNamespace((Namespace)it.next());
    }

    return comp;
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.ext.Native

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.