Package rma.swing
Class ToggleDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
rma.swing.ToggleDocument
- All Implemented Interfaces:
Serializable,Document
a document that toggle between to values for JTextFields, and other components that use
PlainDocument
- See Also:
-
Nested Class Summary
Nested 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.PlainDocument
lineLimitAttribute, tabSizeAttributeFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidinsertString(int offs, String str, AttributeSet a) voidsetAllowOtherCase(boolean b) voidsetToggleKey(char toggleKey) set the keystroke that toggles between the 2 valuesvoidsetToggleValues(char val1, char val2) set the keystrokes to toggle betweenMethods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdateMethods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, 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, writeUnlock
-
Constructor Details
-
ToggleDocument
public ToggleDocument() -
ToggleDocument
-
-
Method Details
-
setAllowOtherCase
public void setAllowOtherCase(boolean b) -
getAllowOtherCase
public boolean getAllowOtherCase() -
setToggleValues
public void setToggleValues(char val1, char val2) set the keystrokes to toggle between -
setToggleKey
public void setToggleKey(char toggleKey) set the keystroke that toggles between the 2 values -
insertString
- Specified by:
insertStringin interfaceDocument- Overrides:
insertStringin classPlainDocument- Throws:
BadLocationException
-