public class FormFieldDocument extends PlainDocument
FormFieldComponents.AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement| Modifier and Type | Field and Description |
|---|---|
static Function<String,String> |
defaultConverter
The default converter that applies to all components.
Default is null. |
lineLimitAttribute, tabSizeAttributeBAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
FormFieldDocument(FormFieldComponent field)
Creates a form field document.
|
| Modifier and Type | Method and Description |
|---|---|
Function<String,String> |
getConverter()
Gets the current converter.
|
Function<String,String> |
getEffectiveConverter()
Gets the effective converter.
|
void |
insertString(int offs,
String str,
AttributeSet a) |
void |
remove(int offs,
int len) |
void |
setConverter(Function<String,String> converter)
Sets the string converter.
|
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 FormFieldDocument(FormFieldComponent field)
field - the form field componentpublic Function<String,String> getConverter()
public void setConverter(Function<String,String> converter)
converter - the string converterpublic Function<String,String> getEffectiveConverter()
Returns the defaultConverter if there is no converter for this component.
Otherwise the component-specific converter applies.
public void insertString(int offs,
String str,
AttributeSet a)
throws BadLocationException
Overridden to implement autoSelect, character conversion, valid and invalid character check, filler, insert/override, maxColumns, adjustment, etc...
insertString in interface DocumentinsertString in class PlainDocumentBadLocationExceptionpublic void remove(int offs,
int len)
throws BadLocationException
remove in interface Documentremove in class AbstractDocumentBadLocationExceptionTentackle - distributed, domain- and model-driven