|
JClass 4.5.0 API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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_policy,
SPIN_SUBFIELD,
SPIN_WRAP,
supportedClasses,
UPPERCASE,
valid_chars |
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(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,
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 |
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)
protected abstract void setPatterns()
public void setLocale(Locale locale)
protected abstract DecimalFormat createDisplayFormat(Locale l)
protected abstract DecimalFormat createEditFormat(Locale l)
public void setCursor(TextCursorEvent e)
text
- the current textprev_position
- the previous position of the cursornew_position
- the new position of the cursorpublic String getDisplayPattern()
setDisplayPattern(java.lang.String)
public void setDisplayPattern(String pattern)
DecimalFormat
public String getEditPattern()
setEditPattern(java.lang.String)
public void setEditPattern(String pattern)
DecimalFormat
public DecimalFormat getDisplayFormat()
public DecimalFormat getEditFormat()
public void setDisplayFormat(DecimalFormat formatter)
public void setEditFormat(DecimalFormat formatter)
public int getFirstValidCursorPosition()
public String format(Object obj)
public boolean isCurrency()
public void setCurrency(boolean is_currency)
public Locale getCurrencyLocale()
public void setCurrencyLocale(Locale l)
AbstractValidator.setLocale(java.util.Locale)
protected String getLocalCurrencySymbol(Locale l)
protected String getIntlCurrencySymbol(Locale l)
public String getCurrencySymbol(Locale l)
public String getCurrencySymbol()
setCurrencyLocale(java.util.Locale)
,
AbstractValidator.setLocale(java.util.Locale)
,
setUseIntlCurrencySymbol(boolean)
public boolean getUseIntlCurrencySymbol()
getCurrencySymbol(java.util.Locale)
public void setUseIntlCurrencySymbol(boolean s)
|
Copyright© 1999-2000 KL Group Inc. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |