com.plumtree.xpshared.htmlconstructs
Class FactoryHelper

java.lang.Object
  extended by com.plumtree.xpshared.htmlconstructs.FactoryHelper
Direct Known Subclasses:
UIFactoryHelper

public class FactoryHelper
extends java.lang.Object

Author:
beng This class implements functionality used by various classes in this package. This functionality is not intended for public use.

Constructor Summary
FactoryHelper()
           
 
Method Summary
static XPHashtable combineMaps(IXPEnumerator e)
          This method takes an IXPEnumerator of XPHashtable objects, and combines all of the object/object pairs of all of these maps into a single XPHashtable object.
static XPStringDictionary combineStringDictionaries(IXPEnumerator e)
          This method takes an ArrayList of StringDictionary objects, and combines all of the key/value pairs of all of these dictionaries into a single dictionary.
static XPStringDictionary combineStringDictionaries(XPStringDictionary sd1, XPStringDictionary sd2)
          Call this method to add two XPStringDictionary objects.
static void updateImgAlts(PTConstruct construct)
          This method updates HTMLImg objects nested within a construct.
static void updateStrings(PTConstruct construct)
          This method updates all of the appropriate strings within a construct with localized versions of those strings.
static HTMLTable XPDictionaryToTable(XPStringDictionary sd)
          This method takes a string dictionary, and constructs an HTML table from the values in this dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryHelper

public FactoryHelper()
Method Detail

XPDictionaryToTable

public static HTMLTable XPDictionaryToTable(XPStringDictionary sd)
This method takes a string dictionary, and constructs an HTML table from the values in this dictionary. This method is to be used purely for debuggin purposes, the HTMLTable returned has no true display value.

Parameters:
sd -
Returns:

combineMaps

public static XPHashtable combineMaps(IXPEnumerator e)
This method takes an IXPEnumerator of XPHashtable objects, and combines all of the object/object pairs of all of these maps into a single XPHashtable object.

Parameters:
e -
Returns:

combineStringDictionaries

public static XPStringDictionary combineStringDictionaries(XPStringDictionary sd1,
                                                           XPStringDictionary sd2)
Call this method to add two XPStringDictionary objects.

Parameters:
sd1 - Pass an XPStringDictionary
sd2 - Pass another XPStringDictionary
Returns:
Returns an XPStringDictionary containing mappings from both parameter XPStringDictionary objects.

combineStringDictionaries

public static XPStringDictionary combineStringDictionaries(IXPEnumerator e)
This method takes an ArrayList of StringDictionary objects, and combines all of the key/value pairs of all of these dictionaries into a single dictionary.

Parameters:
e -
Returns:

updateImgAlts

public static void updateImgAlts(PTConstruct construct)
This method updates HTMLImg objects nested within a construct. The alt attribute of each updated HTMLImg object is set to the localized String.

Parameters:
construct - Pass a PTConstruct

updateStrings

public static void updateStrings(PTConstruct construct)
This method updates all of the appropriate strings within a construct with localized versions of those strings.

Each construct offers a StrinDictionary containing ElementName/stringid pairs. The ElementName indicates a nested HTMLElement object, the string id indicates a localized string.

This method obtains each nested element indicated by the set of ElementName objects. If that nested HTMLElement is an HTMLGenericElement, then it is replaced with the corresponding localized string. If the nested element is any other type of HTMLElement object, the corresponding localized string is nested within the nested element.

Parameters:
construct - Pass a PTConstruct. Nested elements with names equivalent to those specified by the string dictionary will be updated.



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