public class CurrencyDocument extends AdvancedRealDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement| Modifier and Type | Field and Description |
|---|---|
String |
currencySymbol |
static String |
defaultCurrencySymbol |
static double |
EURO |
protected NumberFormat |
pstFormatter |
protected boolean |
showCurrencySymbol |
advancedQueryMode, BETWEEN, EQUAL, LESS, LESS_EQUAL, MORE, MORE_EQUAL, NOT, ORfloatValue, formatter, symbologylineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameDEBUG_LANGUAGEStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
CurrencyDocument() |
CurrencyDocument(String currencySymbol) |
| Modifier and Type | Method and Description |
|---|---|
void |
currencyChange()
This function updates the content in field when currency changes
(PTA<=>EURO).
|
void |
format() |
String |
getCurrencySymbol() |
Double |
getDoubleValue(String s) |
SearchValue |
getQueryValue() |
Number |
getValue() |
boolean |
isShowCurrencySymbol() |
void |
setComponentLocale(Locale l) |
void |
setCurrencySymbol(String currencySymbol) |
void |
setShowCurrencySymbol(boolean showCurrencySymbol) |
void |
setValue(Number value) |
protected void |
updateValue() |
getDocumentFirstSymbol, insertString, isOROffset, isORSymbolAllowed, isStartSymbol, isSymbolFirst, isValid, remove, setAdvancedQueryModegetFormat, getTextsToTranslate, insertStringWithoutCheck, removeWithoutCheck, setFractionDigits, setGrouping, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setResourceBundlecreateDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdateaddDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockpublic static final double EURO
public static String defaultCurrencySymbol
public String currencySymbol
protected boolean showCurrencySymbol
protected NumberFormat pstFormatter
public CurrencyDocument()
public CurrencyDocument(String currencySymbol)
public void currencyChange()
throws Exception
Exceptionpublic void format()
format in class AdvancedRealDocumentprotected void updateValue()
updateValue in class RealDocumentpublic Number getValue()
getValue in class RealDocumentpublic Double getDoubleValue(String s)
getDoubleValue in class RealDocumentpublic void setValue(Number value)
setValue in class RealDocumentpublic SearchValue getQueryValue()
getQueryValue in class AdvancedRealDocumentpublic boolean isShowCurrencySymbol()
public void setShowCurrencySymbol(boolean showCurrencySymbol)
public String getCurrencySymbol()
public void setCurrencySymbol(String currencySymbol)
public void setComponentLocale(Locale l)
setComponentLocale in interface InternationalizationsetComponentLocale in class RealDocumentCopyright © 2016 Imatia Innovation S.L.. All rights reserved.