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 aPInfranetMessageFormat
object for the default locale in the specified format.PInfranetMessageFormat
(String format, Locale loc) Creates an instance of aPInfranetMessageFormat
object in the specified format and locale. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
createFormatFor
(Object[] args) A static utility method called to create a default format for a number of arguments.static String
A static utility method called to format an array ofObject
arguments that follow a supplied format string.static String
A static utility method called to format an array ofObject
arguments that follow a suppled format string for a specified locale.static String
A static utility method called to format an array ofVector
arguments that follow a supplied format string.static String
A static utility method called to format an array ofVector
arguments that follow a supplied format string for a specified locale.Formats the data in a vector.void
overrideCurrencySymbol
(String newSymbol) Overrides the currency symbol used by the default locale, given a new currency symbol to use in its place.void
setCurrencyFormat
(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, toPattern
Methods inherited from class java.text.Format
format, parseObject
-
Constructor Details
-
PInfranetMessageFormat
Creates an instance of aPInfranetMessageFormat
object for the default locale in the specified format.- Parameters:
format
- aString
with the format to use
-
PInfranetMessageFormat
Creates an instance of aPInfranetMessageFormat
object in the specified format and locale.- Parameters:
format
- aString
with 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
- aVector
of objects to supply to the formatter- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofObject
arguments that follow a supplied format string.- Parameters:
format
- aString
with the format to useargs
- an array of objects to format- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofObject
arguments that follow a suppled format string for a specified locale.- Parameters:
format
- aString
with 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 ofVector
arguments that follow a supplied format string for a specified locale.- Parameters:
format
- aString
with the format to useargs
- aVector
of objects to formatloc
- the locale to format to- Returns:
- A formatted string.
-
format
A static utility method called to format an array ofVector
arguments that follow a supplied format string.- Parameters:
format
- aString
with the format to useargs
- aVector
of 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.
-