|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.InputVerifier
de.mospace.swing.text.NumericInputVerifier
public class NumericInputVerifier
An input verifier that checks if a text component's text can be interpreted as a particular sub-class of number and if it falls into the allowed range of numbers.
| Constructor Summary | |
|---|---|
NumericInputVerifier(Class c)
Deprecated. Constructs a new NumericInputVerifier for the full range of numbers in the given sub-class of Number. |
|
NumericInputVerifier(Class c,
Comparable min,
Comparable max)
Deprecated. Constructs a new NumericInputVerifier for the given sub-class of Number and the given limits. |
|
| Method Summary | |
|---|---|
Exception |
explain()
Deprecated. Explains why the last call to verify(javax.swing.JComponent) returned false. |
Comparable |
getLowerLimit()
Deprecated. Returns the smallest allowed number. |
Class |
getNumberClass()
Deprecated. Returns the class against which input will be checked. |
Comparable |
getUpperLimit()
Deprecated. Returns the largest allowed number. |
void |
setLowerLimit(Comparable min)
Deprecated. Sets the smallest allowed number. |
void |
setNumberClass(Class c)
Deprecated. Sets the class against which input will be checked. |
void |
setUpperLimit(Comparable max)
Deprecated. Sets the largest allowed number. |
boolean |
verify(JComponent input)
Deprecated. |
| Methods inherited from class javax.swing.InputVerifier |
|---|
shouldYieldFocus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumericInputVerifier(Class c,
Comparable min,
Comparable max)
c - the sub-class of number that input will be interpreted asmin - lower limit. null for none.max - upper limit. null for none.
IllegalArgumentException - if c does not implement
Number, or if it does not have a static
valueOf(String) method or a single argument string
constructor.
ClassCastException - if
min and max are not null
or instances of c.public NumericInputVerifier(Class c)
c - the sub-class of number that input will be
interpreted as
IllegalArgumentException - if c does not implement
Number, or if it does not have a static
valueOf(String) method or a constructor with
a single String argument| Method Detail |
|---|
public Class getNumberClass()
setNumberClass(java.lang.Class)public void setNumberClass(Class c)
c - the sub-class of number that input will be interpreted as
IllegalArgumentException - if c does not implement
Number, or if it does not have a static
valueOf(String)
method or a single argument string constructor.public void setUpperLimit(Comparable max)
max - upper limit. null for none.
ClassCastException - if max is not null
or an instance of getNumberClass.public Comparable getUpperLimit()
public void setLowerLimit(Comparable min)
min - lower limit. null for none.
ClassCastException - if min is not null
or an instance of getNumberClass.public Exception explain()
verify(javax.swing.JComponent) returned false. If the
last call to verify returned false, this method will return
null - if the input was out of range
nullpublic Comparable getLowerLimit()
public boolean verify(JComponent input)
verify in class InputVerifierIllegalArgumentException - if input is not a
JTextComponent
|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||