com.gargoylesoftware.base.util

Class DocumentUtil.LengthLimitedDocument

private static class DocumentUtil.LengthLimitedDocument extends DocumentUtil.PassthroughDocument

A wrapper document that prevents the user from typing more than a specified number of characters.
Field Summary
intmaxLength_
Constructor Summary
LengthLimitedDocument(Document document, int maxLength)
Create an instance
Method Summary
voidinsertString(int offset, String string, AttributeSet attributeSet)

Field Detail

maxLength_

private int maxLength_

Constructor Detail

LengthLimitedDocument

public LengthLimitedDocument(Document document, int maxLength)
Create an instance

Parameters: document The document to wrap maxLength The maximum number of characters that can be entered into this document

Method Detail

insertString

public void insertString(int offset, String string, AttributeSet attributeSet)

UNKNOWN: Document.insertString(int,String,AttributeSet)