javax.swing
Class JSpinner.ListEditor.ListFormatter.Filter
java.lang.Object
javax.swing.text.DocumentFilter
javax.swing.JSpinner.ListEditor.ListFormatter.Filter
- Enclosing class:
- JSpinner.ListEditor.ListFormatter
- private class JSpinner.ListEditor.ListFormatter.Filter
- extends DocumentFilter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSpinner.ListEditor.ListFormatter.Filter
private JSpinner.ListEditor.ListFormatter.Filter()
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 Documentoffset
- Location in Documentlength
- Length of text to deletestring
- Text to insert, null indicates no text to insertattrs
- 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 Documentoffset
- 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 insertattr
- 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