zul.inp
Class SimpleConstraint

java.lang.Object
  extended by zk.Object
      extended by zul.inp.SimpleConstraint
Direct Known Subclasses:
SimpleDateConstraint, SimpleDoubleSpinnerConstraint, SimpleSpinnerConstraint

public class SimpleConstraint
extends Object

The default constraint supporting no empty, regular expressions and so on.

Depending on the component (such as Intbox and Datebox).


Field Summary
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
 void $init(java.lang.Object a, String b, String c)
          Constructor.
 java.lang.Object getFlags()
          Returns the constraint flags Object which has many attribute about constraint, For example, f.NO_POSITIVE = true.
protected  void parseConstraint_(String cst)
          Parses a constraint into an Object attribute.
 void validate(Widget wgt, java.lang.Object val)
          validation for flag, validate date if val is date
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

$init

public void $init(java.lang.Object a,
                  String b,
                  String c)
Constructor.

Parameters:
a - It can be String or number, the number or name of flag, such as "no positive", 0x0001.
b - the regular expression
c - the error message

getFlags

public java.lang.Object getFlags()
Returns the constraint flags Object which has many attribute about constraint, For example, f.NO_POSITIVE = true.

Returns:
Object

parseConstraint_

protected void parseConstraint_(String cst)
Parses a constraint into an Object attribute. For example, "no positive" is parsed to f.NO_POSITIVE = true.

Deriving classes might override this to provide more constraints.

Parameters:
cst -

validate

public void validate(Widget wgt,
                     java.lang.Object val)
validation for flag, validate date if val is date

Parameters:
wgt -
val - a String, a number, or a date, the number or name of flag, such as "no positive", 0x0001.


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo