⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htmlview.java

📁 sifi-0.1.6.tar.gz 出自http://www.ifi.unizh.ch/ikm/SINUS/firewall/ 一个linux的防火墙工具。
💻 JAVA
字号:
/* ----------------------------------------------------------------------   The SINUS Firewall -- a TCP/IP packet filter for Linux   Written within the SINUS project at the University of Zurich,   SWITCH, Telekurs Payserv AG, ETH Zurich.   originally based on the sf Firewall Software (C) 1996 by Robert   Muchsel and Roland Schmid.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   SINUS Firewall resources:   SINUS Homepage: http://www.ifi.unizh.ch/ikm/SINUS/   Firewall Homepage: http://www.ifi.unizh.ch/ikm/SINUS/firewall.html   Frequently asked questions: http://www.ifi.unizh.ch/ikm/SINUS/sf_faq.html   Mailing list for comments, questions, bug reports: firewall@ifi.unizh.ch   ----------------------------------------------------------------------  */package sfclasses;import java.awt.*;import java.awt.event.*;import java.net.URL;import java.net.MalformedURLException;import java.io.IOException;import com.sun.java.swing.*;	/**	 * This class displays a HTML document in a frame.	 * After construction the frame is displayed and the control	 * is given back to the invoking program.	 * @see TextView	 */public class HTMLView	extends Frame	implements ActionListener {	JEditorPane html;	MenuItem quit;	/**	 * Constructor	 * @param doc the URL where the document has to be loaded from	 */	public HTMLView(URL doc) {		try {			html = new JEditorPane(doc);		}		catch (Exception e) {			System.out.println("Excpetion in HTMLView"+e);		}		html.setEditable(false);		ScrollPane scroller = new ScrollPane();		scroller.setSize(600, 400);		scroller.add(html);		/*		JViewport vp = scroller.getViewport();		vp.add(html);		vp.setBackingStoreEnabled(true);		*/		MenuBar mbar = new MenuBar();		Menu file = new Menu("File", false);		quit = new MenuItem("Quit");		quit.addActionListener(this);		file.add(quit);		mbar.add(file);		setMenuBar(mbar);		setLayout(new BorderLayout());		add("Center", scroller);		pack();		setVisible(true);	} // HTMLView	public void actionPerformed(ActionEvent ae) {		Object source = ae.getSource();		if (source == quit) {			dispose();			return;		}		return;	} // actionPerformed	} // class HTMLView

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -