ProgramixGenericLib v5.0.1

com.programix.gui.text
Class FilterChainDocument.LengthFilter

java.lang.Object
  extended by com.programix.gui.text.FilterChainDocument.LengthFilter
All Implemented Interfaces:
FilterChainDocument.Filter
Enclosing class:
FilterChainDocument

public static class FilterChainDocument.LengthFilter
extends Object
implements FilterChainDocument.Filter

Filters content by only allowing a maximum number of characters to be in the document. When the max length is present, insertion of additional characters are ignored.

Author:
Paul Hyde

Constructor Summary
FilterChainDocument.LengthFilter(int maxLength)
           
 
Method Summary
 String filter(int offset, String src, Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterChainDocument.LengthFilter

public FilterChainDocument.LengthFilter(int maxLength)
Method Detail

filter

public String filter(int offset,
                     String src,
                     Document doc)
Specified by:
filter in interface FilterChainDocument.Filter

ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.