cutcommand.java
来自「开源(Open Source)项目JHotDraw的文档和源程序」· Java 代码 · 共 40 行
JAVA
40 行
/*
* @(#)CutCommand.java 5.2
*
*/
package CH.ifa.draw.standard;
import CH.ifa.draw.util.*;
import CH.ifa.draw.framework.*;
/**
* Delete the selection and move the selected figures to
* the clipboard.
* @see Clipboard
*/
public class CutCommand extends FigureTransferCommand {
/**
* Constructs a cut command.
* @param name the command name
* @param view the target view
*/
public CutCommand(String name, DrawingView view) {
super(name, view);
}
public void execute() {
copySelection();
deleteSelection();
fView.checkDamage();
}
public boolean isExecutable() {
return fView.selectionCount() > 0;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?