Package org.richfaces.skin

Examples of org.richfaces.skin.SkinFactory


            FacesContext context = FacesContext.getCurrentInstance();

            ResourcePath location = resourcePath;

            if (ResourceSkinUtils.isSkinDependent(resourcePath.toExternalForm())) {
                SkinFactory skinFactory = SkinFactory.getInstance(context);
                String skinName = skinFactory.getSkin(context).getName();
                location = new ResourcePath(ResourceSkinUtils.evaluateSkinInPath(resourcePath.toExternalForm(), skinName));
            }

            return new ResourceServletMapping(location).getResourcePath(context);
        }
View Full Code Here


    public String getContentType() {
        return getWrapped().getImageType().getMimeType();
    }

    protected String getValueParameter(FacesContext context, String name) {
        SkinFactory skinFactory = SkinFactory.getInstance(context);

        Skin skin = skinFactory.getSkin(context);
        String value = (String) skin.getParameter(context, name);

        if (value == null || value.length() == 0) {
            skin = skinFactory.getDefaultSkin(context);
            value = (String) skin.getParameter(context, name);
        }

        return value;
    }
View Full Code Here

        return decodeColor((String) skin.getParameter(context, name));
    }

    protected Integer getHeight(FacesContext context, String heightParamName) {
        SkinFactory skinFactory = SkinFactory.getInstance(context);
        Skin skin = skinFactory.getSkin(context);

        String height = (String) skin.getParameter(context, heightParamName);
        if (height == null || height.length() == 0) {
            skin = skinFactory.getDefaultSkin(context);
            height = (String) skin.getParameter(context, heightParamName);
        }

        if (height != null && height.length() != 0) {
            return Integer.valueOf(HtmlDimensions.decode(height).intValue());
View Full Code Here

  return true;
    }


    protected String getValueParameter(FacesContext context, String name) {
  SkinFactory skinFactory = SkinFactory.getInstance();

  Skin skin = skinFactory.getSkin(context);
  String value = (String) skin.getParameter(context, name);

  if (value == null || value.length() == 0) {
      skin = skinFactory.getDefaultSkin(context);
      value = (String) skin.getParameter(context, name);
  }

  return value;
    }
View Full Code Here

            return DIMENSION;
        }
    }

    protected final Integer getHeight(FacesContext context, String heightParamName) {
        SkinFactory skinFactory = SkinFactory.getInstance();
        Skin skin = skinFactory.getSkin(context);

        String height = (String) skin.getParameter(context, heightParamName);
        if (height == null || height.length() == 0) {
            skin = skinFactory.getDefaultSkin(context);
            height = (String) skin.getParameter(context, heightParamName);
        }

        if (height != null && height.length() != 0) {
            return Integer.valueOf(HtmlDimensions.decode(height).intValue());
View Full Code Here

  return true;
    }


    protected String getValueParameter(FacesContext context, String name) {
  SkinFactory skinFactory = SkinFactory.getInstance();

  Skin skin = skinFactory.getSkin(context);
  String value = (String) skin.getParameter(context, name);

  if (value == null || value.length() == 0) {
      skin = skinFactory.getDefaultSkin(context);
      value = (String) skin.getParameter(context, name);
  }

  return value;
    }
View Full Code Here

  protected Object getDataToStore(FacesContext context,
      String iconColorParam,
      String defaultIconColorParam,
      String borderColorParam,
      String defaultBorderColorParam) {
    SkinFactory skinFactory = SkinFactory.getInstance();
    Skin skin = skinFactory.getSkin(context);
    Skin defaultSkin = skinFactory.getDefaultSkin(context);
   
    byte [] ret = new byte[6];
   
    Color color = null;
    Zipper2 zipper = new Zipper2(ret);
View Full Code Here

            return DIMENSION;
        }
    }

    protected final Integer getHeight(FacesContext context, String heightParamName) {
        SkinFactory skinFactory = SkinFactory.getInstance();
        Skin skin = skinFactory.getSkin(context);

        String height = (String) skin.getParameter(context, heightParamName);
        if (height == null || height.length() == 0) {
            skin = skinFactory.getDefaultSkin(context);
            height = (String) skin.getParameter(context, heightParamName);
        }

        if (height != null && height.length() != 0) {
            return Integer.valueOf(HtmlDimensions.decode(height).intValue());
View Full Code Here

    public boolean isCacheable() {
  return true;
    }

    protected String getValueParameter(FacesContext context, String name) {
  SkinFactory skinFactory = SkinFactory.getInstance();

  Skin skin = skinFactory.getSkin(context);
  String value = (String) skin.getParameter(context, name);

  if (value == null || value.length() == 0) {
      skin = skinFactory.getDefaultSkin(context);
      value = (String) skin.getParameter(context, name);
  }

  return value;
    }
View Full Code Here

    }
    UIComponent component = (UIComponent) (data instanceof UIComponent ? data:null);
    TemplateContext templateContext = new TemplateContext(null,context,component);
    Object value = template.getValue(templateContext);
    if(null == value){
        SkinFactory skinFactory = SkinFactory.getInstance();
        int hashCode = skinFactory.getSkin(context).hashCode(context);
        int baseHashCode = skinFactory.getBaseSkin(context).hashCode(context);
        value = ByteBuffer.allocate(4*2).putInt(hashCode).putInt(baseHashCode).array();
    }
    return value;
  }
View Full Code Here

TOP

Related Classes of org.richfaces.skin.SkinFactory

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.