Package com.portal.bas
Class PInfranetMessageFormat
java.lang.Object
java.text.Format
java.text.MessageFormat
com.portal.bas.PInfranetMessageFormat
- All Implemented Interfaces:
Serializable,Cloneable
PInfranetMessageFormat is a MessageFormat derivative
that makes use of Portal view permissions and permission masks. It also has
implicit knowedge of the kinds of data usually displayed, for example, currency.- Author:
- Larry Lynch-Freshner
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.MessageFormat
MessageFormat.Field -
Constructor Summary
ConstructorsConstructorDescriptionPInfranetMessageFormat(String format) Creates an instance of aPInfranetMessageFormatobject for the default locale in the specified format.PInfranetMessageFormat(String format, Locale loc) Creates an instance of aPInfranetMessageFormatobject in the specified format and locale. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateFormatFor(Object[] args) A static utility method called to create a default format for a number of arguments.static StringA static utility method called to format an array ofObjectarguments that follow a supplied format string.static StringA static utility method called to format an array ofObjectarguments that follow a suppled format string for a specified locale.static StringA static utility method called to format an array ofVectorarguments that follow a supplied format string.static StringA static utility method called to format an array ofVectorarguments that follow a supplied format string for a specified locale.Formats the data in a vector.voidoverrideCurrencySymbol(String newSymbol) Overrides the currency symbol used by the default locale, given a new currency symbol to use in its place.voidsetCurrencyFormat(NumberFormat newCurFormatter) Change the currency format to the new currency format.Methods inherited from class java.text.MessageFormat
applyPattern, clone, equals, format, format, formatToCharacterIterator, getFormats, getFormatsByArgumentIndex, getLocale, hashCode, parse, parse, parseObject, setFormat, setFormatByArgumentIndex, setFormats, setFormatsByArgumentIndex, setLocale, toPatternMethods inherited from class java.text.Format
format, parseObject
-
Constructor Details
-
PInfranetMessageFormat
Creates an instance of aPInfranetMessageFormatobject for the default locale in the specified format.- Parameters:
format- aStringwith the format to use
-
PInfranetMessageFormat
Creates an instance of aPInfranetMessageFormatobject in the specified format and locale.- Parameters:
format- aStringwith the format to useloc- the locale to format for
-
-
Method Details
-
setCurrencyFormat
Change the currency format to the new currency format.- Parameters:
newCurFormatter- The new currency format.
-
overrideCurrencySymbol
Overrides the currency symbol used by the default locale, given a new currency symbol to use in its place.- Parameters:
newSymbol- the new currency symbol
-
format
Formats the data in a vector.- Parameters:
v- aVectorof objects to supply to the formatter- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofObjectarguments that follow a supplied format string.- Parameters:
format- aStringwith the format to useargs- an array of objects to format- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofObjectarguments that follow a suppled format string for a specified locale.- Parameters:
format- aStringwith the format to useargs- an array of objects to formatloc- the locale to format to- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofVectorarguments that follow a supplied format string for a specified locale.- Parameters:
format- aStringwith the format to useargs- aVectorof objects to formatloc- the locale to format to- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofVectorarguments that follow a supplied format string.- Parameters:
format- aStringwith the format to useargs- aVectorof objects to format- Returns:
- A formatted string.
-
createFormatFor
A static utility method called to create a default format for a number of arguments.- Parameters:
args- an array of arguments to format- Returns:
- A format string.
-