This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gui][PATCH] Fix Button naming
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Cc: Thomas Fitzsimmons <fitzsim at redhat dot com>
- Date: Tue, 15 Jun 2004 07:15:08 +0200
- Subject: Re: [gui][PATCH] Fix Button naming
- References: <1087263639.19543.6.camel@localhost.localdomain>
-----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-----