Class IntegerArrayFilter


  • public class IntegerArrayFilter
    extends javax.swing.text.DocumentFilter
    The class IntegerArrayFilter provide a document filter that accepts only int arrays
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.text.DocumentFilter

        javax.swing.text.DocumentFilter.FilterBypass
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void insertString​(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, java.lang.String string, javax.swing.text.AttributeSet attr)
      void onValidationError​(java.lang.String text)
      Callback method when an validation error occurs.
      void remove​(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length)
      void replace​(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attrs)
      protected boolean validate​(java.lang.String text)
      Validate the given string that it is a int array
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntegerArrayFilter

        public IntegerArrayFilter()
    • 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:
        insertString in class javax.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:
        remove in class javax.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:
        replace in class javax.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