java命名空间javax.swing.plaf.basic类basiclistui的类成员方法:
createpropertychangelistener定义及介绍
本文导语:
createpropertychangelistener
protected propertychangelistener createpropertychangelistener()
创建由 installui() 添加到 jlist 的 propertychangehandler 的实例。子类可以重写此方法以返回自定义 propertychangelistener,例如
class mylistui extends basiclistui {
protec...
createpropertychangelistener
protected propertychangelistener createpropertychangelistener()
- 创建由 installui() 添加到 jlist 的 propertychangehandler 的实例。子类可以重写此方法以返回自定义 propertychangelistener,例如
class mylistui extends basiclistui {
protected propertychangelistener createpropertychangelistener() {
return new mypropertychangelistener();
}
public class mypropertychangelistener extends propertychangehandler {
public void propertychange(propertychangeevent e) {
if (e.getpropertyname().equals("model")) {
// do some extra work when the model changes
}
super.propertychange(e);
}
}
}
- 另请参见:
propertychangelistener
,
installui(javax.swing.jcomponent)