?? assoicatorundoableedit.java
字號(hào):
package com.sunking.tp.undoredo;
import javax.swing.undo.*;
import com.sunking.tp.framework.*;
/**
* <p>Title: AssoicatorUndoableEdit</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author <a href="mailto:sunkingxie@hotmail.com">SunKing</a>
* @version 1.0
*/
public class AssoicatorUndoableEdit extends AbstractUndoableEdit {
AssoicatorLine line;
Desktop desk;
public AssoicatorUndoableEdit(Desktop desk, AssoicatorLine line) {
this.line = line;
this.desk = desk;
}
public String getUndoPresentationName() {
return com.sunking.tp.util.JTPUtil.getString("Undo_Associate");
}
public String getRedoPresentationName() {
return com.sunking.tp.util.JTPUtil.getString("Redo_Associate");
}
public void undo() throws CannotUndoException {
super.undo();
line.getSource().removeAssociator(line.getDest());
desk.fireAssoicatorChanged();
}
public void redo() throws CannotRedoException {
super.redo();
line.getSource().addAssociator(line.getDest(),line.getAssociateType());
desk.fireAssoicatorChanged();
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -