Class Integer_Document

  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by HiRISE.HiCat.HiTList.Integer_Document
All Implemented Interfaces:
Serializable, Document

public class Integer_Document
extends PlainDocument

A PlainDocument that allows only those characters suitable for an integer number. These only include the ten digits 0123456789 plus the comma to allow lists of integers. All other characters are ignored and never become part of the Integer_Document's content. This class is a very minor modification to Number_Document

Rodney Heyd UA/PIRL
See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Field Summary
static String ID
          Class identification name with source code version and date.
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
          Creates a new Integer_Document using the PlainDocument's default content container.
Integer_Document(AbstractDocument.Content container)
          Creates a new Integer_Document using the specified container for the document's content.
Method Summary
 void insertString(int offset, String str, AttributeSet a)
          Inserts content into the document.
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


public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values
Constructor Detail


public Integer_Document()
Creates a new Integer_Document using the PlainDocument's default content container.

See Also:


public Integer_Document(AbstractDocument.Content container)
Creates a new Integer_Document using the specified container for the document's content.

container - the document's content container.
See Also:
Method Detail


public void insertString(int offset,
                         String str,
                         AttributeSet a)
                  throws BadLocationException
Inserts content into the document. Characters that are not allowed are not added.

Specified by:
insertString in interface Document
insertString in class PlainDocument
offset - the starting offset, at least 0.
str - the string to insert; null/empty strings are not inserted.
a - the attributes for the inserted content; this document does not use attributes.
See Also:
PlainDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet)


Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona