]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/load/OneCharDocument.java
Moved source into separate src directory due to popular request
[GpsPrune.git] / tim / prune / load / OneCharDocument.java
diff --git a/tim/prune/load/OneCharDocument.java b/tim/prune/load/OneCharDocument.java
deleted file mode 100644 (file)
index 9868984..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-package tim.prune.load;
-
-import javax.swing.text.AttributeSet;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.PlainDocument;
-
-/**
- * Document class to restrict text input to single character
- * for selection of custom delimiter
- */
-public class OneCharDocument extends PlainDocument
-{
-       public void insertString(int offs, String str, AttributeSet a)
-               throws BadLocationException
-       {
-               //This rejects the insertion if it would make
-               //the contents too long.
-               if ((getLength() + str.length()) <= 1)
-                       super.insertString(offs, str, a);
-       }
-}