[gui][PATCH] Fix Button naming
Michael Koch
konqueror@gmx.de
Tue Jun 15 08:19:00 GMT 2004
-----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-----
More information about the Java-patches
mailing list