Ontimize 5.2072EN

com.ontimize.gui.field.document
Class MaskDocument

java.lang.Object
  extended byjavax.swing.text.AbstractDocument
      extended byjavax.swing.text.PlainDocument
          extended bycom.ontimize.gui.field.document.MaskDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable
Direct Known Subclasses:
CIFDocument, NIFDocument

public class MaskDocument
extends javax.swing.text.PlainDocument

Symbols for mask:
'*' : any character
'#' : alphabetic characters
'A' : Capital alphabetic characters
'a' : Lower case characters
'0' : Numeric characters
'%' : Numeric character or Capital alphabetic character
A distinct character in a position of mask indicates that only will be allowed this character in that position.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes 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
protected  boolean exactMatch
           
protected  java.lang.String mask
           
 
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
MaskDocument(java.lang.String masc)
           
MaskDocument(java.lang.String masc, boolean exactMatch)
           
 
Method Summary
protected  boolean compareToMask(java.lang.String s)
           
 java.lang.String getValue()
           
 void insertString(int offset, java.lang.String stringValue, javax.swing.text.AttributeSet attributes)
           
protected  boolean isFixedChar(char c)
           
 boolean isRight()
           
 void setExactMatch(boolean exact)
           
 void setValue(java.lang.String stringValue, boolean forze)
           
 
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
 

Field Detail

mask

protected java.lang.String mask

exactMatch

protected boolean exactMatch
Constructor Detail

MaskDocument

public MaskDocument(java.lang.String masc)

MaskDocument

public MaskDocument(java.lang.String masc,
                    boolean exactMatch)
Method Detail

setExactMatch

public void setExactMatch(boolean exact)

getValue

public java.lang.String getValue()
                          throws java.lang.Exception
Throws:
java.lang.Exception

isFixedChar

protected boolean isFixedChar(char c)

setValue

public void setValue(java.lang.String stringValue,
                     boolean forze)
              throws java.lang.Exception
Throws:
java.lang.Exception

isRight

public boolean isRight()

compareToMask

protected boolean compareToMask(java.lang.String s)

insertString

public void insertString(int offset,
                         java.lang.String stringValue,
                         javax.swing.text.AttributeSet attributes)

Ontimize