|
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.JCStringValidator | +--com.klg.jclass.field.validate.JCIPAddressValidator
This class validates objects of type IPAddress.
Field Summary | |
protected int |
increment_field
|
protected JCIntegerValidator[] |
validators
|
Fields inherited from class com.klg.jclass.field.validate.JCStringValidator |
compiled_mask_ch,
compiled_mask_sym,
defaultValue,
mask,
mask_chars,
mask_length,
num_editable_pos,
num_mask_match,
place_holder_chars |
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 | |
JCIPAddressValidator()
Constructs a JCIPAddressValidator |
|
JCIPAddressValidator(Locale locale,
Number min1,
Number max1,
Number min2,
Number max2,
Number min3,
Number max3,
Number min4,
Number max4,
ListModel picklist,
boolean match_picklist,
Integer increment,
boolean allow_null,
Object default_value)
Constructs a JCStringValidator with the values specified. |
Method Summary | |
protected Object |
addIncrement(Object current)
Increments the current object by the increment value. |
void |
changeText(TextEvent e)
Called whenever a user enters a character interactively. |
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. |
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. |
String |
format(Object obj)
Formats the JCIPAddress. |
Object |
getDefaultValue()
Returns the default value for the field. |
Integer |
getIncrement()
Returns the increment. |
int |
getIncrementField()
Returns the incrementField operated on by the currently set increment value. |
protected Class[] |
getSupportedClasses()
Creates a list of classes supported by the validator. |
JCIntegerValidator[] |
getValidators()
Returns the set of Integer validators used to validate each subfield. |
void |
inferSubField(int selection_start,
int selection_end)
Infers the sub-field in the currently selected region that will be selected. |
Object |
parse(Class class_type,
String text)
Parses the text into a JCIPAddress object. |
void |
setDefaultValue(Object default_value)
Sets the default value for the field. |
void |
setIncrement(Integer increment)
Sets the increment when spinning a field. |
void |
setIncrementField(int field)
Sets the value of the incrementField operated on by the increment. |
void |
setIPValidators(JCIntegerValidator[] validators)
Sets the validators to be used for each subfield of the ip. |
void |
setMask(String mask)
Overrides setMask so the mask cannot change. |
void |
setSpinPolicy(int spin_policy)
Overrides setSpinPolicy since we always want SPIN_SUBFIELD for this validator. |
protected Object |
subtractIncrement(Object current)
Decrements the current object by the increment value. |
boolean |
validate(Object obj)
Validates the ip address. |
Methods inherited from class com.klg.jclass.field.validate.JCStringValidator |
compileMask,
formatForEdit,
getFirstValidCursorPosition,
getMask,
getMaskChars,
getNextCursorPosition,
getNumMaskMatch,
getParsedMask,
getPlaceHolderChars,
hasEditFormat,
inRange,
internalValidate,
isValidChar,
setCursor,
setMaskChars,
setNumMaskMatch,
setPlaceHolderChars |
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,
isClassSupported,
isValidChar,
setAllowNull,
setCasePolicy,
setInvalidChars,
setLocale,
setMatchPickList,
setMax,
setMin,
setPickList,
setRange,
setValidChars,
spinDown,
spinUp |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected int increment_field
protected JCIntegerValidator[] validators
Constructor Detail |
public JCIPAddressValidator()
public JCIPAddressValidator(Locale locale, Number min1, Number max1, Number min2, Number max2, Number min3, Number max3, Number min4, Number max4, ListModel picklist, boolean match_picklist, Integer increment, boolean allow_null, Object default_value)
Method Detail |
protected Class[] getSupportedClasses()
public String format(Object obj)
public Object parse(Class class_type, String text)
text
- text to be converted to an objectpublic void changeText(TextEvent e)
public Object copyValue(Object value)
public void setMask(String mask)
JCStringValidator.setMaskChars(java.lang.String)
,
JCStringValidator.getMask()
public void setIPValidators(JCIntegerValidator[] validators)
public JCIntegerValidator[] getValidators()
public boolean validate(Object obj)
obj
- object to be checkedpublic void setSpinPolicy(int spin_policy)
protected Object addIncrement(Object current)
protected Object subtractIncrement(Object current)
public void inferSubField(int selection_start, int selection_end)
public void setIncrement(Integer increment)
public Integer getIncrement()
public int getIncrementField()
public void setIncrementField(int field)
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)
|
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 |