diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-07-16 21:51:51 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-07-16 21:51:51 +0000 |
commit | 70d3ca5f03432c9893f4231b9037138e2c5f79d4 (patch) | |
tree | 8f67b77f9ca1944a0946a513046b6a78b7620c30 /java/awt/MenuBar.java | |
parent | 2191b1e9ed92cdbb924b5adb5be121a018eea109 (diff) | |
download | classpath-70d3ca5f03432c9893f4231b9037138e2c5f79d4.tar.gz |
2006-07-16 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD --> generics-branch for
2006/07/09 to 2006/07/16.
Diffstat (limited to 'java/awt/MenuBar.java')
-rw-r--r-- | java/awt/MenuBar.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/java/awt/MenuBar.java b/java/awt/MenuBar.java index 3cf708cd5..6737d0419 100644 --- a/java/awt/MenuBar.java +++ b/java/awt/MenuBar.java @@ -60,10 +60,15 @@ public class MenuBar extends MenuComponent implements MenuContainer, Serializable, Accessible { -//Serialization Constant + // Serialization Constant private static final long serialVersionUID = -4930327919388951260L; /** + * The number used to generate the name returned by getName. + */ + private static transient long next_menubar_number; + + /** * @serial The menu used for providing help information */ private Menu helpMenu; @@ -331,6 +336,21 @@ public class MenuBar extends MenuComponent accessibleContext = new AccessibleAWTMenuBar(); return accessibleContext; } + + /** + * Generate a unique name for this <code>MenuBar</code>. + * + * @return A unique name for this <code>MenuBar</code>. + */ + String generateName() + { + return "menubar" + getUniqueLong(); + } + + private static synchronized long getUniqueLong() + { + return next_menubar_number++; + } /** * This class provides accessibility support for AWT menu bars. |