summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java')
-rw-r--r--libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java b/libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
index adb7008ca3f..2d1f6500862 100644
--- a/libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
+++ b/libjava/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
+import java.awt.ItemSelectable;
+import java.awt.event.ItemEvent;
import java.awt.CheckboxMenuItem;
import java.awt.peer.CheckboxMenuItemPeer;
import java.awt.peer.MenuItemPeer;
@@ -54,4 +56,15 @@ public class GtkCheckboxMenuItemPeer extends GtkMenuItemPeer
}
native public void setState (boolean t);
+
+ protected void postMenuActionEvent ()
+ {
+ CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
+ q().postEvent (new ItemEvent ((ItemSelectable)awtWidget,
+ ItemEvent.ITEM_STATE_CHANGED,
+ item.getActionCommand(),
+ item.getState() ? ItemEvent.DESELECTED : ItemEvent.SELECTED));
+
+ super.postMenuActionEvent();
+ }
}
OpenPOWER on IntegriCloud