public class EnumeratorDocument extends G9Document
AbstractDocument.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 |
|---|
EnumeratorDocument(int datatype,
String inputFormat,
String outputFormat,
int maxLength,
G9Enums enumerations,
Class enumClass)
Constructs a new EnumeratorDocument
|
| Modifier and Type | Method and Description |
|---|---|
String |
format()
Default implementation is to return
getValue().toString |
Object |
getValue() |
void |
insertString(int offset,
String str,
AttributeSet attr) |
Object |
parse(String str)
Default implementation is to return the input string.
|
void |
setValue(Object value) |
Object |
toValue(Object obj)
Sets the enumerator value
|
Object |
transform(Object o)
Internal use! Transform an object to the text version and back.
|
format, getDatatype, getInputFormat, getInputMode, getMaxLength, getName, getOutputFormat, getOutputText, setInputFormat, setInputMode, setMaxLength, setName, setOutputFormat, toStringcreateDefaultRoot, 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, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockpublic EnumeratorDocument(int datatype,
String inputFormat,
String outputFormat,
int maxLength,
G9Enums enumerations,
Class enumClass)
datatype - the datatypeinputFormat - the input formatoutputFormat - the output formatmaxLength - the max lengthenumerations - the enumerationsenumClass - the type of the enumerationpublic void insertString(int offset,
String str,
AttributeSet attr)
throws BadLocationException
insertString in interface DocumentinsertString in class PlainDocumentBadLocationExceptionpublic void setValue(Object value)
setValue in interface G9FieldValuesetValue in class G9Documentvalue - (missing javadoc)public Object getValue()
getValue in interface G9FieldValuegetValue in class G9Documentpublic Object toValue(Object obj)
obj - the valuepublic String format()
G9DocumentgetValue().toStringformat in interface G9FieldValueformat in class G9DocumentG9FieldValue.format()public Object transform(Object o)
G9Documenttransform in class G9Documento - the object to transformpublic Object parse(String str) throws ParseException
G9Documentparse in interface G9FieldValueparse in class G9Documentstr - (missing javadoc)ParseException - (missing javadoc)G9FieldValue.parse(java.lang.String)Copyright © 2006–2017 Esito AS. All rights reserved.