ElegantJCharts Java API Specification v2.0

com.elegantj.data.dataviewer
Class NumericDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.PlainDocument
              |
              +--com.elegantj.data.dataviewer.NumericDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable

public class NumericDocument
extends javax.swing.text.PlainDocument

NumericDocument class is used to validate the text as numeric value

See Also:
Serialized Form

Field Summary
 
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
NumericDocument()
          Creates a NumericDocument
NumericDocument(boolean allowDot)
          Creates a NumericDocument with specified permission to allow dot or not
NumericDocument(boolean allowDot, boolean allowMinus, int digitBeforeDot, int digitAfterDot)
          Creates a NumericDocument with specified permission to allow dot or not
NumericDocument(boolean allowDot, int digitBeforeDot)
          Creates a NumericDocument with specified permission to allow dot or not
NumericDocument(boolean allowDot, int digitBeforeDot, int digitAfterDot)
          Creates a NumericDocument with specified permission to allow dot or not
 
Method Summary
 void insertString(int offs, java.lang.String text, javax.swing.text.AttributeSet a)
           
 
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

NumericDocument

public NumericDocument()
Creates a NumericDocument


NumericDocument

public NumericDocument(boolean allowDot)
Creates a NumericDocument with specified permission to allow dot or not


NumericDocument

public NumericDocument(boolean allowDot,
                       int digitBeforeDot)
Creates a NumericDocument with specified permission to allow dot or not

Parameters:
allowDot - the boolean for allow Dot in Document
digitBeforeDot - the Number of digit before Dot (Default is 0, means no restriction on Number entered) This property is only consider, when allowDot is true

NumericDocument

public NumericDocument(boolean allowDot,
                       int digitBeforeDot,
                       int digitAfterDot)
Creates a NumericDocument with specified permission to allow dot or not

Parameters:
allowDot - the boolean for allow Dot in Document
digitBeforeDot - the Number of digit before Dot (Default is 0, means no restriction on Number entered) This property is only consider, when allowDot is true
digitAfterDot - the Number of digit after Dot (Default is 0, means no restriction on Number entered) This property is only consider, when allowDot is true

NumericDocument

public NumericDocument(boolean allowDot,
                       boolean allowMinus,
                       int digitBeforeDot,
                       int digitAfterDot)
Creates a NumericDocument with specified permission to allow dot or not

Parameters:
allowDot - the boolean for allow Dot in Document
allowMinus - the boolean for allow Minus sign in Document
digitBeforeDot - the Number of digit before Dot (Default is 0, means no restriction on Number entered) This property is only consider, when allowDot is true
digitAfterDot - the Number of digit after Dot (Default is 0, means no restriction on Number entered) This property is only consider, when allowDot is true
Method Detail

insertString

public void insertString(int offs,
                         java.lang.String text,
                         javax.swing.text.AttributeSet a)
                  throws javax.swing.text.BadLocationException
Specified by:
insertString in interface javax.swing.text.Document
Overrides:
insertString in class javax.swing.text.PlainDocument
javax.swing.text.BadLocationException

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.