标签:rcp
RCP Editor 修改状态,Editor被修改后,在关闭Editor时提示用户保存的实现步骤。
1、Editor中声明
private boolean dirty;
@Override public boolean isDirty() { return dirty; }
public void setDirty(boolean dirty) { this.dirty = dirty; }
textEmail.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { if(!isDirty()){ setDirty(true); //设置修改状态 firePropertyChange(PROP_DIRTY);//窗口状态改变 } } });
RCP Editor 修改状态,布布扣,bubuko.com
标签:rcp
原文地址:http://blog.csdn.net/jaysuper/article/details/25203271