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