Package org.richfaces.skin

Examples of org.richfaces.skin.Skin$Preferable


    }

    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 value;
    }

    protected Integer getColorValueParameter(FacesContext context, String name, boolean useDefault) {
        Skin skin;
        if (useDefault) {
            skin = SkinFactory.getInstance(context).getDefaultSkin(context);
        } else {
            skin = SkinFactory.getInstance(context).getSkin(context);
        }

        return decodeColor((String) skin.getParameter(context, name));
    }
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());
        } else {
View Full Code Here

    }

    @PostConstructResource
    public final void initialize() {
        FacesContext context = FacesContext.getCurrentInstance();
        Skin skin = SkinFactory.getInstance(context).getSkin(context);

        String gradientTypeString = null;
        if (gradientTypeString == null || gradientTypeString.length() == 0) {
            gradientTypeString = (String) skin.getParameter(context, Skin.GRADIENT_TYPE);
        }

        this.gradientType = GradientType.getByParameter(gradientTypeString);

        initializeProperties(context, skin);

        this.headerBackgroundColor = skin.getColorParameter(context, baseColor);
        this.headerGradientColor = skin.getColorParameter(context, gradientColor);
    }
View Full Code Here

    }

    @PostConstructResource
    public void initialize() {
        FacesContext context = FacesContext.getCurrentInstance();
        Skin skin = SkinFactory.getInstance(context).getSkin(context);
        Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
        Integer colorParameter = skin.getColorParameter(context, disabled ? "tabDisabledTextColor" : Skin.HEADER_TEXT_COLOR);
        if (colorParameter == null) {
            colorParameter = defaultSkin.getColorParameter(context, disabled ? "tabDisabledTextColor" : Skin.HEADER_TEXT_COLOR);
        }
        color = new Color(colorParameter);
    }
View Full Code Here


    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 value;
    }

    protected Integer getColorValueParameter(FacesContext context, String name, boolean useDefault) {
  Skin skin;
  if (useDefault) {
      skin = SkinFactory.getInstance().getDefaultSkin(context);
  } else {
      skin = SkinFactory.getInstance().getSkin(context);
  }

  return decodeColor((String) skin.getParameter(context,name));
    }
View Full Code Here

        }
    }

    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());
        } else {
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

        setRenderer(new GifRenderer());
        setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
    }

    protected Object getDataToStore(FacesContext context, Object data) {
        Skin skin = SkinFactory.getInstance().getSkin(context);
        String colorParameterName = "panelBorderColor";
        String color = (String) skin.getParameter(context, colorParameterName);
        if (color == null || color.length() == 0) {
            Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
          color = (String) defaultSkin.getParameter(context, colorParameterName);
        }
       
        if (color == null) {
          return null;
        }
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.