|
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.JCStringValidator | +--com.klg.jclass.field.validate.JCIPAddressValidator
This class validates objects of type IPAddress.
Field Summary | |
protected int |
increment_field
|
protected com.klg.jclass.field.validate.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 |
Fields inherited from interface com.klg.jclass.field.validate.JCValidator |
DOWN, UP |
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(com.klg.jclass.field.validate.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. |
com.klg.jclass.field.validate.JCIntegerValidator[] |
getValidators()
Returns the set of Integer validators used to validate each subfield. |
void |
inferSubField(int selection_start,
int selection_end)
Infers the subfield 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(com.klg.jclass.field.validate.JCIntegerValidator[] validators)
Sets the validators to be used for each subfield of the IP (for example, xxx.xxx.xxx.xxx). |
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, getLastValidInputCharPosition, 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 com.klg.jclass.field.validate.JCIntegerValidator[] validators
Constructor Detail |
public JCIPAddressValidator()
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)
JCStringValidator
with the values specified.
allow_null
- default_value
- increment
- locale
- match_picklist
- max1
- max2
- max3
- max4
- min1
- min2
- min3
- min4
- picklist
- Method Detail |
protected Class[] getSupportedClasses()
getSupportedClasses
in class JCStringValidator
public String format(Object obj)
JCIPAddress
.
format
in interface JCValidator
format
in class JCStringValidator
obj
-
public Object parse(Class class_type, String text)
JCIPAddress
object.
parse
in interface JCValidator
parse
in class JCStringValidator
class_type
- text
-
public void changeText(com.klg.jclass.field.validate.TextEvent e)
changeText
in interface JCValidator
changeText
in class JCStringValidator
e
- 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 JCStringValidator
value
-
public void setMask(String mask)
setMask
so the mask cannot change.
setMask
in class JCStringValidator
mask
- JCStringValidator.setMaskChars(java.lang.String)
,
JCStringValidator.getMask()
public void setIPValidators(com.klg.jclass.field.validate.JCIntegerValidator[] validators)
validators
- public com.klg.jclass.field.validate.JCIntegerValidator[] getValidators()
public boolean validate(Object obj)
validate
in interface JCValidator
validate
in class JCStringValidator
obj
-
public void setSpinPolicy(int spin_policy)
setSpinPolicy
, since we always want
SPIN_SUBFIELD
for this validator.
setSpinPolicy
in class AbstractValidator
spin_policy
- protected Object addIncrement(Object current)
addIncrement
in class JCStringValidator
current
-
protected Object subtractIncrement(Object current)
subtractIncrement
in class JCStringValidator
current
-
public void inferSubField(int selection_start, int selection_end)
inferSubField
in interface JCValidator
inferSubField
in class AbstractValidator
selection_start
- selection_end
- public void setIncrement(Integer increment)
Integer
object.
increment
- public Integer getIncrement()
public int getIncrementField()
incrementField
operated on by the currently set
increment value.
incrementField
operated on by the currently set
increment valuepublic void setIncrementField(int field)
incrementField
operated on by the increment.
field
- public Object convertToSupported(Object obj)
convertFromSupported()
method.
convertToSupported
in class JCStringValidator
obj
-
convertFromSupported(java.lang.Object, java.lang.Class)
public Object convertFromSupported(Object from, Class class_type)
convertFromSupported
in class JCStringValidator
from
- class_type
-
convertToSupported(java.lang.Object)
public Object getDefaultValue()
getDefaultValue
in interface JCValidator
getDefaultValue
in class JCStringValidator
public void setDefaultValue(Object default_value)
setDefaultValue
in class JCStringValidator
default_value
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |