Package org.richfaces.skin

Examples of org.richfaces.skin.Skin$Preferable


        }
      }
    }

    private Integer getColorValueParameter(FacesContext context, String name, boolean useDefault) {
      Skin skin;
      if (useDefault) {
        skin = SkinFactory.getInstance().getDefaultSkin(context);
      } else {
        skin = SkinFactory.getInstance().getSkin(context);
      }
     
      String tmp = (String) skin.getParameter(context,name);
      if (tmp!=null && tmp.length() != 0) {
        return new Integer(HtmlColor.decode(tmp).getRGB());
      } else {
        return null;
      }
View Full Code Here


    public boolean isTransient() {
        return false;
    }

    public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
        Skin skin = SkinFactory.getInstance(context).getSkin(context);
        Integer colorParameter = skin.getColorParameter(context, basicColorParamName);
        if (colorParameter == null) {
            Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
            colorParameter = defaultSkin.getColorParameter(context, basicColorParamName);
        }
        dataOutput.writeInt(colorParameter);
    }
View Full Code Here

    public String getContentType() {
        return "text/css";
    }

    private static int getSkinHashCode(FacesContext context) {
        Skin skin = SkinFactory.getInstance(context).getSkin(context);
        return skin.hashCode(context);
    }
View Full Code Here

                                     final UIComponent component) {
        String opacity = (String) component.getAttributes().get("shadowOpacity");
        String filterOpacity;

        if (null == opacity) {
            Skin skin = SkinFactory.getInstance().getSkin(context);
            opacity = (String) skin.getParameter(context, "shadowOpacity");
        }
        try {
            Double op = Double.valueOf(opacity);
            filterOpacity = Integer.toString(op.intValue() * 10);
            opacity = Double.toString(op.doubleValue() / 10);
View Full Code Here

    // user binding return skin instance.
    if (currentSkinOrName instanceof Skin) {
      return (Skin) currentSkinOrName;
    }
    String currentSkinName = currentSkinOrName.toString();
    Skin currentSkin = (Skin) skins.get(currentSkinName);
    // LAZY creation for skins, since, in case of EL expressions
    // for skin name, we don't can know all names of existing skins.
    if (currentSkin == null) {
      if (log.isDebugEnabled()) {
        log.debug(Messages.getMessage(Messages.CREATE_SKIN_INFO,
View Full Code Here

 
  public abstract Dimension calculateDimensions();
 
 
  protected Object getDataToStore(FacesContext context, Object data) {
    Skin skin = SkinFactory.getInstance().getSkin(context);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
   
    Color col = null;
   
    String skinParameter = "headerTextColor";
    String headerTextColor = (String) skin.getParameter(context, skinParameter);
    if (null == headerTextColor || "".equals(headerTextColor))
      headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
   
    if (headerTextColor == null) {
      return null;
    }
   
    col = HtmlColor.decode(headerTextColor);
   
    byte[] ret = new byte[6];
    Zipper.zip(ret, col.getRGB(), 0);
   
    skinParameter = "headerBackgroundColor";
    String headerBackgroundColor = (String) skin.getParameter(context, skinParameter);
    if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
      headerBackgroundColor = (String) defaultSkin.getParameter(context, skinParameter);
   
    if (headerBackgroundColor == null) {
      return null;
    }
   
View Full Code Here

 
  /**
   * @param data - pass icon color there
   */
  protected Object getDataToStore(FacesContext context, Object data) {
    Skin skin = SkinFactory.getInstance().getSkin(context);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
   
    byte[] ret = new byte[3];
   
    Color color = null;
   
    if (data!=null){
      color = HtmlColor.decode(data.toString());
    } else {
      String skinParameter = "headerTextColor";
      String headerTextColor = (String) skin.getParameter(context, skinParameter);
      if (null == headerTextColor || "".equals(headerTextColor))
        headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
     
      if(headerTextColor == null) {
        return null;
      }
     
View Full Code Here

     
        return separatorData;
    }
   
    protected Object getDataToStore(FacesContext context, Object data) {
        Skin skin = SkinFactory.getInstance().getSkin(context);

        byte[] ret = new byte[6];
       
        String tmp = (String) ((UIComponent) data).getAttributes().get("height");
        int height = HtmlDimensions.decode(tmp == null ? "6" : 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();
View Full Code Here

  protected Class getComponentClass() {
    return org.richfaces.component.UIToolTip.class;
  }

  public String getBgColor(FacesContext context, UIComponent component){
    Skin skin = getSkin(context);
    String color = (String) skin.getParameter(context,"headerBackgroundColor");
    return color;
  }
View Full Code Here

    String color = (String) skin.getParameter(context,"headerBackgroundColor");
    return color;
  }

  public String getColor(FacesContext context, UIComponent component){
    Skin skin = getSkin(context);
    String color = (String) skin.getParameter(context,"headerTextColor");
    return color;
  }
View Full Code Here

TOP

Related Classes of org.richfaces.skin.Skin$Preferable

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.