com.plumtree.uiinfrastructure.statichelpers
Class AnchorInLocalizedString

java.lang.Object
  extended by com.plumtree.uiinfrastructure.statichelpers.AnchorInLocalizedString

public class AnchorInLocalizedString
extends java.lang.Object

This class is used to insert anchors in localized strings using placeholders. Strings should have placeholders {0} and {1} around the section that should be turned into a link. This class does not handle escaped placeholders (\\{0}).


Constructor Summary
AnchorInLocalizedString()
           
 
Method Summary
static void AddAnchorInStringToElement(java.lang.String strBaseText, java.lang.String strURL, HTMLElement element)
          This method takes the string with the anchor element inserted between the {0} and {1} placeholders and adds it to the given element.
static HTMLAnchor GetAnchor(java.lang.String strBaseText, java.lang.String strURL)
          This method returns the HTMLAnchor generated from the section of the string between the {0} and {1} placeholders.
static HTMLElementCollection GetAnchorInString(java.lang.String strBaseText, java.lang.String strURL)
          This method returns an HTMLElementCollection containing the string with the anchor element inserted between the {0} and {1} placeholders.
static java.lang.String GetStringAfterAnchor(java.lang.String strBaseText)
          This method returns the section of the string after the place holder.
static java.lang.String GetStringBeforeAnchor(java.lang.String strBaseText)
          This method returns the section of the string before the place holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorInLocalizedString

public AnchorInLocalizedString()
Method Detail

GetStringBeforeAnchor

public static java.lang.String GetStringBeforeAnchor(java.lang.String strBaseText)
This method returns the section of the string before the place holder.

Parameters:
String - the entire localized string
Returns:
String the section before the first placeholder. "" If there is no place holder.

GetStringAfterAnchor

public static java.lang.String GetStringAfterAnchor(java.lang.String strBaseText)
This method returns the section of the string after the place holder.

Parameters:
String - the entire localized string
Returns:
String the section before the first placeholder.

GetAnchor

public static HTMLAnchor GetAnchor(java.lang.String strBaseText,
                                   java.lang.String strURL)
This method returns the HTMLAnchor generated from the section of the string between the {0} and {1} placeholders.

Parameters:
String - the entire localized string
String - the URL of the anchor
Returns:
HTMLAnchor the anchor generated from the text inbetween {0} and {1}

GetAnchorInString

public static HTMLElementCollection GetAnchorInString(java.lang.String strBaseText,
                                                      java.lang.String strURL)
This method returns an HTMLElementCollection containing the string with the anchor element inserted between the {0} and {1} placeholders.

Parameters:
String - the entire localized string
String - the URL of the anchor
Returns:
HTMLElementCollection the String with the anchor generated from the text inbetween {0} and {1}

AddAnchorInStringToElement

public static void AddAnchorInStringToElement(java.lang.String strBaseText,
                                              java.lang.String strURL,
                                              HTMLElement element)
This method takes the string with the anchor element inserted between the {0} and {1} placeholders and adds it to the given element.

Parameters:
String - the entire localized string
String - the URL of the anchor
HTMLElement - the element to add the String with the anchor generated from the text inbetween {0} and {1}



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.