File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
sources/net.sf.j2s.java.core/src Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1760,8 +1760,11 @@ public void setModel(ButtonModel newModel) {
17601760 }
17611761
17621762 model = newModel ;
1763-
17641763 if (newModel != null ) {
1764+ /** @j2sNative
1765+ * this.model.isAWT$ = !!this.isAWT$
1766+ */
1767+
17651768 changeListener = createChangeListener ();
17661769 actionListener = createActionListener ();
17671770 itemListener = createItemListener ();
Original file line number Diff line number Diff line change 11package swingjs .a2s ;
22
3+ import javax .swing .DefaultButtonModel ;
34import javax .swing .JCheckBoxMenuItem ;
45
6+ import swingjs .plaf .JSCheckBoxUI ;
7+
58public class CheckboxMenuItem extends JCheckBoxMenuItem {
69
710 public void isAWT () {}
@@ -24,10 +27,10 @@ public boolean getState() {
2427
2528
2629 @ Override
27- public void setState (boolean tf ) {
28- setSelected ( tf );
29- }
30-
31-
30+ public void setState (boolean b ) {
31+ if ((( DefaultButtonModel ) model ). setStateNoFire ( b ))
32+ (( JSCheckBoxUI ) ( Object ) getUI ()). updateDOMNode ();
33+ }
34+
3235
3336}
You can’t perform that action at this time.
0 commit comments