org.japura.gui.model
Class IntegerDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by org.japura.gui.model.NumberDocument<java.lang.Integer>
              extended by org.japura.gui.model.IntegerDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document

public class IntegerDocument
extends NumberDocument<java.lang.Integer>

Copyright (C) 2010-2011 Carlos Eduardo Leite de Andrade

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see www.gnu.org/licenses/

For more information, contact: www.japura.org

Author:
Carlos Eduardo Leite de Andrade
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
 
Fields inherited from class org.japura.gui.model.NumberDocument
maxValue, minValue
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
IntegerDocument()
           
IntegerDocument(java.util.Locale locale)
           
 
Method Summary
 int getMaxValue()
           
 int getMinValue()
           
 java.lang.Integer getValue()
           
protected  boolean isAcceptableValue(java.lang.Number number)
           
 void setMaxValue(int maxValue)
           
 void setMinValue(int minValue)
           
 void setValue(int value)
           
 
Methods inherited from class org.japura.gui.model.NumberDocument
format, getNumberFormat, getText, getValidateRegex, insertString, parse
 
Methods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
 
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
 

Constructor Detail

IntegerDocument

public IntegerDocument()

IntegerDocument

public IntegerDocument(java.util.Locale locale)
Method Detail

getValue

public java.lang.Integer getValue()

setValue

public void setValue(int value)

getMaxValue

public int getMaxValue()

setMaxValue

public void setMaxValue(int maxValue)

getMinValue

public int getMinValue()

setMinValue

public void setMinValue(int minValue)

isAcceptableValue

protected boolean isAcceptableValue(java.lang.Number number)
Specified by:
isAcceptableValue in class NumberDocument<java.lang.Integer>