|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
com.ontimize.gui.field.document.RealDocument
com.ontimize.gui.field.document.AdvancedRealDocument
com.ontimize.gui.field.document.CurrencyDocument
This document implements the model for managing currency values. Only Ptas and euros are supported. Internally, value is stored in a variable called floatValue. When actual mode is Pta, values are processed like Pta. Otherwise, when mode is Euro, values are managed like euros.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.text.AbstractDocument |
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement |
| Field Summary | |
java.lang.String |
euro
|
static double |
EURO
|
static java.lang.String |
pst
|
protected java.text.NumberFormat |
pstFormatter
|
| Fields inherited from class com.ontimize.gui.field.document.AdvancedRealDocument |
advancedQueryMode, BETWEEN, EQUAL, LESS, LESS_EQUAL, MORE, MORE_EQUAL, NOT, OR |
| Fields inherited from class com.ontimize.gui.field.document.RealDocument |
floatValue, formatter, symbology |
| Fields inherited from class javax.swing.text.PlainDocument |
lineLimitAttribute, tabSizeAttribute |
| Fields inherited from class javax.swing.text.AbstractDocument |
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName |
| Fields inherited from interface com.ontimize.gui.i18n.Internationalization |
DEBUG_LANGUAGE |
| Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
| Constructor Summary | |
CurrencyDocument()
|
|
| Method Summary | |
void |
currencyChange()
This function updates the content in field when currency changes (PTA<=>EURO). |
void |
format()
|
java.lang.String |
formatPst(double d)
|
java.lang.Double |
getDoubleValue(java.lang.String s)
|
SearchValue |
getQueryValue()
|
boolean |
getShownEuros()
|
java.lang.Number |
getValue()
|
void |
setComponentLocale(java.util.Locale l)
|
void |
setShowEuros(boolean showEuros)
|
void |
setValue(java.lang.Number value)
|
protected void |
updateValue()
|
| Methods inherited from class com.ontimize.gui.field.document.AdvancedRealDocument |
getDocumentFirstSymbol, insertString, isOROffset, isORSymbolAllowed, isStartSymbol, isSymbolFirst, isValid, remove, setAdvancedQueryMode |
| Methods inherited from class com.ontimize.gui.field.document.RealDocument |
getFormat, getTextsToTranslate, insertStringWithoutCheck, removeWithoutCheck, setFractionDigits, setGrouping, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setResourceBundle |
| Methods inherited from class javax.swing.text.PlainDocument |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate |
| Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, 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, writeUnlock |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final double EURO
public java.lang.String euro
public static java.lang.String pst
protected java.text.NumberFormat pstFormatter
| Constructor Detail |
public CurrencyDocument()
| Method Detail |
public void setShowEuros(boolean showEuros)
throws java.lang.Exception
java.lang.Exceptionpublic boolean getShownEuros()
public void currencyChange()
throws java.lang.Exception
java.lang.Exceptionpublic void format()
format in class AdvancedRealDocumentprotected void updateValue()
updateValue in class RealDocumentpublic java.lang.Number getValue()
getValue in class RealDocumentpublic java.lang.Double getDoubleValue(java.lang.String s)
getDoubleValue in class RealDocumentpublic void setValue(java.lang.Number value)
setValue in class RealDocumentpublic SearchValue getQueryValue()
getQueryValue in class AdvancedRealDocumentpublic java.lang.String formatPst(double d)
public void setComponentLocale(java.util.Locale l)
setComponentLocale in interface InternationalizationsetComponentLocale in class RealDocument
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||