org.apache.myfaces.trinidadinternal.skin.icon
Class TextIcon

java.lang.Object
  extended by org.apache.myfaces.trinidad.skin.Icon
      extended by org.apache.myfaces.trinidadinternal.skin.icon.TextIcon

public class TextIcon
extends org.apache.myfaces.trinidad.skin.Icon

An Icon implementation which renders a text string as the icon.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/skin/icon/TextIcon.java#0 $) $Date: 10-nov-2005.18:59:05 $
Author:
The Oracle ADF Faces Team

Field Summary
 
Fields inherited from class org.apache.myfaces.trinidad.skin.Icon
ALIGN_KEY, EMBEDDED_KEY, HEIGHT_KEY, ID_KEY, INLINE_STYLE_KEY, SHORT_DESC_KEY, STYLE_CLASS_KEY, WIDTH_KEY
 
Constructor Summary
TextIcon(java.lang.String text)
          Creates the TextIcon with the specified text string.
TextIcon(java.lang.String text, java.lang.String rtlText)
          Creates a TextIcon which uses different text depending on the reading direction.
TextIcon(java.lang.String text, java.lang.String rtlText, java.lang.String styleClass, Style inlineStyle)
          Creates the TextIcon with the specified text string, style class, and inline style.
 
Method Summary
protected  Style getInlineStyle()
          Returns the inlineStyle to render.
protected  java.lang.String getRtlText()
          Returns the text to render when in RTL mode.
protected  java.lang.String getStyleClass()
          Returns the styleClass to render.
protected  java.lang.String getText(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns the text to render.
 void renderIcon(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.util.Map<java.lang.String,java.lang.Object> attrs)
          Renders the Icon.
 void setInlineStyle(Style inlineStyle)
          Sets the inlineStyle of the icon
 void setRtlText(java.lang.String rtlText)
          Sets the text to render if in RTL mode
 void setStyleClass(java.lang.String styleClass)
          Sets the styleClass of the icon
 void setText(java.lang.String text)
          Sets the text to render.
 
Methods inherited from class org.apache.myfaces.trinidad.skin.Icon
getImageHeight, getImageURI, getImageWidth, isNull, openStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextIcon

public TextIcon(java.lang.String text)
Creates the TextIcon with the specified text string.


TextIcon

public TextIcon(java.lang.String text,
                java.lang.String rtlText)
Creates a TextIcon which uses different text depending on the reading direction.


TextIcon

public TextIcon(java.lang.String text,
                java.lang.String rtlText,
                java.lang.String styleClass,
                Style inlineStyle)
Creates the TextIcon with the specified text string, style class, and inline style.

Method Detail

renderIcon

public void renderIcon(javax.faces.context.FacesContext context,
                       org.apache.myfaces.trinidad.context.RenderingContext arc,
                       java.util.Map<java.lang.String,java.lang.Object> attrs)
                throws java.io.IOException
Renders the Icon.

Specified by:
renderIcon in class org.apache.myfaces.trinidad.skin.Icon
Parameters:
context - The RenderingContext for the current request.
attrs - A Map which provides access to values that might be useful to Icon implementations TextIcon looks for Icon.ID_KEY, Icon.SHORT_DESC_KEY, and Icon.EMBEDDED_KEY. It does not render SHORT_DESC_KEY if it is null or "", because there is no point to this for TextIcons.
Throws:
java.io.IOException

getInlineStyle

protected Style getInlineStyle()
Returns the inlineStyle to render.


getRtlText

protected java.lang.String getRtlText()
Returns the text to render when in RTL mode.


getStyleClass

protected java.lang.String getStyleClass()
Returns the styleClass to render.


getText

protected java.lang.String getText(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns the text to render.


setInlineStyle

public void setInlineStyle(Style inlineStyle)
Sets the inlineStyle of the icon


setRtlText

public void setRtlText(java.lang.String rtlText)
Sets the text to render if in RTL mode


setStyleClass

public void setStyleClass(java.lang.String styleClass)
Sets the styleClass of the icon


setText

public void setText(java.lang.String text)
Sets the text to render.



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