org.apache.myfaces.trinidadinternal.renderkit.core.xhtml
Class OutputUtils

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputUtils

public class OutputUtils
extends java.lang.Object

Utilities for miscellaneous HTML output.


Constructor Summary
OutputUtils()
           
 
Method Summary
static java.awt.Color getBackgroundColor(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static java.lang.String getMiddleIconAlignment(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns the valign vAlign value for aligning image icons vertically with text on the same line.
static java.lang.String getOutputEncoding(javax.faces.context.FacesContext context)
          Gets the character encoding of the output.
static java.util.List<java.lang.String> parseStyleClassList(java.lang.String styleClass)
          Parse a styleclass string, which may have spaces, into a list of style classes.
static void renderAltAndTooltipForImage(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext afc, java.lang.Object textValue)
          Renders only the alt attribute if that can be used as a tooltip on an image.
static void renderHiddenField(javax.faces.context.FacesContext context, java.lang.String name, java.lang.String value)
           
static void renderIcon(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.skin.Icon icon, java.lang.Object shortDesc, java.lang.Object align)
          Renders the specified Icon with the provided attributes.
static void renderIcon(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.skin.Icon icon, java.lang.Object shortDesc, java.lang.Object align, boolean embedded)
          Renders the specified Icon with the provided attributes.
static void renderImage(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object absoluteUri, java.lang.Object width, java.lang.Object height, java.lang.Object id, java.lang.Object altText)
          Renders an image tag.
static void renderImage(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object absoluteUri, java.lang.Object width, java.lang.Object height, java.lang.Object id, java.lang.Object altText, javax.faces.component.UIComponent comp)
           
static void renderImage(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object absoluteUri, java.lang.Object width, java.lang.Object height, java.lang.Object id, java.lang.Object altText, javax.faces.component.UIComponent comp, java.lang.String inlineStyle)
           
static void renderLayoutTableAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object cellspacing, java.lang.Object tableWidth)
           
static void renderLayoutTableAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object cellpadding, java.lang.Object cellspacing, java.lang.Object tableWidth)
           
static void renderLayoutTableAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object cellpadding, java.lang.Object cellspacing, java.lang.Object border, java.lang.Object tableWidth)
          All layout tables should call this method, so that a special summary tag (which silences OAC) is rendered
static void renderLayoutTableAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object cellpadding, java.lang.Object cellspacing, java.lang.Object border, java.lang.Object tableWidth, java.lang.Object summary)
          all data tables should call this one, so that a summary tag is written out
static boolean supportsAltRendersTooltipOnImage(org.apache.myfaces.trinidad.context.RenderingContext afc)
          Returns true if the agent supports alt as a tooltip on images
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputUtils

public OutputUtils()
Method Detail

parseStyleClassList

public static java.util.List<java.lang.String> parseStyleClassList(java.lang.String styleClass)
Parse a styleclass string, which may have spaces, into a list of style classes. Returns null if it's just a single class.


getOutputEncoding

public static java.lang.String getOutputEncoding(javax.faces.context.FacesContext context)
Gets the character encoding of the output.


renderHiddenField

public static void renderHiddenField(javax.faces.context.FacesContext context,
                                     java.lang.String name,
                                     java.lang.String value)
                              throws java.io.IOException
Throws:
java.io.IOException

renderLayoutTableAttributes

public static void renderLayoutTableAttributes(javax.faces.context.FacesContext context,
                                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                                               java.lang.Object cellspacing,
                                               java.lang.Object tableWidth)
                                        throws java.io.IOException
Throws:
java.io.IOException

renderLayoutTableAttributes

public static void renderLayoutTableAttributes(javax.faces.context.FacesContext context,
                                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                                               java.lang.Object cellpadding,
                                               java.lang.Object cellspacing,
                                               java.lang.Object tableWidth)
                                        throws java.io.IOException
Throws:
java.io.IOException

renderLayoutTableAttributes

public static void renderLayoutTableAttributes(javax.faces.context.FacesContext context,
                                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                                               java.lang.Object cellpadding,
                                               java.lang.Object cellspacing,
                                               java.lang.Object border,
                                               java.lang.Object tableWidth)
                                        throws java.io.IOException
All layout tables should call this method, so that a special summary tag (which silences OAC) is rendered

Throws:
java.io.IOException

renderLayoutTableAttributes

public static void renderLayoutTableAttributes(javax.faces.context.FacesContext context,
                                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                                               java.lang.Object cellpadding,
                                               java.lang.Object cellspacing,
                                               java.lang.Object border,
                                               java.lang.Object tableWidth,
                                               java.lang.Object summary)
                                        throws java.io.IOException
all data tables should call this one, so that a summary tag is written out

Throws:
java.io.IOException

renderAltAndTooltipForImage

public static void renderAltAndTooltipForImage(javax.faces.context.FacesContext context,
                                               org.apache.myfaces.trinidad.context.RenderingContext afc,
                                               java.lang.Object textValue)
                                        throws java.io.IOException
Renders only the alt attribute if that can be used as a tooltip on an image. Otherwise it renders both the alt and the title attributes.

Throws:
java.io.IOException

supportsAltRendersTooltipOnImage

public static boolean supportsAltRendersTooltipOnImage(org.apache.myfaces.trinidad.context.RenderingContext afc)
Returns true if the agent supports alt as a tooltip on images


getMiddleIconAlignment

public static java.lang.String getMiddleIconAlignment(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns the valign vAlign value for aligning image icons vertically with text on the same line.


renderIcon

public static void renderIcon(javax.faces.context.FacesContext context,
                              org.apache.myfaces.trinidad.context.RenderingContext arc,
                              org.apache.myfaces.trinidad.skin.Icon icon,
                              java.lang.Object shortDesc,
                              java.lang.Object align)
                       throws java.io.IOException
Renders the specified Icon with the provided attributes.

Throws:
java.io.IOException

renderIcon

public static void renderIcon(javax.faces.context.FacesContext context,
                              org.apache.myfaces.trinidad.context.RenderingContext arc,
                              org.apache.myfaces.trinidad.skin.Icon icon,
                              java.lang.Object shortDesc,
                              java.lang.Object align,
                              boolean embedded)
                       throws java.io.IOException
Renders the specified Icon with the provided attributes.

Throws:
java.io.IOException

renderImage

public static void renderImage(javax.faces.context.FacesContext context,
                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                               java.lang.Object absoluteUri,
                               java.lang.Object width,
                               java.lang.Object height,
                               java.lang.Object id,
                               java.lang.Object altText)
                        throws java.io.IOException
Renders an image tag.

Throws:
java.io.IOException

renderImage

public static void renderImage(javax.faces.context.FacesContext context,
                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                               java.lang.Object absoluteUri,
                               java.lang.Object width,
                               java.lang.Object height,
                               java.lang.Object id,
                               java.lang.Object altText,
                               javax.faces.component.UIComponent comp)
                        throws java.io.IOException
Throws:
java.io.IOException

renderImage

public static void renderImage(javax.faces.context.FacesContext context,
                               org.apache.myfaces.trinidad.context.RenderingContext arc,
                               java.lang.Object absoluteUri,
                               java.lang.Object width,
                               java.lang.Object height,
                               java.lang.Object id,
                               java.lang.Object altText,
                               javax.faces.component.UIComponent comp,
                               java.lang.String inlineStyle)
                        throws java.io.IOException
Throws:
java.io.IOException

getBackgroundColor

public static java.awt.Color getBackgroundColor(org.apache.myfaces.trinidad.context.RenderingContext arc)


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.