|
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 | +--com.klg.jclass.field.validate.JCLongValidator
This class validates objects of type long.
Field Summary | |
protected Object |
CANT_USE_DISPLAY_LIST
|
protected Object |
defaultValue
|
protected String[] |
display_list
|
protected static String |
maxstring
|
protected static String |
minstring
|
Fields inherited from class com.klg.jclass.field.validate.JCNumberValidator |
currency_locale,
currencySymbols,
display_pattern,
displayFormat,
edit_pattern,
editFormat,
exponentialChar,
isCurrency,
spin_policy,
symbols,
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 | |
JCLongValidator()
Constructs a JCLongValidator. |
|
JCLongValidator(Locale locale,
Number min,
Number max,
ListModel picklist,
boolean match_picklist,
String[] display_list,
Number increment,
String display_pattern,
boolean allow_null,
boolean currency,
boolean use_intl_currency_locale,
Locale currency_locale,
Object default_value)
Constructs a JCLongValidator with the values specified. |
Method Summary | |
protected Object |
addIncrement(Object current)
|
void |
changeText(TextEvent e)
Changes the specified text from the start_position to the end_position by inserting/replacing it by rge specified new_text. |
Object |
convertFromSupported(Object from,
Class class_type)
Converts the supported type to the type supported by the validator. |
Object |
convertToSupported(Object obj)
Converts the specified type (if possible) to the type supported by the validator. |
protected DecimalFormat |
createDisplayFormat(Locale l)
|
protected DecimalFormat |
createEditFormat(Locale l)
|
String |
format(Object obj)
Returns a formatted string given an object. |
String |
formatForEdit(Object obj)
Generates a String representation of the given object for use in edit mode. |
protected Object |
formatFromDisplayList(Object obj)
|
Object |
getDefaultValue()
Returns the default value for the field. |
String[] |
getDisplayList()
Returns the value of DisplayList.. |
Number |
getIncrement()
Gets the number by which to spin the values in numeric spin fields. |
String[] |
getStringList()
Returns the value of DisplayList. |
protected Class[] |
getSupportedClasses()
Creates a list of classes supported by the validator. |
boolean |
hasEditFormat()
Reports whether the validator has a different edit format or not. |
boolean |
inRange(long value)
Checks if the value is in the valid range. |
boolean |
inRange(Number value)
Checks if the value is in the valid range. |
boolean |
inRange(Object value)
Checks if the value is in the valid range. |
Object |
parse(Class class_type,
String text)
Parses the given text and validates it. |
protected Object |
parseFromDisplayList(String text)
|
void |
setDefaultValue(Object default_value)
Sets the default value for the field. |
void |
setDisplayList(String[] list)
Sets the display list, which specifies a String format for the value in the PickList independent of what the format() method generates. |
void |
setIncrement(long increment)
Sets the number by which to spin the values in numeric spin fields. |
void |
setIncrement(Number increment)
Sets the number by which to spin the values in numeric spin fields. |
void |
setMax(long max)
Sets the maximum valid value. |
void |
setMin(long min)
Sets the minimum valid value. |
protected void |
setPatterns()
|
protected Object |
subtractIncrement(Object current)
|
boolean |
validate(Object value)
Validates a given object. |
Methods inherited from class com.klg.jclass.field.validate.JCNumberValidator |
copyValue,
getCurrencyLocale,
getCurrencySymbol,
getCurrencySymbol,
getDisplayFormat,
getDisplayPattern,
getEditFormat,
getEditPattern,
getFirstValidCursorPosition,
getIntlCurrencySymbol,
getLocalCurrencySymbol,
getUseIntlCurrencySymbol,
isCurrency,
setCurrency,
setCurrencyLocale,
setCursor,
setDisplayFormat,
setDisplayPattern,
setEditFormat,
setEditPattern,
setLocale,
setUseIntlCurrencySymbol |
Methods inherited from class com.klg.jclass.field.validate.AbstractValidator |
calculateSpinability,
checkValidInvalid,
compareValues,
convertCase,
createPopupComponent,
getAllowNull,
getCasePolicy,
getInvalidChars,
getItem,
getLocale,
getMatchPickList,
getMax,
getMin,
getNextValue,
getPickList,
getPickListIndex,
getPreviousValue,
getSpinPolicy,
getValidChars,
inferSubField,
isClassSupported,
isValidChar,
setAllowNull,
setCasePolicy,
setInvalidChars,
setMatchPickList,
setMax,
setMin,
setPickList,
setRange,
setSpinPolicy,
setValidChars,
spinDown,
spinUp |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final String minstring
protected static final String maxstring
protected String[] display_list
protected Object defaultValue
protected Object CANT_USE_DISPLAY_LIST
Constructor Detail |
public JCLongValidator()
public JCLongValidator(Locale locale, Number min, Number max, ListModel picklist, boolean match_picklist, String[] display_list, Number increment, String display_pattern, boolean allow_null, boolean currency, boolean use_intl_currency_locale, Locale currency_locale, Object default_value)
Method Detail |
protected Class[] getSupportedClasses()
public String[] getDisplayList()
setDisplayList(java.lang.String[])
public String[] getStringList()
setDisplayList(java.lang.String[])
,
AbstractValidator.setPickList(javax.swing.ListModel)
public void setDisplayList(String[] list)
public void setMax(long max)
public void setMin(long min)
protected Object addIncrement(Object current)
protected void setPatterns()
protected DecimalFormat createDisplayFormat(Locale l)
protected DecimalFormat createEditFormat(Locale l)
protected Object subtractIncrement(Object current)
public Number getIncrement()
public void setIncrement(Number increment)
public void setIncrement(long increment)
public boolean inRange(long value)
public boolean inRange(Number value)
public boolean inRange(Object value)
public void changeText(TextEvent e)
public Object parse(Class class_type, String text)
class_type
- object returned will be of the specified class typetext
- text to parsepublic boolean validate(Object value)
obj
- object to be checkedpublic String formatForEdit(Object obj)
public boolean hasEditFormat()
public String format(Object obj)
public Object convertToSupported(Object obj)
convertFromSupported(java.lang.Object, java.lang.Class)
public Object convertFromSupported(Object from, Class class_type)
convertToSupported(java.lang.Object)
public Object getDefaultValue()
public void setDefaultValue(Object default_value)
protected Object parseFromDisplayList(String text)
protected Object formatFromDisplayList(Object obj)
|
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 |