Package org.ajax4jsf.util

Examples of org.ajax4jsf.util.Zipper2


    if (objectArray == null) {
      return null;
    }
   
    SeparatorData separatorData = new SeparatorData();
    Zipper2 zipper2 = new Zipper2(objectArray);
    separatorData.setHeaderBackgroundColor(zipper2.nextIntColor());
    separatorData.setHeaderGradientColor(zipper2.nextIntColor());
    separatorData.setHeaderTextColor(zipper2.nextIntColor());
    separatorData.setFontSize(zipper2.nextShort());
    separatorData.setSeparatorHeight(zipper2.nextShort());
   
    return separatorData;
  }
View Full Code Here


    if (null == tmp || "".equals(tmp)) {
      tmp = (String) defaultSkin.getParameter(context, skinParameter);
    }
   
    byte[] ret = new byte[13];
    Zipper2 zipper2 = new Zipper2(ret).addColor(HtmlColor.decode( tmp == null ? "#224986" : tmp ).getRGB());
   
    skinParameter = "headerGradientColor";
    tmp = (String) skin.getParameter(context, skinParameter);
    if (null == tmp || "".equals(tmp)) {
      tmp = (String) defaultSkin.getParameter(context, skinParameter);
    }
    zipper2.addColor(HtmlColor.decode( tmp == null ? "#CCCCFF" : tmp).getRGB());
   
    skinParameter = "headerTextColor";
    tmp = (String) skin.getParameter(context, skinParameter);
    if (null == tmp || "".equals(tmp)) {
      tmp = (String) defaultSkin.getParameter(context, skinParameter);
    }
    zipper2.addColor(HtmlColor.decode( tmp == null ? "#000000" : tmp ).getRGB());
   
    skinParameter = "headerSizeFont";
    tmp = (String) skin.getParameter(context, skinParameter);
    if (null == tmp || "".equals(tmp)) {
      tmp = (String) defaultSkin.getParameter(context, skinParameter);
    }
    zipper2.addShort((short) HtmlDimensions.decode( tmp == null ? "11px" : tmp ).intValue());
    zipper2.addShort((short) resolveBarHeight(data));
   
    return ret;
  }
View Full Code Here

        PANEL_BORDER_COLOR);
    String generalTextColor = getSkinParameter(skin, defaultSkin, context,
        GENERAL_TEXT_COLOR);

    byte[] ret = new byte[12];
    Zipper2 zipper2 = new Zipper2(ret);
    zipper2.addColor(HtmlColor.decode(additionalBackgroundColor).getRGB());
    zipper2.addColor(HtmlColor.decode(selectControlColor).getRGB());
    zipper2.addColor(HtmlColor.decode(panelBorderColor).getRGB());
    zipper2.addColor(HtmlColor.decode(generalTextColor).getRGB());

    return ret;
  }
View Full Code Here

  protected Object deserializeData(byte[] objectArray) {
    if (objectArray == null) {
      return null;
    }
    Object[] colors = new Object[5];
    Zipper2 z = new Zipper2(objectArray);
    colors[0] = z.nextColor();
    colors[1] = z.nextColor();
    colors[2] = z.nextColor();
    colors[3] = z.nextColor();

    return colors;
  }
View Full Code Here

      if(objectArray == null){
        return null;
      }
     
        SimpleSeparatorData separatorData = new SimpleSeparatorData();
      Zipper2 zipper2 = new Zipper2(objectArray);
        separatorData.setHeight(zipper2.nextShort());
      separatorData.setColor(zipper2.nextIntColor());
      separatorData.setLineType(zipper2.nextByte());
     
        return separatorData;
    }
View Full Code Here

        byte[] ret = new byte[6];
       
        String tmp = (String) ((UIComponent) data).getAttributes().get("height");
        int height = (tmp == null || "".equals(tmp)) ? SeparatorRendererBase.DEFAULT_HEIGHT : HtmlDimensions.decode(tmp).intValue();
        Zipper2 zipper2 = new Zipper2(ret).addShort((short) height);

        String skinParameter = "headerBackgroundColor";
        tmp = (String) skin.getParameter(context, skinParameter);
        if (null == tmp || "".equals(tmp)) {
      Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
      tmp = (String) defaultSkin.getParameter(context, skinParameter);
    }
        zipper2.addColor(HtmlColor.decode(tmp == null ? "#4169E1" : tmp).getRGB());

        //XXX by nick - fantonov - ((UISeparator)data).getLineType() ?
        tmp = (String) ((UISeparator) data).getLineType();
        int lineType = LINE_TYPE_SOLID;
        if (tmp.equalsIgnoreCase(SeparatorRendererBase.LINE_TYPE_DOTTED)) {
            lineType = LINE_TYPE_DOTTED;
        } else if (tmp.equalsIgnoreCase(SeparatorRendererBase.LINE_TYPE_DASHED)) {
            lineType = LINE_TYPE_DASHED;
        } else
        if (tmp.equalsIgnoreCase(SeparatorRendererBase.LINE_TYPE_DOUBLE) && height > 2)
        {
            lineType = LINE_TYPE_DOUBLE;
        }
        zipper2.addByte((byte) lineType);
        return ret;
    }
View Full Code Here

     * @see InternetResourceBase#getDataToStore(FacesContext, Object)
     */
    protected Object getDataToStore(FacesContext context, Object data) {
        byte[] retVal = new byte[3 * 1];
        progressbarBasicColor = getColorValueParameter(context, "selectControlColor");
        new Zipper2(retVal).addColor(progressbarBasicColor);

        return retVal;
    }
View Full Code Here

    /**
     * @see InternetResourceBase#deserializeData(byte[])
     */
    protected Object deserializeData(byte[] objectArray) {
        if (objectArray != null) {
            Zipper2 zipper2 = new Zipper2(objectArray);
            progressbarBasicColor = zipper2.nextColor();
        }

        return objectArray;
    }
View Full Code Here

  protected Object deserializeData(byte[] objectArray) {
    if (objectArray == null) {
      return null;
    }
   
    return new Integer(new Zipper2(objectArray).nextIntColor());
  }
View Full Code Here

      headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
    }
   
    int intValue = HtmlColor.decode( headerTextColor == null ? "#000000":headerTextColor ).getRGB();
    byte[] ret = new byte[3];
    new Zipper2(ret).addColor(intValue);
   
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.util.Zipper2

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.