javax.swing
Class JSpinner.ListEditor.ListFormatter.Filter

java.lang.Object
  extended byjavax.swing.text.DocumentFilter
      extended byjavax.swing.JSpinner.ListEditor.ListFormatter.Filter
Enclosing class:
JSpinner.ListEditor.ListFormatter

private class JSpinner.ListEditor.ListFormatter.Filter
extends DocumentFilter


Nested Class Summary
 
Nested classes inherited from class javax.swing.text.DocumentFilter
DocumentFilter.FilterBypass
 
Constructor Summary
private JSpinner.ListEditor.ListFormatter.Filter()
           
 
Method Summary
 void insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr)
          Invoked prior to insertion of text into the specified Document.
 void replace(DocumentFilter.FilterBypass fb, int offset, int length, String string, AttributeSet attrs)
          Invoked prior to replacing a region of text in the specified Document.
 
Methods inherited from class javax.swing.text.DocumentFilter
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpinner.ListEditor.ListFormatter.Filter

private JSpinner.ListEditor.ListFormatter.Filter()
Method Detail

replace

public void replace(DocumentFilter.FilterBypass fb,
                    int offset,
                    int length,
                    String string,
                    AttributeSet attrs)
             throws BadLocationException
Description copied from class: DocumentFilter
Invoked prior to replacing a region of text in the specified Document. Subclasses that want to conditionally allow replace should override this and only call supers implementation as necessary, or call directly into the FilterBypass.

Overrides:
replace in class DocumentFilter
Parameters:
fb - FilterBypass that can be used to mutate Document
offset - Location in Document
length - Length of text to delete
string - Text to insert, null indicates no text to insert
attrs - AttributeSet indicating attributes of inserted text, null is legal.
Throws:
BadLocationException - the given insert position is not a valid position within the document

insertString

public void insertString(DocumentFilter.FilterBypass fb,
                         int offset,
                         String string,
                         AttributeSet attr)
                  throws BadLocationException
Description copied from class: DocumentFilter
Invoked prior to insertion of text into the specified Document. Subclasses that want to conditionally allow insertion should override this and only call supers implementation as necessary, or call directly into the FilterBypass.

Overrides:
insertString in class DocumentFilter
Parameters:
fb - FilterBypass that can be used to mutate Document
offset - the offset into the document to insert the content >= 0. All positions that track change at or after the given location will move.
string - the string to insert
attr - the attributes to associate with the inserted content. This may be null if there are no attributes.
Throws:
BadLocationException - the given insert position is not a valid position within the document