62,614
社区成员
发帖
与我相关
我的任务
分享
class TooltipLabel extends Label {
Map<String, Object> properties = new HashMap<String, Object>();
public TooltopLabel(String name) {super(name);}
public void addProperty(String name, Object value) { //为了通用,可以采用Map的方式添加删除属性
...
}
...
protected void onFocus() { //缺省事件的实现
...
}
protected void onUnFocus() {
...
}
}
//生成实例
Label label = new TooltipLabel("createonelabel");
public interface FocusEvent{
public void onFocus();
public void onUnFocus();
...
}
public class BaseImpl implements FocusEvent{
public void onFocus() {
}
public void onUnFocus() {
}
}