com.threerings.opengl.gui.text
Class IntegerDocument
java.lang.Object
com.threerings.opengl.gui.text.Document
com.threerings.opengl.gui.text.IntegerDocument
public class IntegerDocument
- extends Document
A document for use with a TextField that allows only integer
numeric input. Note: to allow fully valid values to be entered one
character at a time, partially valid values (like the string '-' at position
zero) must be allowed. Thus one cannot rely on the integer document only
ever containing valid integers.
|
Constructor Summary |
IntegerDocument()
Creates a new document that allows any integer value. |
IntegerDocument(boolean positive)
Creates a new integer document. |
| Methods inherited from class com.threerings.opengl.gui.text.Document |
addListener, addUndoableEditListener, getLength, getText, getText, getWordExtents, indexOfWordEnd, insert, lastIndexOfWordStart, remove, removeListener, removeUndoableEditListener, replace, setText |
IntegerDocument
public IntegerDocument()
- Creates a new document that allows any integer value.
IntegerDocument
public IntegerDocument(boolean positive)
- Creates a new integer document.
- Parameters:
positive - if true, only accept positive values
Copyright © 2011. All Rights Reserved.