Package org.apache.myfaces.trinidad.skin

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


    // We only need to render an icon before the link if
    // we don't have a previous sibling.  (Joins are
    // rendered by the previous sibling).
    if (isFirst)
    {
      Icon startIcon = selected ? icons.selectedStart : icons.enabledStart;

      renderTableDataIcon(context, startIcon, null);
    }

    renderNode(context, child, selected);

    // Either render a join or an end icon depending
    // on whether we have any more siblings
    Icon endIcon = null;

    if (isLast)
    {
      endIcon = selected ? icons.selectedEnd : icons.enabledEnd;
    }
View Full Code Here


    // Render the style class
    super.renderTabStyleAttrs(context, node, selected, disabled);

    // Render the background icon, if we have one
    IconData icons = _getIconData(context);
    Icon icon = (selected && !disabled) ?
                  icons.selectedBackground :
                  icons.enabledBackground;

    org.apache.myfaces.trinidadinternal.renderkit.core.skin.CoreSkinUtils.__renderBackgroundIcon(context, icon);
  }
View Full Code Here

    {
      // Next, check to see if the IconData has already been
      // stored on the Skin
      Skin skin = context.getSkin();
      icons = (IconData)skin.getProperty(_ICONS_KEY);
      Icon enabledStart = context.getIcon(
                                    AF_MENU_TABS_ENABLED_START_ICON_NAME);
  
      if (icons == null || enabledStart == null
                        || !enabledStart.equals(icons.enabledStart))
      {
        // If we still haven't found the IconData, create it now
        icons = _createIconData(context);

        // Store the IconData as a property on the Skin,
View Full Code Here

  }

  // Create the IconData for the specified Skin
  private static IconData _createIconData(UIXRenderingContext context)
  {
    Icon enabledStart = context.getIcon(
                                    AF_MENU_TABS_ENABLED_START_ICON_NAME);
    Icon enabledEnd = context.getIcon(
                                  AF_MENU_TABS_ENABLED_END_ICON_NAME);
    Icon selectedStart = context.getIcon(
                                    AF_MENU_TABS_SELECTED_START_ICON_NAME);
    Icon selectedEnd = context.getIcon(
                                  AF_MENU_TABS_SELECTED_END_ICON_NAME);
    Icon enabledJoin = context.getIcon(
                                   AF_MENU_TABS_ENABLED_JOIN_ICON_NAME);
    Icon enabledSelectedJoin = context.getIcon(
                                      AF_MENU_TABS_ENABLED_SELECTED_JOIN_ICON_NAME);
    Icon selectedEnabledJoin = context.getIcon(
                                      AF_MENU_TABS_SELECTED_ENABLED_JOIN_ICON_NAME);
    Icon enabledBackground = context.getIcon(
                                         AF_MENU_TABS_ENABLED_BACKGROUND_ICON_NAME);
    Icon selectedBackground = context.getIcon(
                                        AF_MENU_TABS_SELECTED_BACKGROUND_ICON_NAME);
    return new IconData(enabledStart,
                        enabledEnd,
                        selectedStart,
                        selectedEnd,
View Full Code Here

  {
    // Check to see whether we have already created
    // the IconData for this background color
    Skin skin = context.getSkin();
    IconData icons    = (IconData)skin.getProperty(_ICONS_KEY);
    Icon bottomStart  = context.getIcon(AF_MESSAGES_BOTTOM_START_ICON_NAME);
    // Add check to see if cached icon is same as icon required for a composite
    // context. Else re-create
    if (icons == null || bottomStart == null ||!(icons.bottomStart.equals(bottomStart)))
    {
      // If we haven't created the IconData yet, create it now

      Icon bottomEnd        = context.getIcon(
                                    AF_MESSAGES_BOTTOM_END_ICON_NAME);
      Icon bottomBackground = context.getIcon(
                                    AF_MESSAGES_BOTTOM_BACKGROUND_ICON_NAME);
      Icon topStart         = context.getIcon(
                                    AF_MESSAGES_TOP_START_ICON_NAME);
      Icon topEnd           = context.getIcon(
                                    AF_MESSAGES_TOP_END_ICON_NAME);
      Icon topBackground    = context.getIcon(
                                    AF_MESSAGES_TOP_BACKGROUND_ICON_NAME);
      Icon startBackground  = context.getIcon(
                                    AF_MESSAGES_START_BACKGROUND_ICON_NAME);
      Icon endBackground    = context.getIcon(
                                    AF_MESSAGES_END_BACKGROUND_ICON_NAME);

      icons = new IconData(bottomStart,
                           bottomEnd,
                           bottomBackground,
View Full Code Here

    {
      // Render the first valid icon found. The list should be in
      // decreasing priority order.
      for(String iconName : iconNames)
      {
        Icon icon = arc.getIcon(iconName);
        if(icon != null)
        {
          OutputUtils.renderIcon(context, arc, icon, shortDesc, null);
          break;
        }
View Full Code Here

    if ( Boolean.TRUE.equals(isRendered) )
    {
      int messageType
        = _getMessageTypeBySeverity(MessageBoxUtils.sGetMaxSeverity(context));

      Icon icon  = _getIcon(context, messageType);

      String messageStyle = _getMessageTextStyle(messageType);
      Object message = node.getAttributeValue(context, MESSAGE_ATTR);

      _renderLine(context,
View Full Code Here

    // Check to see whether we have already created
    // the IconData for this background color
    Skin skin = context.getSkin();
    IconData icons = (IconData)skin.getProperty(_ICONS_KEY);
   
    Icon bottomStart      = context.getIcon(
                              AF_PANEL_SIDE_BAR_BOTTOM_START_ICON_NAME);   

    if (icons == null || bottomStart == null ||
        (!icons.bottomStart.equals(bottomStart)))
    {
      // If we haven't created the IconData yet, create it now
      // OR if the ones we created are not the ones we need to create
      // (this can happen if sidebar is used in a composite component.)
      // we then cache it away as an optimization.

      Icon bottomEnd        = context.getIcon(
                                AF_PANEL_SIDE_BAR_BOTTOM_END_ICON_NAME);
      Icon bottomBackground = context.getIcon(
                                AF_PANEL_SIDE_BAR_BOTTOM_BACKGROUND_ICON_NAME);
      Icon topStart         = context.getIcon(
                                AF_PANEL_SIDE_BAR_TOP_START_ICON_NAME);
      Icon topEnd           = context.getIcon(
                                AF_PANEL_SIDE_BAR_TOP_END_ICON_NAME);
      Icon topBackground    = context.getIcon(
                                AF_PANEL_SIDE_BAR_TOP_BACKGROUND_ICON_NAME);
      Icon startBackground  = context.getIcon(
                                AF_PANEL_SIDE_BAR_START_BACKGROUND_ICON_NAME);
      Icon endBackground    = context.getIcon(
                                AF_PANEL_SIDE_BAR_END_BACKGROUND_ICON_NAME);

      icons = new IconData(bottomStart,
                           bottomEnd,
                           bottomBackground,
View Full Code Here

    UINode           node
    ) throws IOException
  {
    // If we have a separator icon, render it in a table
    // cell between the other children
    Icon icon = _getSeparatorIcon(context);

    if (icon != null)
    {
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(TABLE_DATA_ELEMENT, null);
View Full Code Here

      return (Icon)localValue;

    // If we didn't find a local property, get the Icon from
    // the Skin
    Skin skin = context.getSkin();
    Icon icon = skin.getIcon(AF_MENU_BUTTONS_SEPARATOR_ICON_NAME);

    // Stash the Icon away so that we don't have to
    // look it up in the laf again next time.
    context.setLocalProperty(_SEPARATOR_ICON_KEY, 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.