📄 itsukyu.java
字号:
/**
* 这个系统由一个视窗类Itsukyu、
* 一个可撤消的文字框UndoableTextArea、
* 抽象命令角色Command,
* 以及具体命令角色UndoCommand和RedoCommand组成。
*
*
* 本类为 : 视窗类的源代码
*/
package itsukyu;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class Itsukyu extends Frame
{
/**
* @link aggregation
*/
private static UndoableTextArea text ;
/**
* @link aggregation
*/
static ItsukyuQuotation panel;
public Itsukyu(String title)
{
super(title);
}
public static void main(String[] s)
{
// create an undoable text area
text = new UndoableTextArea("Your text here.");
// Create app panel
panel = new ItsukyuQuotation(text);
// Create a frame for app
Itsukyu frame = new Itsukyu("Itskyu talks on Zen");
// Add a window listener for window close events
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e) { System.exit(0);}
} );
// Add app panel to content pane
frame.add(panel);
// Set initial frame size and make visible
frame.setSize (300, 300);
frame.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -