Package org.apache.myfaces.trinidad.skin

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


    FacesContext        context,
    RenderingContext    arc,
    Map<String, Object> attrs
    ) throws IOException
  {
    Icon icon = _getIcon(arc);

    icon.renderIcon(context, arc, attrs);
  }
View Full Code Here


  @Override
  public Object getImageURI(
    FacesContext        context,
    RenderingContext arc)
  {
    Icon icon = _getIcon(arc);

    return icon.getImageURI(context, arc);
  }
View Full Code Here

   * Override of Icon.getImageWidth().
   */
  @Override
  public Integer getImageWidth(RenderingContext arc)
  {
    Icon icon = _getIcon(arc);

    return icon.getImageWidth(arc);
  }
View Full Code Here

   * Override of Icon.getImageHeight().
   */
  @Override
  public Integer getImageHeight(RenderingContext arc)
  {
    Icon icon = _getIcon(arc);

    return icon.getImageHeight(arc);
  }
View Full Code Here

      }

    }
    // now I need to create the icon.
    // do not create an icon if isNullIcon is true.
    Icon icon = null;

    if (!isNullIcon)
    {
      if (text != null)
      {
View Full Code Here

  private void _renderLocatorIcon(
    FacesContext          fc,
    RenderingContext   arc)
    throws IOException
  {
    Icon icon = arc.getIcon(SkinSelectors.AF_TREE_TABLE_LOCATOR_ICON_NAME);

    if (icon != null)
    {
      Object altText = arc.getTranslatedString(_BREADCRUMBS_START_KEY);
View Full Code Here

  {
    // First check to see if we already have an Icon registered.
    // it might be a ReferenceIcon. If so, resolve the reference and
    // register the true icon (if resolve is true)

    Icon icon = super.getIcon(iconName, false);

    if (icon != null)
    {
      if (icon == _NULL_ICON)
        return null;

      if (resolve)
      {
        // if icon is a ReferenceIcon, I need to get the actual icon, and
        // re-register it.
        if (icon instanceof ReferenceIcon)
        {
          // go find the actual icon
          Icon resolvedIcon = _resolveReferenceIcon((ReferenceIcon)icon,
                                                     null);

          // register icon so we don't have to resolve reference next time.
          registerIcon(iconName, resolvedIcon);

          return resolvedIcon;
        }
      }
      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)
    {
      if (icon instanceof ReferenceIcon)
      {
        Icon resolvedIcon = _resolveReferenceIcon((ReferenceIcon)icon,
                                                   null);
        // register icon so we don't have to resolve reference next time.
        registerIcon(iconName, resolvedIcon);

        return resolvedIcon;
View Full Code Here

    referencedIconStack.push(refName);
    //

    // see if the referenced icon is registered already registered in this skin.
    Icon icon = super.getIcon(refName, false);

    if (icon != null)
    {
      if (icon instanceof ReferenceIcon)
      {
          Icon resolvedIcon = _resolveReferenceIcon((ReferenceIcon)icon,
                                                     referencedIconStack);
          return resolvedIcon;
      }
      else
      {
        return icon;
      }
    }
    else
    {

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

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

    if (isRightToLeft() && !iconName.endsWith(StyleUtils.RTL_CSS_SUFFIX))
    {
      // append :rtl to the mappedIconName. If no icon with that name,
      // default to getting the icon with the original mappedIconName.
      String rtlIconName = iconName + StyleUtils.RTL_CSS_SUFFIX;
      Icon rtlIcon = skin.getIcon(rtlIconName);

      if ((rtlIcon == null) || rtlIcon.isNull())
      {
        // we want :rtl icons to default to regular icons, not a NullIcon,
        //  which is what the Skin does.
        rtlIcon = skin.getIcon(iconName);
        if (rtlIcon != null)
View Full Code Here

  public Icon getIcon(
    String  iconName
    )
  {
    String mappedIconName = getSkinResourceMappedKey(iconName);
    Icon rtlIcon = null;
    Icon defaultRTLIcon = null;
    Skin skin = getSkin();
    if (mappedIconName != null)
    {
      if (getLocaleContext().isRightToLeft() &&
          (!mappedIconName.endsWith(StyleUtils.RTL_CSS_SUFFIX)))
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.skin.Icon

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.