org.japura.gui.model
Class DoubleDocument

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

public class DoubleDocument
extends NumberDocument<java.lang.Double>

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
DoubleDocument()
           
DoubleDocument(java.util.Locale locale)
           
 
Method Summary
 double getMaxValue()
           
 double getMinValue()
           
 java.lang.Double getValue()
           
protected  boolean isAcceptableValue(java.lang.Number number)
           
 void setMaxValue(double maxValue)
           
 void setMinValue(double minValue)
           
 void setValue(double 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

DoubleDocument

public DoubleDocument()

DoubleDocument

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

getValue

public java.lang.Double getValue()

setValue

public void setValue(double value)

getMaxValue

public double getMaxValue()

setMaxValue

public void setMaxValue(double maxValue)

getMinValue

public double getMinValue()

setMinValue

public void setMinValue(double minValue)

isAcceptableValue

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