statuslabel.java
来自「ASCII图画分类: 图像处理 可以将鼠标画的图象转成ASCII的形式」· Java 代码 · 共 31 行
JAVA
31 行
package joeh.asciidraw;
import java.awt.*;
import java.applet.*;
import java.util.*;
import java.io.*;
//we extend label so that we can control the case that they click on us and send the
//focus back to the place that needs to receive typing events
public class StatusLabel extends Label {
AsciiDrawPanel adp;
public StatusLabel(String initMessage, AsciiDrawPanel p) {
super(initMessage);
adp = p;
}
public boolean handleEvent(Event evt)
{
switch(evt.id)
{
case Event.MOUSE_DOWN:
{
adp.requestFocus(); //give the focus back to the panel so that
//it can be typed to without first having to click the mouse there.
return true;
}
}
return true;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?