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:
java.io.Serializable,javax.swing.text.Document,javax.swing.text.StyledDocument,Stateful,KopiDocument
public class KopiStyledDocument extends javax.swing.text.html.HTMLDocument implements KopiDocument
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLDocument
javax.swing.text.html.HTMLDocument.BlockElement, javax.swing.text.html.HTMLDocument.HTMLReader, javax.swing.text.html.HTMLDocument.Iterator, javax.swing.text.html.HTMLDocument.RunElement
-
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
-
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
-
-
Constructor Summary
Constructors Constructor Description KopiStyledDocument(org.kopi.galite.visual.form.VField model, org.kopi.galite.visual.form.ModelTransformer transformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAutofill()java.awt.ColorgetBgColor()java.lang.ObjectgetModel()java.lang.StringgetModelText()Returns the text currently showed by this documentintgetState()booleanhasAction()booleanhasCriticalValue()voidinsertString(int offs, java.lang.String str, javax.swing.text.AttributeSet a)booleanisAlert()voidremove(int offs, int len)voidsetAlert(boolean alert)voidsetAutofill(boolean autofill)voidsetBgColor(java.awt.Color bgColor)voidsetEditorKit(javax.swing.text.html.HTMLEditorKit editorKit)voidsetHasAction(boolean hasAction)voidsetHasCriticalValue(boolean hasCriticalValue)voidsetModelText(java.lang.String s)Changes 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, setTokenThreshold
-
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, styleChanged
-
Methods 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, writeUnlock
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.text.Document
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeDocumentListener, removeUndoableEditListener, render
-
-
-
-
Method Detail
-
setEditorKit
public void setEditorKit(javax.swing.text.html.HTMLEditorKit editorKit)
-
getModelText
public java.lang.String getModelText()
Returns the text currently showed by this document- Specified by:
getModelTextin interfaceKopiDocument
-
setModelText
public void setModelText(java.lang.String s)
Changes the text of this document without checking- Specified by:
setModelTextin interfaceKopiDocument
-
remove
public void remove(int offs, int len) throws javax.swing.text.BadLocationException- Specified by:
removein interfacejavax.swing.text.Document- Overrides:
removein classjavax.swing.text.AbstractDocument- Throws:
javax.swing.text.BadLocationException
-
insertString
public void insertString(int offs, java.lang.String str, javax.swing.text.AttributeSet a) throws javax.swing.text.BadLocationException- Specified by:
insertStringin interfacejavax.swing.text.Document- Overrides:
insertStringin classjavax.swing.text.AbstractDocument- Throws:
javax.swing.text.BadLocationException
-
getAutofill
public boolean getAutofill()
- Specified by:
getAutofillin interfaceStateful
-
hasCriticalValue
public boolean hasCriticalValue()
- Specified by:
hasCriticalValuein interfaceStateful
-
getBgColor
public java.awt.Color getBgColor()
- Specified by:
getBgColorin interfaceStateful
-
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
public void setBgColor(java.awt.Color bgColor)
- Specified by:
setBgColorin interfaceKopiDocument
-
setAlert
public void setAlert(boolean alert)
- Specified by:
setAlertin interfaceKopiDocument
-
setAutofill
public void setAutofill(boolean autofill)
- Specified by:
setAutofillin interfaceKopiDocument
-
-