|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.field.validate.AbstractValidator | +--com.klg.jclass.field.validate.JCNumberValidator
This class is a base class for numeric validators.
Field Summary | |
protected Locale |
currency_locale
|
protected DecimalFormatSymbols |
currencySymbols
|
protected String |
display_pattern
|
protected DecimalFormat |
displayFormat
|
protected String |
edit_pattern
|
protected DecimalFormat |
editFormat
|
protected String |
exponentialChar
|
protected boolean |
isCurrency
|
protected int |
spin_policy
|
protected DecimalFormatSymbols |
symbols
|
protected boolean |
use_intl_currency_symbol
|
Fields inherited from class com.klg.jclass.field.validate.AbstractValidator |
abstractInitializing, allow_null, AS_IS, case_policy, increment, invalid_chars, li, locale, LOWERCASE, match_picklist, max, min, NOT_FOUND, picklist, SPIN_FIELD, SPIN_SUBFIELD, SPIN_WRAP, supportedClasses, UPPERCASE, valid_chars |
Fields inherited from interface com.klg.jclass.field.validate.JCValidator |
DOWN, UP |
Constructor Summary | |
JCNumberValidator()
|
Method Summary | |
Object |
copyValue(Object value)
Since the clone() method is protected in the Object
class we cannot actually clone a generic object without knowing what it is;
therefore the validator must provide this routine to do the copying for
JCField . |
protected abstract DecimalFormat |
createDisplayFormat(Locale l)
|
protected abstract DecimalFormat |
createEditFormat(Locale l)
|
String |
format(Object obj)
Returns a formatted String given an object. |
Locale |
getCurrencyLocale()
Returns the locale used to determine the currency symbol to use. |
String |
getCurrencySymbol()
Returns the appropriate currency symbol of the current locale. |
String |
getCurrencySymbol(Locale l)
Returns the appropriate currency symbol of the specified locale. |
DecimalFormat |
getDisplayFormat()
Gets the DecimalFormat object being used by the validator. |
String |
getDisplayPattern()
Returns the displayPattern . |
DecimalFormat |
getEditFormat()
Gets the DecimalFormat object being used by the validator. |
String |
getEditPattern()
Returns the current editPattern . |
int |
getFirstValidCursorPosition()
Reports the first valid cursor position. |
protected String |
getIntlCurrencySymbol(Locale l)
|
protected String |
getLocalCurrencySymbol(Locale l)
|
boolean |
getUseIntlCurrencySymbol()
Returns the status of the flag that indicates whether the international or local currency symbol is being used. |
boolean |
isCurrency()
Returns true if the formatted data is a currency. |
void |
setCurrency(boolean is_currency)
Sets the currency property for the data. |
void |
setCurrencyLocale(Locale l)
Sets the locale used to determine the currency symbol. |
void |
setCursor(com.klg.jclass.field.validate.TextCursorEvent e)
Sets the cursor to the specified position. |
void |
setDisplayFormat(DecimalFormat formatter)
Sets the DecimalFormat object being used to format the data. |
void |
setDisplayPattern(String pattern)
Sets a pattern on the DecimalFormat object used
by the validator. |
void |
setEditFormat(DecimalFormat formatter)
Sets the DecimalFormat object being used to format the data. |
void |
setEditPattern(String pattern)
Sets a pattern on the DecimalFormat object used
by the validator. |
void |
setLocale(Locale locale)
Sets the Locale used for formatting and parsing. |
protected abstract void |
setPatterns()
|
void |
setUseIntlCurrencySymbol(boolean s)
Sets the status of the flag that indicates whether the international or local currency symbol is being used. |
Methods inherited from class com.klg.jclass.field.validate.AbstractValidator |
addIncrement, calculateSpinability, changeText, checkValidInvalid, compareValues, convertCase, convertFromSupported, convertToSupported, createPopupComponent, formatForEdit, getAllowNull, getCasePolicy, getInvalidChars, getItem, getLocale, getMatchPickList, getMax, getMin, getNextValue, getPickList, getPickListIndex, getPreviousValue, getSpinPolicy, getValidChars, hasEditFormat, inferSubField, inRange, isClassSupported, isValidChar, parse, setAllowNull, setCasePolicy, setInvalidChars, setMatchPickList, setMax, setMin, setPickList, setRange, setSpinPolicy, setValidChars, spinDown, spinUp, subtractIncrement, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.klg.jclass.field.validate.JCValidator |
getDefaultValue |
Field Detail |
protected DecimalFormat displayFormat
protected DecimalFormat editFormat
protected DecimalFormatSymbols symbols
protected DecimalFormatSymbols currencySymbols
protected String display_pattern
protected String edit_pattern
protected int spin_policy
protected String exponentialChar
protected boolean isCurrency
protected Locale currency_locale
protected boolean use_intl_currency_symbol
Constructor Detail |
public JCNumberValidator()
Method Detail |
public Object copyValue(Object value)
clone()
method is protected in the Object
class we cannot actually clone a generic object without knowing what it is;
therefore the validator must provide this routine to do the copying for
JCField
.
copyValue
in interface JCValidator
copyValue
in class AbstractValidator
value
- The value to be copied.
protected abstract void setPatterns()
public void setLocale(Locale locale)
setLocale
in class AbstractValidator
locale
- protected abstract DecimalFormat createDisplayFormat(Locale l)
protected abstract DecimalFormat createEditFormat(Locale l)
public void setCursor(com.klg.jclass.field.validate.TextCursorEvent e)
setCursor
in interface JCValidator
setCursor
in class AbstractValidator
e
- public String getDisplayPattern()
displayPattern
.
displayPettern
setDisplayPattern(java.lang.String)
public void setDisplayPattern(String pattern)
DecimalFormat
object used
by the validator.
pattern
- DecimalFormat
public String getEditPattern()
editPattern
.
editPattern
setEditPattern(java.lang.String)
public void setEditPattern(String pattern)
DecimalFormat
object used
by the validator.
pattern
- DecimalFormat
public DecimalFormat getDisplayFormat()
DecimalFormat
object being used by the validator.
public DecimalFormat getEditFormat()
DecimalFormat
object being used by the validator.
public void setDisplayFormat(DecimalFormat formatter)
DecimalFormat
object being used to format the data.
formatter
- public void setEditFormat(DecimalFormat formatter)
DecimalFormat
object being used to format the data.
formatter
- public int getFirstValidCursorPosition()
getFirstValidCursorPosition
in interface JCValidator
getFirstValidCursorPosition
in class AbstractValidator
public String format(Object obj)
format
in interface JCValidator
format
in class AbstractValidator
obj
-
public boolean isCurrency()
true
if the formatted data is a currency.
true
if the formatted data is a currencypublic void setCurrency(boolean is_currency)
is_currency
- public Locale getCurrencyLocale()
public void setCurrencyLocale(Locale l)
CurrencyLocale
is null
, then the validator's
Locale is used.
l
- AbstractValidator.setLocale(java.util.Locale)
protected String getLocalCurrencySymbol(Locale l)
protected String getIntlCurrencySymbol(Locale l)
public String getCurrencySymbol(Locale l)
public String getCurrencySymbol()
useIntlCurrencySymbol
flag is not set, then the local currency
symbol will be returned; otherwise the international currency symbol is
returned.
setCurrencyLocale(java.util.Locale)
,
AbstractValidator.setLocale(java.util.Locale)
,
setUseIntlCurrencySymbol(boolean)
public boolean getUseIntlCurrencySymbol()
getCurrencySymbol(java.util.Locale)
public void setUseIntlCurrencySymbol(boolean s)
s
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |