Package org.apache.myfaces.trinidad.skin

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


    boolean          isLeftToRight)
  {
    Object showLines = rc.getSkin().getProperty(SkinProperties.AF_TREE_SHOW_LINES);
    if (!isShowLines(rc))
      return null;
    Icon nodeBackgroundIcon = rc.getIcon(isLastSibling
        ? SkinSelectors.AF_TREE_LINE_LAST_ICON : SkinSelectors.AF_TREE_LINE_MIDDLE_ICON);
    return (nodeBackgroundIcon != null)
        ? nodeBackgroundIcon.getImageURI(context, rc).toString() : null;
  }
View Full Code Here


    int              expanded,
    boolean          isLastSibling,
    String           onclick
    ) throws IOException
  {
    Icon icon = null;
    String iconURI = null;

    String backgroundIconURI;
    String nodeBackgroundIconURI;

    boolean isAbsoluteImageURI = true;

    String iconHeight = null;

    Object altText = null;

    String text = null;

    boolean isMacOS =
               Agent.PLATFORM_MACOS.equals(rc.getAgent().getPlatformName());
    // add in the expandability
    switch (expanded)
    {
      case NO_CHILDREN:
        icon = rc.getIcon(SkinSelectors.AF_TREE_NO_CHILDREN_ICON);
        if (icon == null || icon.getImageURI(context, rc) == null)
        {
          iconURI = TRANSPARENT_GIF;
          iconHeight = _ICON_HEIGHT;
          isAbsoluteImageURI = false;
        }
        break;
      case EXPAND_CLOSED:
        // "\u21D2"; // Double Arrow right

        if (isMacOS)
          // single arrow left
          text = rc.isRightToLeft() ? "\u2190" : "\u2192"; // single arrow right
        else if (isPDA(rc))
          //for PDAs use a simple "+" or "-" since miscellaneous unicode characters
          //are not supported
          text = "[+]"; //plus sign
        else // triangle left
          text = rc.isRightToLeft() ? "\u25C4" : "\u25BA"; // triangle right

        altText = rc.getTranslatedString(_EXPAND_TIP_KEY);
        icon = rc.getIcon(SkinSelectors.AF_TREE_COLLAPSED_ICON);
        break;
      case EXPAND_OPEN:
        //"\u21D3"; // double arrow down
        if (isMacOS)
          text = "\u2193"; // single arrow down
        else if (isPDA(rc))
          //for PDAs use a simple "+" or "-" since miscellaneous unicode characters
          //are not supported
          text = "[-]"; //plus sign
        else
          text = "\u25BC"; // triangle down

        altText = rc.getTranslatedString(_COLLAPSE_TIP_KEY);
        icon = rc.getIcon(SkinSelectors.AF_TREE_EXPANDED_ICON);
        break;
      case EXPAND_ALWAYS:
        if (isMacOS)
          text = "\u2193"; // single arrow down
        else if (isPDA(rc))
          text = "[-]"; //plus sign
        else
          text = "\u25BC"; // triangle down
        //for PDAs use a simple "+" or "-" since miscellaneous unicode character
        //s are not supported

        altText = rc.getTranslatedString(_DISABLED_COLLAPSE_TIP_KEY);
        icon = rc.getIcon(SkinSelectors.AF_TREE_EXPANDED_ICON);
        break;
    }

    if (iconURI == null && icon != null)
    {
      //This can be null so we need to check for it before doing toString
      Object o = icon.getImageURI(context, rc);
      if(o != null)
      {
        iconURI = o.toString();
      }
    }
View Full Code Here

    UIXHierarchy     tree,
    int              expand
    ) throws IOException
  {
    String nodeType = getNodeType(tree);
    Icon nodeIcon = getNodeIcon(rc, nodeType, expand);

    ResponseWriter writer = context.getResponseWriter();
    // render the node icon
    if (nodeIcon != null)
    {
      writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
      writer.writeAttribute(XhtmlConstants.WIDTH_ATTRIBUTE, _ICON_WIDTH, null);
      writer.writeAttribute(XhtmlConstants.HEIGHT_ATTRIBUTE, _ICON_HEIGHT, null);
      writer.writeAttribute(XhtmlConstants.VALIGN_ATTRIBUTE, XhtmlConstants.V_ALIGN_TOP,
                            null);

      _renderIcon(context, rc, nodeIcon.getImageURI(context, rc).toString(),
                  true, null, null, null);

      writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
    }
  }
View Full Code Here

  {
    if (nodeType == null || nodeType.length() == 0)
    {
      return null;
    }
    Icon icon = rc.getIcon(getNodeIconSelector(nodeType, expandedState));
    if (icon == null)
      if (expandedState != NO_CHILDREN)
      {
        icon = rc.getIcon(getNodeIconSelector(nodeType, NO_CHILDREN));
      }
View Full Code Here

      writer.writeAttribute(XhtmlConstants.STYLE_ATTRIBUTE,
                         "position:relative;top:0px;left:0px;margin-left:"+
                         depth * spacerWidth + "px", null);
    }

    Icon icon = _getIcon(rc, isTop, disabled);

    if (icon != null)
    {
      writer.startElement(XhtmlConstants.LINK_ELEMENT, null);
      String shortDesc =
View Full Code Here

    renderStyleClass(context, rc, SkinSelectors.SHUTTLE_HEADER_STYLE_CLASS);
    rw.writeAttribute("valign", "bottom", null);
    if (getRequired(component, bean) || getShowRequired(component, bean))
    {
      // Get the required Icon from the context
      Icon icon = rc.getIcon(SkinSelectors.REQUIRED_ICON_ALIAS_NAME);
      if (icon != null)
      {
        OutputUtils.renderIcon(context, rc, icon,
                               rc.getTranslatedString("REQUIRED_TIP"),
                               null);
View Full Code Here

    rw.startElement("a", null);
    // Write out Javascript
    // FIXME: this would be far better just written as Javascript
    // with onclick
    renderEncodedActionURI(context, "href", href);
    Icon icon = rc.getIcon(iconName);

    // FIXME: the icon previously had "p_OraDisplayBlock" rendered on it.
    // I suspect this came up in strict rendering mode
    if (icon != null)
      OutputUtils.renderIcon(context,
View Full Code Here

    FacesContext     facesContext,
    RenderingContext rc,
    String           altText
    ) throws IOException
  {
    Icon icon = rc.getIcon(SkinSelectors.AF_TREE_TABLE_FOCUS_ICON_NAME);

    if (icon != null)
    {
      // Render focus icon with embedded=true, since
      // focus icon is always rendered within its own link.
View Full Code Here

    Object altText = null;

    if (color != null && color.getAlpha() == 0)
    {
      Icon icon = rc.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, rc));
      }

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

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

    OutputUtils.renderAltAndTooltipForImage(context, rc, altText);

    writer.endElement("img");

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

  {
    UIComponent busyFacet = comp.getFacet(CoreStatusIndicator.BUSY_FACET);
    UIComponent readyFacet = comp.getFacet(CoreStatusIndicator.READY_FACET);

    boolean iconMode = false;
    Icon busyIcon = null;
    Icon readyIcon = null;
    if (busyFacet == null && readyFacet == null)
    {
      // Render icons only if no facet was specified.
      busyIcon = rc.getIcon(SkinSelectors.AF_STATUS_INDICATOR_BUSY_ICON);
      readyIcon = rc.getIcon(SkinSelectors.AF_STATUS_INDICATOR_READY_ICON);
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.