[Patchanim-commit] SF.net SVN: patchanim: [173] trunk/patchanim/src/com/mebigfatguy/patchanim/ gui/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2008-02-12 05:01:06
|
Revision: 173 http://patchanim.svn.sourceforge.net/patchanim/?rev=173&view=rev Author: dbrosius Date: 2008-02-11 21:01:11 -0800 (Mon, 11 Feb 2008) Log Message: ----------- javadoc Modified Paths: -------------- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/DoubleDocument.java Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/gui/DoubleDocument.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/DoubleDocument.java 2008-02-12 04:56:52 UTC (rev 172) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/gui/DoubleDocument.java 2008-02-12 05:01:11 UTC (rev 173) @@ -25,13 +25,22 @@ import javax.swing.text.BadLocationException; import javax.swing.text.PlainDocument; - +/** + * a text component document that enforces that only double values are entered + */ public class DoubleDocument extends PlainDocument { private static final long serialVersionUID = 2390424803444456428L; private static final Pattern DOUBLEPATTERN = Pattern.compile("-?[0-9]*(\\.[0-9]*)?"); + /** + * check input for only double valued characters + * + * @param offs the offset where insert occurs + * @param str the inserted text + * @param a the attributes for the inserted text + */ @Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { String start = getText(0, offs); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |