Package org.richfaces.skin

Examples of org.richfaces.skin.Skin$Preferable


    }
   
    public void testProgressBarBg() throws Exception {
      ProgressBarBg bg = new ProgressBarBg();
 
    Skin skin = SkinFactory.getInstance().getSkin(facesContext);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
   
    String backgroundColor = getSkinParameter(skin, defaultSkin, facesContext, "selectControlColor");   
    assertNotNull(backgroundColor);
       
    byte [] data = (byte []) bg.getDataToStore(facesContext, null);
View Full Code Here


    }
   
    public void testProgressBarAnimatedBg() throws Exception {
      ProgressBarAnimatedBg bg = new ProgressBarAnimatedBg();
 
    Skin skin = SkinFactory.getInstance().getSkin(facesContext);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
   
    String backgroundColor = getSkinParameter(skin, defaultSkin, facesContext, "selectControlColor");   
    assertNotNull(backgroundColor);
       
    byte [] data = (byte []) bg.getDataToStore(facesContext, null);
View Full Code Here

 
  public void testSaveResources(){
   
    SpinnerButtonImage img = new SpinnerButtonUp();
 
    Skin skin = SkinFactory.getInstance().getSkin(facesContext);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
   
    String skinParameter = "headerTextColor";
    String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
   
    if (null == headerTextColor || "".equals(headerTextColor))
      headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
   
    headerTextColor = headerTextColor == null ? "#000000" : headerTextColor;
   
    Color color1 = HtmlColor.decode(headerTextColor);
   
View Full Code Here

    /* (non-Javadoc)
     * @see com.exadel.vcp.tests.ThreadedVcpJsfTestCase.TestCaseRunnable#runTestCase(javax.faces.context.FacesContext)
     */
    public void runTestCase(FacesContext context) throws Throwable {
      context.getExternalContext().getRequestMap().put("test", new Bean());
      Skin skin = SkinFactory.getInstance().getSkin(context);
      assertNotNull(skin);
      assertEquals("TEST", skin.getRenderKitId(context));
      assertEquals("binded.string", skin.getParameter(context, "bind.property"));
      assertEquals("bindedstring", skin.getParameter(context, "string.property"));
      assertEquals("10", skin.getParameter(context, "int.property"));
      assertNull(skin.getParameter(context, "notexist"));
    }
View Full Code Here

 
  public void testSaveResources(){
   
    MenuNodeImage img = new MenuNodeImage();
 
    Skin skin = SkinFactory.getInstance().getSkin(facesContext);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
   
    String skinParameter1 = "generalTextColor";
    String generalTextColor = (String) skin.getParameter(facesContext, skinParameter1);
   
    if (null == generalTextColor || "".equals(generalTextColor))
      generalTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter1);
   
    generalTextColor = generalTextColor == null ? "#4A75B5": generalTextColor;
       
    Color color1 = HtmlColor.decode(generalTextColor);
   
    String skinParameter2 = "tabDisabledTextColor";
   
    String textColor = (String) skin.getParameter(facesContext, skinParameter2);
   
    if (null == textColor || "".equals(textColor))
      textColor = (String) defaultSkin.getParameter(facesContext, skinParameter2);
   
    textColor = textColor == null ? "#6A92CF" : textColor;
     
    Color color2 = HtmlColor.decode(textColor);
     
View Full Code Here

 
public void testSaveResources(){
   
    PanelMenuIconBasic icon = new PanelMenuIconChevron();
 
    Skin skin = SkinFactory.getInstance().getSkin(facesContext);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
   
    String skinParameter = "headerTextColor";
    String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
   
    if (null == headerTextColor || "".equals(headerTextColor))
      headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
   
    assertNotNull(headerTextColor);
   
    Color color1 = HtmlColor.decode(headerTextColor);
   
View Full Code Here

 
  public void testSaveResources(){
   
    ScrollableDataTableIconSplit icon = new ScrollableDataTableIconSplit();
 
    Skin skin = SkinFactory.getInstance().getSkin(facesContext);
    Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
   
    String skinParameter = "headerTextColor";
    String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
   
    if (null == headerTextColor || "".equals(headerTextColor))
      headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
   
    assertNotNull(headerTextColor);
   
    Color color1 = HtmlColor.decode(headerTextColor);
   
    skinParameter = "headerBackgroundColor";
   
    String headerBackgroundColor = (String) skin.getParameter(facesContext, skinParameter);
    if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
      headerBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
   
    assertNotNull(headerBackgroundColor);
   
    Color color2 = HtmlColor.decode(headerBackgroundColor);
       
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

      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

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.