Package org.kopi.vkopi.lib.ui.swing.form
Class KopiStyledDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
javax.swing.text.html.HTMLDocument
org.kopi.vkopi.lib.ui.swing.form.KopiStyledDocument
- All Implemented Interfaces:
Serializable,Document,StyledDocument,Stateful,KopiDocument
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLDocument
HTMLDocument.BlockElement, HTMLDocument.HTMLReader, HTMLDocument.Iterator, HTMLDocument.RunElementNested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElementNested classes/interfaces inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement -
Field Summary
Fields inherited from class javax.swing.text.html.HTMLDocument
AdditionalCommentsFields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULTFields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementNameFields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty -
Constructor Summary
ConstructorsConstructorDescriptionKopiStyledDocument(org.kopi.galite.visual.form.VField model, org.kopi.galite.visual.form.ModelTransformer transformer) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetModel()Returns the text currently showed by this documentintgetState()booleanbooleanvoidinsertString(int offs, String str, AttributeSet a) booleanisAlert()voidremove(int offs, int len) voidsetAlert(boolean alert) voidsetAutofill(boolean autofill) voidsetBgColor(Color bgColor) voidsetEditorKit(HTMLEditorKit editorKit) voidsetHasAction(boolean hasAction) voidsetHasCriticalValue(boolean hasCriticalValue) voidChanges the text of this document without checkingvoidsetState(int state) Methods inherited from class javax.swing.text.html.HTMLDocument
create, createBranchElement, createDefaultRoot, createLeafElement, fireChangedUpdate, fireUndoableEditUpdate, getBase, getElement, getElement, getIterator, getParser, getPreservesUnknownTags, getReader, getReader, getStyleSheet, getTokenThreshold, insert, insertAfterEnd, insertAfterStart, insertBeforeEnd, insertBeforeStart, insertUpdate, processHTMLFrameHyperlinkEvent, setBase, setInnerHTML, setOuterHTML, setParagraphAttributes, setParser, setPreservesUnknownTags, setTokenThresholdMethods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, styleChangedMethods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createPosition, dump, fireInsertUpdate, fireRemoveUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.text.Document
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeDocumentListener, removeUndoableEditListener, render
-
Constructor Details
-
KopiStyledDocument
public KopiStyledDocument(org.kopi.galite.visual.form.VField model, org.kopi.galite.visual.form.ModelTransformer transformer)
-
-
Method Details
-
setEditorKit
-
getModelText
Returns the text currently showed by this document- Specified by:
getModelTextin interfaceKopiDocument
-
setModelText
Changes the text of this document without checking- Specified by:
setModelTextin interfaceKopiDocument
-
remove
- Specified by:
removein interfaceDocument- Overrides:
removein classAbstractDocument- Throws:
BadLocationException
-
insertString
- Specified by:
insertStringin interfaceDocument- Overrides:
insertStringin classAbstractDocument- Throws:
BadLocationException
-
getState
public int getState() -
getAutofill
public boolean getAutofill()- Specified by:
getAutofillin interfaceStateful
-
isAlert
public boolean isAlert() -
hasCriticalValue
public boolean hasCriticalValue()- Specified by:
hasCriticalValuein interfaceStateful
-
hasAction
public boolean hasAction() -
getBgColor
- Specified by:
getBgColorin interfaceStateful
-
getModel
-
setState
public void setState(int state) - Specified by:
setStatein interfaceKopiDocument
-
setHasCriticalValue
public void setHasCriticalValue(boolean hasCriticalValue) - Specified by:
setHasCriticalValuein interfaceKopiDocument
-
setHasAction
public void setHasAction(boolean hasAction) - Specified by:
setHasActionin interfaceKopiDocument
-
setBgColor
- Specified by:
setBgColorin interfaceKopiDocument
-
setAlert
public void setAlert(boolean alert) - Specified by:
setAlertin interfaceKopiDocument
-
setAutofill
public void setAutofill(boolean autofill) - Specified by:
setAutofillin interfaceKopiDocument
-