equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
130 } |
130 } |
131 |
131 |
132 @Override |
132 @Override |
133 public void setState(final boolean state) { |
133 public void setState(final boolean state) { |
134 synchronized (getDelegateLock()) { |
134 synchronized (getDelegateLock()) { |
|
135 getDelegate().getCurrentButton().removeItemListener(this); |
135 getDelegate().setSelected(state); |
136 getDelegate().setSelected(state); |
|
137 getDelegate().getCurrentButton().addItemListener(this); |
136 } |
138 } |
137 repaintPeer(); |
139 repaintPeer(); |
138 } |
140 } |
139 |
141 |
140 @Override |
142 @Override |