diff options
author | Guilhem Lavaux <guilhem@kaffe.org> | 2006-08-14 09:40:47 +0000 |
---|---|---|
committer | Guilhem Lavaux <guilhem@kaffe.org> | 2006-08-14 09:40:47 +0000 |
commit | 310be467f8f83b189b4a40faece32478fad67bc9 (patch) | |
tree | 777d0c539432a12c86f450e8d3bf90e8e5677f57 /java/awt/MenuComponent.java | |
parent | 8f2887fc8c74aae0d541cbd59ea36c37d420267d (diff) | |
download | classpath-310be467f8f83b189b4a40faece32478fad67bc9.tar.gz |
2006-08-14 Guilhem Lavaux <guilhem@kaffe.org>
* Merged HEAD as of 2006-08-14 0:00.
Diffstat (limited to 'java/awt/MenuComponent.java')
-rw-r--r-- | java/awt/MenuComponent.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/java/awt/MenuComponent.java b/java/awt/MenuComponent.java index 9bb875069..163092685 100644 --- a/java/awt/MenuComponent.java +++ b/java/awt/MenuComponent.java @@ -200,8 +200,22 @@ public abstract class MenuComponent implements Serializable */ public String getName() { + if (name == null && ! nameExplicitlySet) + name = generateName(); return name; } + + /** + * Subclasses should override this to return unique component names like + * "menuitem0". + * + * @return the generated name for this menu component + */ + String generateName() + { + // MenuComponent is abstract. + return null; + } /** * Sets the name of this component to the specified name. |