Class IntegerArrayFilter
- java.lang.Object
-
- javax.swing.text.DocumentFilter
-
- de.alpharogroup.swing.document.filter.IntegerArrayFilter
-
public class IntegerArrayFilter extends javax.swing.text.DocumentFilterThe classIntegerArrayFilterprovide a document filter that accepts only int arrays
-
-
Constructor Summary
Constructors Constructor Description IntegerArrayFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinsertString(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, java.lang.String string, javax.swing.text.AttributeSet attr)voidonValidationError(java.lang.String text)Callback method when an validation error occurs.voidremove(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length)voidreplace(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attrs)protected booleanvalidate(java.lang.String text)Validate the given string that it is a int array
-
-
-
Method Detail
-
insertString
public void insertString(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, java.lang.String string, javax.swing.text.AttributeSet attr) throws javax.swing.text.BadLocationException- Overrides:
insertStringin classjavax.swing.text.DocumentFilter- Throws:
javax.swing.text.BadLocationException
-
onValidationError
public void onValidationError(java.lang.String text)
Callback method when an validation error occurs.- Parameters:
text- the text to validate
-
remove
public void remove(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length) throws javax.swing.text.BadLocationException- Overrides:
removein classjavax.swing.text.DocumentFilter- Throws:
javax.swing.text.BadLocationException
-
replace
public void replace(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attrs) throws javax.swing.text.BadLocationException- Overrides:
replacein classjavax.swing.text.DocumentFilter- Throws:
javax.swing.text.BadLocationException
-
validate
protected boolean validate(java.lang.String text)
Validate the given string that it is a int array- Parameters:
text- the text- Returns:
- true, if successful
-
-