IMEDocument Class

com.bea.ide.util.swing
IMEDocument Class

public class IMEDocument

    extends PlainDocument

A Document implementation that can be used with input from IME Fix for bugs 25338 & 24878 Swing's version of handleInsertString does not support IME's well This class returns a document which overrides insertString making a copy of the attribute set that doesn't mention ComposedTextAttribute but stores whether it saw the the ComposedTextAttribute on the way in and if so does not pass on UndoableEditEvents


Hierarchy
Object
  AbstractDocument
    PlainDocument
      IMEDocument
All Implemented Interfaces

Document, Serializable

Nested Class Summary

 
Nested classes from  javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
 

Field Summary

protected boolean
_isComposedText
boolean
   
Fields from  javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields from  javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 

Constructor Summary

IMEDocument()

 

Method Summary

public void
fireUndoableEditUpdate(UndoableEditEvent e)
public void
insertString(int offs, String str, AttributeSet a)
protected boolean
isComposedText(AttributeSet attr)
 
Methods from  javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
 
Methods from  javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDefaultRootElement, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getParagraphElement, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, insertString, insertUpdate, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, removeUpdate, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.swing.text.Document
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render
 

Field Detail

_isComposedText

protected boolean _isComposedText

 

Constructor Detail

IMEDocument

public IMEDocument()
 

Method Detail

fireUndoableEditUpdate(UndoableEditEvent) Method

public void fireUndoableEditUpdate(UndoableEditEvent e)
Overrides
AbstractDocument.fireUndoableEditUpdate(UndoableEditEvent)

insertString(int, String, AttributeSet) Method

public void insertString(int offs, 
                         String str, 
                         AttributeSet a)
throws BadLocationException
Overrides
PlainDocument.insertString(int, String, AttributeSet)

Exceptions

BadLocationException

isComposedText(AttributeSet) Method

protected boolean isComposedText(AttributeSet attr)