to.tetramorph.starbase.formatter
クラス LimitedDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
to.tetramorph.starbase.formatter.LimitedDocument
- すべての実装されたインタフェース:
- Serializable, Document
public class LimitedDocument
- extends PlainDocument
テキストフィールドの入力文字数に制限をかけるためのもの。
textfield.setDocument( new LimitedDocument( 10 ) );
などとして使う。
- 関連項目:
JTextField
,
直列化された形式
クラス 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 |
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitedDocument
public LimitedDocument(int limit)
- 指定された文字数でオブジェクトを作成する。これをセットされたJTextFieldは、
入力文字数に制限がかかる。
- 関連項目:
JTextField
insertString
public void insertString(int offset,
String str,
AttributeSet a)
- プログラマがこのメソッドを呼び出す必要は無い。
- 定義:
- インタフェース
Document
内の insertString
- オーバーライド:
- クラス
PlainDocument
内の insertString