From 97b8365cafc3a344a22d3980b8ed885f5c6d8357 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 9 Jan 2007 19:58:05 +0000 Subject: Merged gcj-eclipse branch to trunk. From-SVN: r120621 --- libjava/classpath/javax/swing/JMenuBar.java | 33 +++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'libjava/classpath/javax/swing/JMenuBar.java') diff --git a/libjava/classpath/javax/swing/JMenuBar.java b/libjava/classpath/javax/swing/JMenuBar.java index 35f1293..73b409e 100644 --- a/libjava/classpath/javax/swing/JMenuBar.java +++ b/libjava/classpath/javax/swing/JMenuBar.java @@ -298,19 +298,25 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement } /** - * DOCUMENT ME! + * This method is not implemented and will throw an {@link Error} if called. * - * @return DOCUMENT ME! + * @return This method never returns anything, it throws an exception. */ public JMenu getHelpMenu() { - return null; + // the following error matches the behaviour of the reference + // implementation... + throw new Error("getHelpMenu() is not implemented"); } /** - * Returns margin betweeen menu bar's border and its menues + * Returns the margin between the menu bar's border and its menus. If the + * margin is null, this method returns + * new Insets(0, 0, 0, 0). * - * @return margin between menu bar's border and its menues + * @return The margin (never null). + * + * @see #setMargin(Insets) */ public Insets getMargin() { @@ -617,21 +623,20 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement } /** - * Sets the menu bar's "margin" bound property, which represents - * distance between the menubar's border and its menus. - * icon. When marging property is modified, PropertyChangeEvent will - * be fired to menuBar's PropertyChangeListener's. - * - * @param m distance between the menubar's border and its menus. + * Sets the margin between the menu bar's border and its menus (this is a + * bound property with the name 'margin'). * + * @param m the margin (null permitted). + * + * @see #getMargin() */ public void setMargin(Insets m) { if (m != margin) { - Insets oldMargin = margin; - margin = m; - firePropertyChange("margin", oldMargin, margin); + Insets oldMargin = margin; + margin = m; + firePropertyChange("margin", oldMargin, margin); } } -- cgit v1.1