Package adams.gui.core
Class RegExpConstrainedTextField.RegExpConstraintCheckModel
- java.lang.Object
-
- adams.gui.core.CheckedTextField.AbstractCheckModel
-
- adams.gui.core.RegExpConstrainedTextField.RegExpConstraintCheckModel
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- RegExpConstrainedTextField
public static class RegExpConstrainedTextField.RegExpConstraintCheckModel extends CheckedTextField.AbstractCheckModel
A model for checking entered string again regexp.- Version:
- $Revision: 4584 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseRegExp
m_RegExp
the regular expression to use for checking.-
Fields inherited from class adams.gui.core.CheckedTextField.AbstractCheckModel
m_DefaultValue
-
-
Constructor Summary
Constructors Constructor Description RegExpConstraintCheckModel(BaseRegExp regExp)
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseRegExp
getRegExp()
Returns the current regular expression.boolean
isValid(String text)
Checks whether the content is valid.void
setRegExp(BaseRegExp value)
Sets the regular expression.-
Methods inherited from class adams.gui.core.CheckedTextField.AbstractCheckModel
getDefaultValue, setDefaultValue, toString
-
-
-
-
Field Detail
-
m_RegExp
protected BaseRegExp m_RegExp
the regular expression to use for checking.
-
-
Constructor Detail
-
RegExpConstraintCheckModel
public RegExpConstraintCheckModel(BaseRegExp regExp)
Initializes the model.- Parameters:
regExp
- the regular expression to use for checking
-
-
Method Detail
-
setRegExp
public void setRegExp(BaseRegExp value)
Sets the regular expression.- Parameters:
value
- the regular expression
-
getRegExp
public BaseRegExp getRegExp()
Returns the current regular expression.- Returns:
- the regular expression
-
isValid
public boolean isValid(String text)
Checks whether the content is valid.- Specified by:
isValid
in classCheckedTextField.AbstractCheckModel
- Parameters:
text
- the string to check- Returns:
- true if valid
-
-