[Patch]{gui] PasswordView

Michael Koch konqueror@gmx.de
Sun Dec 26 09:55:00 GMT 2004


Hi list,


I just commited the attached patch to add some javadocs to
javax.swing.text.PasswordView.


Michael


2004-12-24  Michael Koch  <konqueror@gmx.de>

	* javax/swing/text/PasswordView.java
	(drawEchoCharacter): Added javadoc.
	(drawSelectedText): Likewise.
	(drawUnselectedText): Likewise.

-------------- next part --------------
Index: javax/swing/text/PasswordView.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/PasswordView.java,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 PasswordView.java
--- javax/swing/text/PasswordView.java	22 Oct 2004 12:41:27 -0000	1.1.2.2
+++ javax/swing/text/PasswordView.java	24 Dec 2004 11:55:39 -0000
@@ -56,6 +56,16 @@
     super(elem);
   }
 
+  /**
+   * Draws one echo character at a given position.
+   *
+   * @param g the <code>Graphics</code> object to draw to
+   * @param x the x-position
+   * @param y the y-position
+   * @param ch the echo character
+   *
+   * @return the next x position right of the drawn character
+   */
   protected int drawEchoCharacter(Graphics g, int x, int y, char ch)
   {
     // Update font metrics.
@@ -79,6 +89,17 @@
     return ch;
   }
 
+  /**
+   * Draws selected text at a given position.
+   *
+   * @param g the <code>Graphics</code> object to draw to
+   * @param x the x-position
+   * @param y the y-position
+   * @param p0 the position of the first character to draw
+   * @param p1 the position of the first character not to draw
+   *
+   * @return the next x position right of the drawn character
+   */
   protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1)
     throws BadLocationException
   {
@@ -107,6 +128,17 @@
     return x + len * metrics.charWidth(ch);
   }
 
+  /**
+   * Draws unselected text at a given position.
+   *
+   * @param g the <code>Graphics</code> object to draw to
+   * @param x the x-position
+   * @param y the y-position
+   * @param p0 the position of the first character to draw
+   * @param p1 the position of the first character not to draw
+   *
+   * @return the next x position right of the drawn character
+   */
   protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
     throws BadLocationException
   {


More information about the Java-patches mailing list