public class RangeDocument extends PlainDocument
RangeDocument can take any character in the range of the given minimum and
maximumAbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElementlineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
RangeDocument(int minimum,
int maximum)
Instantiates a new
RangeDocument object |
| Modifier and Type | Method and Description |
|---|---|
void |
insertString(int offset,
String string,
AttributeSet attributes) |
void |
remove(int offset,
int length) |
String |
validate(String proposedValue)
Validate the given value by this
RangeDocument object |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdateaddDocumentListener, 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, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockpublic RangeDocument(int minimum,
int maximum)
RangeDocument objectminimum - the minimummaximum - the maximumpublic void insertString(int offset,
String string,
AttributeSet attributes)
throws BadLocationException
insertString in interface DocumentinsertString in class PlainDocumentBadLocationExceptionpublic void remove(int offset,
int length)
throws BadLocationException
remove in interface Documentremove in class AbstractDocumentBadLocationExceptionpublic String validate(String proposedValue) throws IllegalArgumentException
RangeDocument objectproposedValue - the proposed valueIllegalArgumentException - if the validation failsCopyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.