📄 closableframe.java
字号:
/* * WebSPHINX web crawling toolkit * Copyright (C) 1998,1999 Carnegie Mellon University * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Library * General Public License as published by the Free Software * Foundation, version 2. * * WebSPHINX homepage: http://www.cs.cmu.edu/~rcm/websphinx/ */package websphinx.util;import java.awt.*;public class ClosableFrame extends Frame { boolean hideWhenClosed = false; public ClosableFrame () { super (); } public ClosableFrame (String title) { super (title); } public ClosableFrame (boolean hideWhenClosed) { this(); this.hideWhenClosed = hideWhenClosed; } public ClosableFrame (String title, boolean hideWhenClosed) { this (title); this.hideWhenClosed = hideWhenClosed; } public void close () { if (hideWhenClosed) hide (); else dispose (); } public boolean handleEvent (Event event) { if (event.id == Event.WINDOW_DESTROY) close (); else return super.handleEvent (event); return true; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -