|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc for Elexis version 2.1.7.dev vom 17.03.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectag.ion.bion.officelayer.internal.util.NumberFormatService
public class NumberFormatService
Number format service.
Constructor Summary | |
---|---|
NumberFormatService(ITextDocument textDocument,
com.sun.star.util.XNumberFormatsSupplier xNumberFormatsSupplier)
Constructs new NumberFormatService. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberFormatService(ITextDocument textDocument, com.sun.star.util.XNumberFormatsSupplier xNumberFormatsSupplier) throws java.lang.IllegalArgumentException
textDocument
- the textDocument of this servicexNumberFormatsSupplier
- OpenOffice.org XNumberFormatsSupplier interface
java.lang.IllegalArgumentException
- if the OpenOffice.org XNumberFormatsSupplier interface is not validMethod Detail |
---|
public com.sun.star.util.XNumberFormatsSupplier getXNumberFormatsSupplier()
getXNumberFormatsSupplier
in interface INumberFormatService
public INumberFormat getNumberFormat(int key) throws UtilException
getNumberFormat
in interface INumberFormatService
key
- key of the number format
UtilException
- if the number format is not availablepublic INumberFormat[] getNumberFormats() throws UtilException
getNumberFormats
in interface INumberFormatService
UtilException
- if the number formats are not availablepublic INumberFormat[] getNumberFormats(short type) throws UtilException
getNumberFormats
in interface INumberFormatService
type
- the type to get all number formats for as constants of NumberFormat
UtilException
- if the number formats are not availablepublic double convertStringToNumber(int key, java.lang.String text) throws UtilException
convertStringToNumber
in interface INumberFormatService
key
- the key of the format for the conversiontext
- the text to be converted
UtilException
- if the conversion failspublic java.lang.String convertNumberToString(int key, double number) throws UtilException
convertNumberToString
in interface INumberFormatService
key
- the key of the format for the conversionnumber
- the number to be converted
UtilException
- if the conversion failspublic java.lang.String applyFormat(java.lang.String text, INumberFormat numberFormat) throws UtilException
applyFormat
in interface INumberFormatService
text
- the text to apply number format fornumberFormat
- the number format to be applied
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 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |