Groovy Documentation

com.wordpress.tipsforjava.swing.text
[Java] Class UpperCaseDocumentFilter

java.lang.Object
  javax.swing.text.DocumentFilter
      com.wordpress.tipsforjava.swing.text.ChainedDocumentFilter
          com.wordpress.tipsforjava.swing.text.UpperCaseDocumentFilter

public class UpperCaseDocumentFilter
extends ChainedDocumentFilter

The UpperCaseDocumentFilter converts all characters to upper case before the characters are inserted into the Document.

Authors:
Rob Camick
Darryl Burke


Field Summary
 
Fields inherited from class ChainedDocumentFilter
filter
 
Constructor Summary
UpperCaseDocumentFilter()

Standard constructor for stand alone usage

UpperCaseDocumentFilter(DocumentFilter filter)

Constructor used when further filtering is required after this filter has been applied.

 
Method Summary
private String convertString(String mixedCase)

Convert each character in the input string to upper case

void insertString(FilterBypass fb, int offs, String str, AttributeSet a)

void replace(FilterBypass fb, int offs, int length, String str, AttributeSet a)

 
Methods inherited from class ChainedDocumentFilter
getFilter, insertString, installFilter, provideErrorFeedback, remove, replace, setFilter, uninstallFilter
 
Methods inherited from class DocumentFilter
replace, remove, insertString, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

UpperCaseDocumentFilter

public UpperCaseDocumentFilter()
Standard constructor for stand alone usage


UpperCaseDocumentFilter

public UpperCaseDocumentFilter(DocumentFilter filter)
Constructor used when further filtering is required after this filter has been applied.


 
Method Detail

convertString

private String convertString(String mixedCase)
Convert each character in the input string to upper case
Parameters:
mixedCase - a String of mixed case characters
Returns:
an upper cased String


insertString

public void insertString(FilterBypass fb, int offs, String str, AttributeSet a)


replace

public void replace(FilterBypass fb, int offs, int length, String str, AttributeSet a)


 

Groovy Documentation