This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gui][PATCH] Fix Button naming


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Dienstag, 15. Juni 2004 03:40 schrieb Thomas Fitzsimmons:
> Hi,
>
> I committed this patch to java-gui-branch.  It gives each button
> object a unique name, as returned by Component.getName.
>
> Tom
>
> 2004-06-14  Thomas Fitzsimmons  <fitzsim@redhat.com>
>
> 	* java/awt/Button.java (next_button_number): New field.
> 	(paramString): Change output.
> 	(generateName): New method.
> 	(getUniqueLong): New method.

A little bit of nitpicking:

- -  return ("label=" + getLabel() + ",actionCommand=" + 
getActionCommand()
- -         + "," + super.paramString());
+  return getName () + "," + getX () + "," + getY () + ","
+    + getWidth () + "x" + getHeight () + ",label=" + getLabel ();

Our style is to wrap multiple lines into parens like this.

+  return (getName () + "," + getX () + "," + getY () + ","
+          + getWidth () + "x" + getHeight () + ",label=" + getLabel 
());


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAzoXiWSOgCCdjSDsRAlFxAJ9o6VOo95QW7G2fI0BJWgAtI0iLEACdFrRn
9bmvD0gI1ZxVUpOFG+8xJ+Y=
=Q7BK
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]