Package org.zkoss.zk.ui.metainfo

Examples of org.zkoss.zk.ui.metainfo.LanguageDefinition$LabelTemplate


   */
  public static final ComponentDefinition
  getDefinitionByDeviceType(String deviceType, Class cls) {
    for (Iterator it = LanguageDefinition.getByDeviceType(deviceType).iterator();
    it.hasNext();) {
      final LanguageDefinition ld = (LanguageDefinition)it.next();
      try {
        return ld.getComponentDefinition(cls);
      } catch (DefinitionNotFoundException ex) { //ignore
      }
    }
    return null;
  }
View Full Code Here


   HttpServletRequest request, HttpServletResponse response,
   String deviceType) {
     final StringWriter sw = new StringWriter();
     for (Iterator it = LanguageDefinition.getByDeviceType(deviceType).iterator();
     it.hasNext();) {
       final LanguageDefinition langdef = (LanguageDefinition)it.next();
      for (Iterator it2 = langdef.getCSSURIs().iterator(); it2.hasNext();) {
        final String uri = (String)it2.next();
        try {
          Servlets.include(ctx, request,
            HttpBufferedResponse.getInstance(response, sw), uri, null, 0);
        } catch (Throwable ex) {
View Full Code Here

  private static boolean isEmpty(String s) {
    return s == null || s.length() == 0;
  }
  private static boolean isRawLabel(Component comp) {
    final LanguageDefinition langdef =
      comp.getDefinition().getLanguageDefinition();
    return langdef != null && langdef.isRawLabel();
  }
View Full Code Here

        }
      } else {
        final int j = text.indexOf(':');
        if (j >= 0) {
          final String ext = text.substring(0, j);
          final LanguageDefinition ld = LanguageDefinition.getByExtension(ext);
          final ComponentDefinition cd = ld.getComponentDefinitionIfAny(text.substring(j+1));
          if (cd != null) {
            setAsText0(cd);
            return;
          }
        } else {
          //TODO: search in user specified extention order?
          final List langds = LanguageDefinition.getAll();
          for (final Iterator it = langds.iterator(); it.hasNext();) {
            final LanguageDefinition ld = (LanguageDefinition) it.next();
            final ComponentDefinition cd = ld.getComponentDefinitionIfAny(text);
            if (cd != null) {
              setAsText0(cd);
              return;
            }
          }
View Full Code Here

public class ZssappWebInit implements WebAppInit {

  public void init(WebApp wapp) throws Exception {

    // use ZK PE's widget implementation if available
    LanguageDefinition langDef = LanguageDefinition.getByExtension("zul");
    ComponentDefinition colorButtonDef = langDef
        .getComponentDefinitionIfAny("colorbutton");
    if (colorButtonDef != null && WebApps.getFeature("pe")) {
      colorButtonDef.setDefaultWidgetClass("zssappex.Colorbutton");
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.metainfo.LanguageDefinition$LabelTemplate

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.