扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
在本页阅读全文(共7页)
1. /**
2.
3. * Sets the model that this button represents.
4.
5. * @param m the new <code>ButtonModel</code>
6.
7. * @see #getModel
8.
9. * @beaninfo
10.
11. * bound: true
12.
13. * description: Model that the Button uses.
14.
15. */
16.
17. public void setModel(ButtonModel newModel) {
18.
19.
20.
21. ButtonModel oldModel = getModel();
22.
23.
24.
25. if (oldModel != null) {
26.
27. oldModel.removeChangeListener(changeListener);
28.
29. oldModel.removeActionListener(actionListener);
30.
31. changeListener = null;
32.
33. actionListener = null;
34.
35. }
36.
37.
38.
39. model = newModel;
40.
41.
42.
43. if (newModel != null) {
44.
45. changeListener = createChangeListener();
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。