Package org.apache.myfaces.trinidad.skin

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


    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


    {
      // If we've got a message type, get the Icon
      String iconName = _getMessageIconName(messageType);
      if (iconName != null)
      {
        Icon icon = context.getIcon(iconName);

        // If we've got an Icon, render it
        if (icon != null)
        {
          BaseDesktopUtils.renderIcon(context,
View Full Code Here

        String namespace = qname.getNamespace();
        if (namespace == null)
          namespace = UIConstants.MARLIN_NAMESPACE;
       

        Icon icon = context.getIcon(/*namespace, */name);
       
        if (icon == null)
        {
          // if we didn't get an icon from the context, then create a new
          // name, assuming the user set the short name. e.g.,
          // the user sets name="required", and we map it to the aliased
          // name, "AFRequiredIcon", which is the key where
          // the icon is stored on the skin.      
          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 = context.getIcon(/*namespace, */fullName.toString());
        }

        // If we've got an Icon, render it
        if (icon != null)
        {
          // The span is written out here because the writer needs to see the UIComponent.
          ResponseWriter writer = context.getResponseWriter();
          writer.startElement("span", node.getUIComponent());
          RenderingContext arc = RenderingContext.getCurrentInstance();
          FacesContext fContext = context.getFacesContext();
          icon.renderIcon(fContext, arc, _getNodeAttributeMap(context, node));
          writer.endElement("span");
        }
      }
    }
  }
View Full Code Here

    // of just looking on ourselves!  When we're in a columnGroup, sure.
      : colData.getHeaderNoWrap(physicalIndex);


    String sortIconName = _getIconName(sortability);
    Icon sortIcon = arc.getIcon(sortIconName);
    boolean hasSortingIcon = (sortIcon != null) && !sortIcon.isNull();

    // we do not want to wrap if there is an icon on the header:
    isNoWrap = isNoWrap || hasSortingIcon;
    //       || getRequired(bean);
    //       || getMessageType(bean);
View Full Code Here

    // of just looking on ourselves!  When we're in a columnGroup, sure.
      : colData.getHeaderNoWrap(physicalIndex);


    String sortIconName = _getIconName(sortability);
    Icon sortIcon = arc.getIcon(sortIconName);
    boolean hasSortingIcon = (sortIcon != null) && !sortIcon.isNull();

    // we do not want to wrap if there is an icon on the header:
    // On PDA, where screen width is limited, we cannot afford not to
    // wrap.  isPDA check is used in several places in this class.
    // PDA specific logic will be moved to PDA render kit in the future.
View Full Code Here

    writer.writeText(title, "title");

    writer.endElement(XhtmlConstants.DIV_ELEMENT);

    Icon icon = arc.getIcon(SkinSelectors.AF_PANEL_POPUP_CLOSE_ICON_STYLE_CLASS);

    if (isModal(bean))
    {
      // Render the skinnable container div
      writer.startElement(XhtmlConstants.DIV_ELEMENT, null);
      renderStyleClass(context, arc, SkinSelectors.AF_PANEL_POPUP_CLOSE_ICON_STYLE_CLASS);
     
      writer.startElement(XhtmlConstants.LINK_ELEMENT, null);
      writer.writeAttribute(XhtmlConstants.HREF_ATTRIBUTE, "#", null);

      writer.writeAttribute(XhtmlConstants.ONCLICK_ATTRIBUTE,
          "TrPanelPopup.hidePopup(event); return false;",
          null);
     
      if (icon != null && !icon.isNull())
      {
        String closeText = arc.getTranslatedString("af_panelPopup.CLOSE");
        OutputUtils.renderIcon(context, arc, icon, closeText, null);
      }
      else
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

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

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

    String iconName = getIconName(selected, disabled);    
    Icon icon = arc.getIcon(iconName);
   
    String altTextName = getIconAltTextName(selected);

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

        writer.startElement("tr", null);
      }

      if (showBackButton)
      {
        Icon prevIcon = getIcon(arc, false, (prevOnClick != null));

        if (!prevIcon.isNull())
        {
          // We assign an id to the left arrow so that we can target it as
          // a partial target to work around bug 2275703 - see note above.
          if (iconID != null)
          {
            writer.startElement("td", component);
            writer.writeAttribute("id", iconID, null);

            // If the navigation bar that we are currently rendering
            // is included in a partial page response, add the icon
            // id to the list of partial targets.
            // =-=AEW Not sure this is still necessary
            PartialPageContext pprContext = arc.getPartialPageContext();
            if ((pprContext != null) &&
                pprContext.isInsidePartialTarget())
            {
              pprContext.addRenderedPartialTarget(iconID);
            }
          }
          else
          {
            // not in PPR mode, so just render the td (and id if not in a table)
            _renderStartTableCell(writer, id, renderedId);
            renderedId = true;
          }


          writer.writeAttribute("valign", "middle", null);
          _renderArrow(context, arc, prevIcon, false, prevOnClick);
          writer.endElement("td");

          _renderSpacerCell(context, arc);
        }

        _renderStartTableCell(writer, id, renderedId);
        renderedId = true;
        writer.writeAttribute("valign", "middle", null);
        writer.writeAttribute("nowrap", Boolean.TRUE, null);
       
        _renderLink(context,
                    arc,
                    false,
                    prevOnClick,
                    prevRecords,
                    id,
                    source,
                    backValue);
                   
        writer.endElement("td");
        _renderSpacerCell(context, arc);
      }

      _renderStartTableCell(writer, id, renderedId);
      renderedId = true;
      writer.writeAttribute("valign", "middle", null);
      writer.writeAttribute("nowrap", Boolean.TRUE, null);

      _renderChoice(context,
                    arc,
                    component,
                    id,
                    source,
                    formName,
                    minValue,
                    currentValue,
                    blockSize,
                    maxValue,
                    validate);

      writer.endElement("td");

      if (showNextButton)
      {
        _renderSpacerCell(context, arc);

        _renderStartTableCell(writer, id, true);
        writer.writeAttribute("valign", "middle", null);
        writer.writeAttribute("nowrap", Boolean.TRUE, null);
       
        _renderLink(context,
                    arc,
                    true,
                    nextOnClick,
                    nextRecords,
                    id,
                    source,
                    nextValue);
                 
        writer.endElement("td");

        Icon nextIcon = getIcon(arc, true, (nextOnClick != null));
        if (!nextIcon.isNull())
        {
          _renderSpacerCell(context, arc);

          _renderStartTableCell(writer, id, true);
          writer.writeAttribute("valign", "middle", null);
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.