diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2005-01-14 10:24:02 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2005-01-14 10:24:02 +0000 |
commit | c61f399b1d3c471a8e459a4a2be645f95560f088 (patch) | |
tree | 14e7f5759d2cded647d22e019435a770b8ed69e5 /javax/swing/JPopupMenu.java | |
parent | 451c55a31fbc6b949f7609dd90932bb2a0d91a19 (diff) | |
download | classpath-c61f399b1d3c471a8e459a4a2be645f95560f088.tar.gz |
2005-01-14 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of September 2004 HEAD patches to generics branch.
Diffstat (limited to 'javax/swing/JPopupMenu.java')
-rw-r--r-- | javax/swing/JPopupMenu.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/javax/swing/JPopupMenu.java b/javax/swing/JPopupMenu.java index 724c3a2b4..3a51a9498 100644 --- a/javax/swing/JPopupMenu.java +++ b/javax/swing/JPopupMenu.java @@ -144,6 +144,9 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement /* Location of the popup */ private Point popupLocation; + /* Field indicating if popup menu is visible or not */ + private boolean visible = false; + /* Bound Property indicating visibility of the popup menu*/ public static final String VISIBLE_CHANGED_PROPERTY = "visible"; @@ -564,7 +567,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement */ public boolean isVisible() { - return super.isVisible(); + return visible; } /** @@ -577,7 +580,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement public void setVisible(boolean visible) { boolean old = isVisible(); - super.setVisible(visible); + this.visible = visible; if (old != isVisible()) { firePropertyChange(VISIBLE_CHANGED_PROPERTY, old, (boolean) isVisible()); @@ -615,7 +618,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement .getLayeredPane(); Point p = new Point(popupLocation.x, popupLocation.y); SwingUtilities.convertPointFromScreen(p, layeredPane); - popup.show(p.x, p.y, size.width, size.height); + popup.show(p.x, p.y, size.width, size.height); } else { |