Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.util
Interface INumberFormatService

All Known Implementing Classes:
NumberFormatService

public interface INumberFormatService

Number format service.


Method Summary
 java.lang.String applyFormat(java.lang.String text, INumberFormat numberFormat)
          Applies the given format to the given string and returns the formatted new string.
 java.lang.String convertNumberToString(int key, double number)
          Converts a number into a string.
 double convertStringToNumber(int key, java.lang.String text)
          Converts a string which contains a formatted number into a number.
 INumberFormat getNumberFormat(int key)
          Returns number format on the basis of the submitted key.
 INumberFormat[] getNumberFormats()
          Returns all available number formats.
 INumberFormat[] getNumberFormats(short type)
          Returns all available number formats of the given type.
 com.sun.star.util.XNumberFormatsSupplier getXNumberFormatsSupplier()
          Returns the OpenOffice.org XNumberFormatsSupplier interface it was created with.
 

Method Detail

getXNumberFormatsSupplier

com.sun.star.util.XNumberFormatsSupplier getXNumberFormatsSupplier()
Returns the OpenOffice.org XNumberFormatsSupplier interface it was created with.

Returns:
the OpenOffice.org XNumberFormatsSupplier interface it was created with

getNumberFormat

INumberFormat getNumberFormat(int key)
                              throws UtilException
Returns number format on the basis of the submitted key.

Parameters:
key - key of the number format
Returns:
number format on the basis of the submitted key
Throws:
UtilException - if the number format is not available

getNumberFormats

INumberFormat[] getNumberFormats()
                                 throws UtilException
Returns all available number formats.

Returns:
all available number formats
Throws:
UtilException - if the number formats are not available

getNumberFormats

INumberFormat[] getNumberFormats(short type)
                                 throws UtilException
Returns all available number formats of the given type.

Parameters:
type - the type to get all number formats for as constants of NumberFormat
Returns:
all available number formats of the given type
Throws:
UtilException - if the number formats are not available

convertStringToNumber

double convertStringToNumber(int key,
                             java.lang.String text)
                             throws UtilException
Converts a string which contains a formatted number into a number. If this is a text format, the string will not be converted.

Parameters:
key - the key of the format for the conversion
text - the text to be converted
Returns:
the number
Throws:
UtilException - if the conversion fails

convertNumberToString

java.lang.String convertNumberToString(int key,
                                       double number)
                                       throws UtilException
Converts a number into a string.

Parameters:
key - the key of the format for the conversion
number - the number to be converted
Returns:
the string
Throws:
UtilException - if the conversion fails

applyFormat

java.lang.String applyFormat(java.lang.String text,
                             INumberFormat numberFormat)
                             throws UtilException
Applies the given format to the given string and returns the formatted new string.

Parameters:
text - the text to apply number format for
numberFormat - the number format to be applied
Returns:
the formatted new string
Throws:
UtilException - if format fails

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013