com.myjavaworld.gui
Class MPlainDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
com.myjavaworld.gui.MPlainDocument
- All Implemented Interfaces:
- Serializable, Document
- Direct Known Subclasses:
- SingleLineDocument
public class MPlainDocument
- extends PlainDocument
An extension of javax.swing.text.PlainDocument
.
- Version:
- 1.0
- Author:
- Sai Pullabhotla, psai [at] jMethods [dot] com
- See Also:
- Serialized Form
Constructor Summary |
MPlainDocument()
Created an instance of MPlainDocument . |
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 |
MPlainDocument
public MPlainDocument()
- Created an instance of
MPlainDocument
.
setMaximumLength
public void setMaximumLength(int maximumLength)
- Sets the maximum length of this document to the given
maximumLength
.
- Parameters:
maximumLength
- Maximum number of characters to allow
getMaximumLength
public int getMaximumLength()
- Returns the maximum length allowed by this document.
- Returns:
- maximum length
setCharacterCase
public void setCharacterCase(int characterCase)
- Sets the character case of this doocument to the given case.
- Parameters:
characterCase
- Character case to force on this document
getCharacterCase
public int getCharacterCase()
- Returns the current character case in use by this document.
- Returns:
- character case
insertString
public void insertString(int offset,
String str,
AttributeSet a)
throws BadLocationException
- Specified by:
insertString
in interface Document
- Overrides:
insertString
in class PlainDocument
- Throws:
BadLocationException
Copyright © 2000-2012 jMethods, Inc.. All Rights Reserved.