public class FixedLengthPlainDocument extends PlainDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
lineLimitAttribute, tabSizeAttribute
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
StreamDescriptionProperty, TitleProperty
Constructor and Description |
---|
FixedLengthPlainDocument(int maxLength)
Create a new document with the given length.
|
Modifier and Type | Method and Description |
---|---|
void |
insertString(int offset,
String str,
AttributeSet a)
If this insertion would exceed the max document length, beep and
do nothing else.
|
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
public FixedLengthPlainDocument(int maxLength)
public void insertString(int offset, String str, AttributeSet a) throws BadLocationException
insertString
in interface Document
insertString
in class PlainDocument
BadLocationException
Copyright © 2003, 2023, Oracle and/or its affiliates.