8157320: The CheckboxMenuItem can not be selected
authorserb
Tue, 31 May 2016 18:31:29 +0300
changeset 39017 6a7eec343e5e
parent 39016 f52c1429ae85
child 39018 df734f00b30a
8157320: The CheckboxMenuItem can not be selected Reviewed-by: arapte, alexsch
jdk/src/java.desktop/unix/classes/sun/awt/X11/XCheckboxMenuItemPeer.java
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XCheckboxMenuItemPeer.java	Tue May 31 15:57:01 2016 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XCheckboxMenuItemPeer.java	Tue May 31 18:31:29 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,8 @@
 
 import sun.awt.AWTAccessor;
 
-class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPeer {
+final class XCheckboxMenuItemPeer extends XMenuItemPeer
+        implements CheckboxMenuItemPeer {
 
     /************************************************
      *
@@ -49,6 +50,7 @@
      ************************************************/
 
     //Prom CheckboxMenuItemtPeer
+    @Override
     public void setState(boolean t) {
         repaintIfShowing();
     }
@@ -72,8 +74,10 @@
     /**
      * Toggles state and generates ItemEvent
      */
-    void action(final long when) {
+    @Override
+    void action(long when, int modifiers) {
         XToolkit.executeOnEventHandlerThread((CheckboxMenuItem)getTarget(), new Runnable() {
+                @Override
                 public void run() {
                     doToggleState(when);
                 }