Examples of Skin


Examples of org.apache.myfaces.trinidad.skin.Skin

    {
      // Get the Icon from the Skin
      UIXRenderingContext context = uix.getRenderingContext();
      RenderingContext arc = RenderingContext.getCurrentInstance();
      FacesContext fContext = context.getFacesContext();
      Skin skin = context.getSkin();
      Icon icon = skin.getIcon(name);

      Object uri = icon.getImageURI(fContext, arc);

      if (uri != null)
      {
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

    if (renderKitId == null)
      renderKitId = _RENDER_KIT_ID_DESKTOP;


    // figure out the base skin.
    Skin baseSkin = null;
    String skinExtends = skinNode.getSkinExtends();
   
    if (skinExtends != null)
      baseSkin = skinFactory.getSkin(null, skinExtends);
    if (baseSkin == null)
    {
      baseSkin = _getDefaultBaseSkin(skinFactory, renderKitId);
     
      if (skinExtends != null)
      {
        _LOG.severe("Unable to locate base skin \"{0}\" for " +
                    "use in defining skin of id \"{1}\", family " +
                    "\"{2}\", renderkit ID \"{3}\". Using the default base skin \"{4}\".",
                    new String[]{skinExtends, id, family, renderKitId, baseSkin.getId()});
      }

    }

    SkinExtension skin = new SkinExtension(baseSkin,
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

    String baseSkinId = (_RENDER_KIT_ID_PDA.equals(renderKitId)) ?
                          _SIMPLE_PDA_SKIN_ID :
                          _SIMPLE_DESKTOP_SKIN_ID;

    Skin baseSkin = factory.getSkin(null, baseSkinId);

    // It is an error if we were unable to find the base skin
    if (baseSkin == null)
      _LOG.severe(_UNKNOWN_BASE_SKIN_ERROR + baseSkinId);
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

    for (SkinAdditionNode skinAdditionNode : skinAdditionNodeList)
    {
      String skinId = skinAdditionNode.getSkinId();
      String styleSheetName = skinAdditionNode.getStyleSheetName();
 
      Skin skin = skinFactory.getSkin(fContext, skinId);
      if (skin != null && styleSheetName != null)
      { 
        // If the styleSheetName is in the META-INF/trinidad-skins.xml file, then
        // we prepend META-INF to the styleSheetName if it doesn't begin with '/'.
        // This way we can find the file when we go to parse it later.
        if (isMetaInfFile)
          styleSheetName = _prependMetaInf(styleSheetName);
        skin.registerStyleSheet(styleSheetName);
      }
    }   
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

    // If we didn't find a value in the local bundle, try getting
    // the translation from the base Skin.
    if (value == null)
    {
      Skin baseSkin = getBaseSkin();
      value = baseSkin.getTranslatedValue(lContext, key);
    }

    // If we found an translation, store it in the cache so that
    // we don't have to search for it again next time.
    _putCachedTranslatedValue(lContext, key, value);
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

  {
    Object value = super.getProperty(key);

    if ( value == null)
    {
      Skin baseSkin = getBaseSkin();
      value =  baseSkin.getProperty(key);
    }

    return value;

  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

      return icon;
    }

    // If we don't have the icon locally, check the base skin.

    Skin baseSkin = getBaseSkin();
    // get baseSkin's icon. Don't resolve to a real icon. If it is a
    // ReferenceIcon, return the ReferenceIcon.
    icon = baseSkin.getIcon(iconName, false);

    // we found the icon on the base Skin, but it is a ReferenceIcon.
    // find the actual icon
    if (resolve)
    {
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

      }
    }
    else
    {

      Skin baseSkin = getBaseSkin();
      icon = baseSkin.getIcon(refName, false);

      if (icon instanceof ReferenceIcon)
      {
        Icon resolvedIcon = _resolveReferenceIcon((ReferenceIcon)icon,
                                                   referencedIconStack);
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

                                    loader);
  }

  protected Skin getSkin(FacesContext context)
  {
    Skin skin = null;
    SkinFactory skinFactory = SkinFactory.getFactory();
    Object skinIdObj = context.getExternalContext().getRequestParameterMap().
      get("skinId");
    if (skinIdObj != null)
      skin = skinFactory.getSkin(context, skinIdObj.toString());
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Skin

    FacesContext   context,
    StringBuilder  builder,
    ResourceBundle bundle,
    Locale         locale)
  {
    Skin             skin = getSkin(context);
    LocaleContext    lc = new LocaleContextImpl(locale);

    // We get the keys from the bundle, but try to get the values from
    // the skin if possible
    Enumeration<String> keys = bundle.getKeys();
    boolean writtenOne = false;
    while (keys.hasMoreElements())
    {
      if (writtenOne)
        builder.append(",\n");
      else
        writtenOne = true;

      String key = keys.nextElement();
      String value;
      // If we can get it from the skin, that's better, but if not,
      // go to the bundle
      if (skin == null)
        value = bundle.getString(key);
      else
        value = skin.getTranslatedString(lc, key);
     
      builder.append("'");
      builder.append(key);
      builder.append("':'");
      _appendUnicodeString(builder, value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.