|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.InputVerifier | +--gravsphcolldemo.Vector3DInputVerifier
This is a subclass of InputVerifier that can be used to validate a JTextField. The contents are valid if the text can be interpreted as a Vector3D (using the Vector3D constructor taking a String).
Constructor Summary | |
Vector3DInputVerifier()
Constructs a new Vector3DInputVerifier object. |
|
Vector3DInputVerifier(boolean emptyEntryAccepted)
Constructs a new Vector3DInputVerifier object. |
Method Summary | |
boolean |
getAcceptEmpty()
Is the empty string accepted as a valid entry? |
void |
setAcceptEmpty(boolean emptyEntryAccepted)
Sets whether the empty string should be accepted as valid. |
boolean |
shouldYieldFocus(javax.swing.JComponent input)
Displays a message box complaining to the user and informing them briefly of the format of a Vector3D, if the input is invalid, in addition to calling the inherited method. |
static boolean |
validVector3D(java.lang.String s)
Returns true if the argument represents a valid Vector3D. |
boolean |
verify(javax.swing.JComponent input)
Casts the argument as a JTextField, then parses it as a Vector3D. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Vector3DInputVerifier()
public Vector3DInputVerifier(boolean emptyEntryAccepted)
Method Detail |
public boolean getAcceptEmpty()
public void setAcceptEmpty(boolean emptyEntryAccepted)
public boolean shouldYieldFocus(javax.swing.JComponent input)
shouldYieldFocus
in class javax.swing.InputVerifier
public boolean verify(javax.swing.JComponent input)
verify
in class javax.swing.InputVerifier
public static boolean validVector3D(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |