com.trassare.calculator.ui
Class LimitInput
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
com.trassare.calculator.ui.LimitInput
- All Implemented Interfaces:
- Serializable, Document
public class LimitInput
- extends PlainDocument
To further control keyboard input, this class is used to hi-jack certain key
commands and replace them with their associated data.
- Version:
- 27 October 2005
- Author:
- Samuel Trassare
- See Also:
- Serialized Form
|
Constructor Summary |
LimitInput(int inMaxLength)
Explicit constructor for objects of LimitInput. |
| Methods 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitInput
public LimitInput(int inMaxLength)
- Explicit constructor for objects of LimitInput.
- Parameters:
inMaxLength - the maximum allowable characters in this field.
insertString
public final void insertString(int offset,
String str,
AttributeSet a)
throws BadLocationException
- Overridden from PlainDocument. This is were character input gets replaced
with data.
- Specified by:
insertString in interface Document- Overrides:
insertString in class PlainDocument
- Parameters:
offset - the zero-based index of where to insert new textstr - the text to be inserteda - the attributes for the inserted content
- Throws:
BadLocationException - I don't know what this is.