Package org.apache.myfaces.trinidad.skin

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


    Object altText = null;

    if (color != null && color.getAlpha() == 0)
    {
      Icon icon = arc.getIcon(XhtmlConstants.COLOR_PALETTE_TRANSPARENT_ICON_NAME);
      if (icon != null)
      {
        // FIXME: this should happen with just rendering the Icon, *not*
        // by extracting the URI
        renderEncodedResourceURI(context, "src", icon.getImageURI(context, arc));
      }

      String key = editable ?
                    "af_inputColor.LAUNCH_PICKER_TIP" :
                    "af_chooseColor.TRANSPARENT";
      altText = arc.getTranslatedString(key);
    }
    else
    {
      String transparentURI = getBaseImageUri(context, arc) + TRANSPARENT_GIF;
      renderEncodedResourceURI(context, "src", transparentURI);

      if (editable)
        altText = arc.getTranslatedString("af_inputColor.LAUNCH_PICKER_TIP");
      else
        altText = "";
    }

    OutputUtils.renderAltAndTooltipForImage(context, arc, altText);

    writer.endElement("img");

    if (editable)
    {
      Icon overlay = arc.getIcon(SkinSelectors.AF_SELECT_INPUT_COLOR_SWATCH_OVERLAY_ICON_NAME);
      if (overlay != null)
        OutputUtils.renderIcon(context, arc, overlay, "", "middle");
      writer.endElement("a");
    }
  }
View Full Code Here


      String linkConverter = "border: none; background: inherit;";
      rw.writeAttribute("style", linkConverter,null);
    }
    else
    {
      Icon icon = _getDisclosureIcon(rc, disclosed);
      if (icon != null)
      {
        // Get the align
        String align = OutputUtils.getMiddleIconAlignment(rc);
        // Render the icon with the specified attrs
View Full Code Here

    {
      // If we've got a message type, get the Icon
      String iconName = getMessageIconName(messageType);
      if (iconName != null)
      {
        Icon icon = rc.getIcon(iconName);
        // If we've got an Icon, render it
        if (icon != null)
        {
          OutputUtils.renderIcon(context,
                                 rc,
View Full Code Here

    boolean selected = Boolean.TRUE.equals(value);
    boolean disabled = getDisabled(component, bean);

    String iconName = getIconName(selected, disabled);
    Icon icon = rc.getIcon(iconName);

    String altTextName = getIconAltTextName(selected);

    String shortDesc = rc.getTranslatedString(altTextName);
    OutputUtils.renderIcon(context, rc, icon, shortDesc, null );
View Full Code Here

        "/adf/images/t.gif");
      rw.endElement("img");
    }
    else
    {
      Icon icon = rc.getIcon(name);

      if (icon == null)
      {
        StringBuffer fullName = new StringBuffer(_ICON_NAME_PREFIX.length() +
                                                 name.length() +
                                                 _ICON_NAME_SUFFIX.length());
        fullName.append(_ICON_NAME_PREFIX);
        char firstChar = Character.toUpperCase(name.charAt(0));
        fullName.append(firstChar);
        fullName.append(name.substring(1));
        fullName.append(_ICON_NAME_SUFFIX);
        icon = rc.getIcon(fullName.toString());
      }

      // If we've got an Icon, and it has content, render it
      if ((icon != null) && !icon.isNull())
      {
        rw.startElement("span", comp);

        // If this icon renders as an image, don't embed it in a span
        boolean embed = icon.getImageURI(context, rc) == null;
        if (embed)
        {
          renderId(context, comp);
          // Don't render style class, as it's handled by the icon code
          renderAllAttributes(context, rc, comp, bean, false);
        }
        // ... unless we have inlineStyle or Javascript, which won't
        // get rendered on the icon itself.  If none are present,
        // our ResponseWriter will trim the unneeded span
        else
        { // render the events only if the browser supports JavaScript
          if (supportsScripting(rc))
          {
            renderEventHandlers(context, comp, bean);
          }
        }

        // inlineStyle, if set, always goes on the span (today)
        renderInlineStyle(context, rc, comp, bean);

        icon.renderIcon(context, rc,
                        _getNodeAttributeMap(context, comp, bean, embed));
        rw.endElement("span");
      }
    }
  }
View Full Code Here

        (increment) ?
        SkinSelectors.AF_INPUT_NUMBER_SPINBOX_INCREMENT_DISABLED_ICON_NAME :
        SkinSelectors.AF_INPUT_NUMBER_SPINBOX_DECREMENT_DISABLED_ICON_NAME;
    }

    Icon icon = rc.getIcon(iconName);
    if ((icon != null) && !icon.isNull())
    {
      // Render Link with onmousedown and onmouseup event handlers
      if (!disabled)
      {
        rw.startElement("a", component);
View Full Code Here

    }

    if (getShowRequired(component, bean))
    {
      // Get the required Icon from the context
      Icon icon = rc.getIcon(SkinSelectors.REQUIRED_ICON_ALIAS_NAME);
      if (icon != null)
      {
        String vAlign = getDefaultValign(component, bean);
        _renderIcon(context, rc, icon, null, null, null, "REQUIRED_TIP", vAlign);
      }
View Full Code Here

    }

    if (iconName != null)
    {
      // Get the Icon to render from the skin
      Icon icon = rc.getIcon(iconName);

      if (icon != null)
      {
        _renderIcon(context,
                    rc,
View Full Code Here

    boolean isLastChild   = false;
    boolean isFirstChild  = true;
    int renderedCount     = 0;
    int nextVisChildIndex = 1;
    UIComponent stamp = getStamp(context, rc, component, bean);
    Icon separatorIcon = rc.getIcon(
                            SkinSelectors.AF_NAVIGATION_PATH_SEPARATOR_ICON_NAME);

    // use the focusKey to stamp out path
    if(stamp != null)
    {
View Full Code Here

    boolean          isLine,
    boolean          leftToRight)
  {
    if (!isLine || !isShowLines(rc))
      return null;
    Icon icon = rc.getIcon(SkinSelectors.AF_TREE_LINE_ICON);
    return (icon == null) ? null : icon.getImageURI(context, rc).toString();
  }
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.