亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? notepad.java

?? 一個小公司要求給寫的很簡單的任務管理系統。
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * @(#)Notepad.java	1.31 05/11/17 *  * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: *  * -Redistribution of source code must retain the above copyright notice, this *  list of conditions and the following disclaimer. *  * -Redistribution in binary form must reproduce the above copyright notice,  *  this list of conditions and the following disclaimer in the documentation *  and/or other materials provided with the distribution. *  * Neither the name of Sun Microsystems, Inc. or the names of contributors may  * be used to endorse or promote products derived from this software without  * specific prior written permission. *  * This software is provided "AS IS," without a warranty of any kind. ALL  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE * AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST  * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,  * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY  * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,  * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. *  * You acknowledge that this software is not designed, licensed or intended * for use in the design, construction, operation or maintenance of any * nuclear facility. *//* * @(#)Notepad.java	1.31 05/11/17 */import java.awt.*;import java.awt.event.*;import java.beans.*;import java.io.*;import java.net.URL;import java.util.*;import javax.swing.text.*;import javax.swing.undo.*;import javax.swing.event.*;import javax.swing.*;/** * Sample application using the simple text editor component that * supports only one font. * * @author  Timothy Prinzing * @version 1.31 11/17/05  */class Notepad extends JPanel {    private static ResourceBundle resources;    private final static String EXIT_AFTER_PAINT = new String("-exit");    private static boolean exitAfterFirstPaint;    static {        try {            resources = ResourceBundle.getBundle("resources.Notepad",                                                  Locale.getDefault());        } catch (MissingResourceException mre) {            System.err.println("resources/Notepad.properties not found");            System.exit(1);        }    }    public void paintChildren(Graphics g) {        super.paintChildren(g);        if (exitAfterFirstPaint) {            System.exit(0);        }    }    Notepad() {	super(true);	// Force SwingSet to come up in the Cross Platform L&F	try {	    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());	    // If you want the System L&F instead, comment out the above line and	    // uncomment the following:	    // UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());	} catch (Exception exc) {	    System.err.println("Error loading L&F: " + exc);	}	setBorder(BorderFactory.createEtchedBorder());	setLayout(new BorderLayout());	// create the embedded JTextComponent	editor = createEditor();	// Add this as a listener for undoable edits.	editor.getDocument().addUndoableEditListener(undoHandler);	// install the command table	commands = new Hashtable();	Action[] actions = getActions();	for (int i = 0; i < actions.length; i++) {	    Action a = actions[i];	    //commands.put(a.getText(Action.NAME), a);	    commands.put(a.getValue(Action.NAME), a);	}		JScrollPane scroller = new JScrollPane();	JViewport port = scroller.getViewport();	port.add(editor);	try {	    String vpFlag = resources.getString("ViewportBackingStore");	    Boolean bs = Boolean.valueOf(vpFlag);	    port.setBackingStoreEnabled(bs.booleanValue());	} catch (MissingResourceException mre) {	    // just use the viewport default	}	menuItems = new Hashtable();	JPanel panel = new JPanel();	panel.setLayout(new BorderLayout());		panel.add("North",createToolbar());	panel.add("Center", scroller);	add("Center", panel);	add("South", createStatusbar());    }    public static void main(String[] args) {        try {        String vers = System.getProperty("java.version");        if (vers.compareTo("1.1.2") < 0) {            System.out.println("!!!WARNING: Swing must be run with a " +                               "1.1.2 or higher version VM!!!");        }        if (args.length > 0 && args[0].equals(EXIT_AFTER_PAINT)) {            exitAfterFirstPaint = true;        }        JFrame frame = new JFrame();        frame.setTitle(resources.getString("Title"));	frame.setBackground(Color.lightGray);	frame.getContentPane().setLayout(new BorderLayout());        Notepad notepad = new Notepad();	frame.getContentPane().add("Center", notepad);        frame.setJMenuBar(notepad.createMenubar());	frame.addWindowListener(new AppCloser());	frame.pack();	frame.setSize(500, 600);        frame.show();        } catch (Throwable t) {            System.out.println("uncaught exception: " + t);            t.printStackTrace();        }    }    /**     * Fetch the list of actions supported by this     * editor.  It is implemented to return the list     * of actions supported by the embedded JTextComponent     * augmented with the actions defined locally.     */    public Action[] getActions() {	return TextAction.augmentList(editor.getActions(), defaultActions);    }    /**     * Create an editor to represent the given document.       */    protected JTextComponent createEditor() {	JTextComponent c = new JTextArea();	c.setDragEnabled(true);	c.setFont(new Font("monospaced", Font.PLAIN, 12));	return c;    }    /**      * Fetch the editor contained in this panel     */    protected JTextComponent getEditor() {	return editor;    }    /**     * To shutdown when run as an application.  This is a     * fairly lame implementation.   A more self-respecting     * implementation would at least check to see if a save     * was needed.     */    protected static final class AppCloser extends WindowAdapter {        public void windowClosing(WindowEvent e) {	    System.exit(0);	}    }    /**     * Find the hosting frame, for the file-chooser dialog.     */    protected Frame getFrame() {	for (Container p = getParent(); p != null; p = p.getParent()) {	    if (p instanceof Frame) {		return (Frame) p;	    }	}	return null;    }    /**     * This is the hook through which all menu items are     * created.  It registers the result with the menuitem     * hashtable so that it can be fetched with getMenuItem().     * @see #getMenuItem     */    protected JMenuItem createMenuItem(String cmd) {	JMenuItem mi = new JMenuItem(getResourceString(cmd + labelSuffix));        URL url = getResource(cmd + imageSuffix);	if (url != null) {	    mi.setHorizontalTextPosition(JButton.RIGHT);	    mi.setIcon(new ImageIcon(url));	}	String astr = getResourceString(cmd + actionSuffix);	if (astr == null) {	    astr = cmd;	}	mi.setActionCommand(astr);	Action a = getAction(astr);	if (a != null) {	    mi.addActionListener(a);	    a.addPropertyChangeListener(createActionChangeListener(mi));	    mi.setEnabled(a.isEnabled());	} else {	    mi.setEnabled(false);	}	menuItems.put(cmd, mi);	return mi;    }    /**     * Fetch the menu item that was created for the given     * command.     * @param cmd  Name of the action.     * @returns item created for the given command or null     *  if one wasn't created.     */    protected JMenuItem getMenuItem(String cmd) {	return (JMenuItem) menuItems.get(cmd);    }    protected Action getAction(String cmd) {	return (Action) commands.get(cmd);    }    protected String getResourceString(String nm) {	String str;	try {	    str = resources.getString(nm);	} catch (MissingResourceException mre) {	    str = null;	}	return str;    }    protected URL getResource(String key) {	String name = getResourceString(key);	if (name != null) {	    URL url = this.getClass().getResource(name);	    return url;	}	return null;    }    protected Container getToolbar() {	return toolbar;    }    protected JMenuBar getMenubar() {	return menubar;    }    /**     * Create a status bar     */    protected Component createStatusbar() {	// need to do something reasonable here	status = new StatusBar();	return status;    }    /**     * Resets the undo manager.     */    protected void resetUndoManager() {	undo.discardAllEdits();	undoAction.update();	redoAction.update();    }    /**     * Create the toolbar.  By default this reads the      * resource file for the definition of the toolbar.     */    private Component createToolbar() {	toolbar = new JToolBar();	String[] toolKeys = tokenize(getResourceString("toolbar"));	for (int i = 0; i < toolKeys.length; i++) {	    if (toolKeys[i].equals("-")) {		toolbar.add(Box.createHorizontalStrut(5));	    } else {		toolbar.add(createTool(toolKeys[i]));	    }	}	toolbar.add(Box.createHorizontalGlue());	return toolbar;    }    /**     * Hook through which every toolbar item is created.     */    protected Component createTool(String key) {	return createToolbarButton(key);    }    /**     * Create a button to go inside of the toolbar.  By default this     * will load an image resource.  The image filename is relative to     * the classpath (including the '.' directory if its a part of the     * classpath), and may either be in a JAR file or a separate file.     *      * @param key The key in the resource file to serve as the basis     *  of lookups.     */    protected JButton createToolbarButton(String key) {	URL url = getResource(key + imageSuffix);        JButton b = new JButton(new ImageIcon(url)) {            public float getAlignmentY() { return 0.5f; }	};        b.setRequestFocusEnabled(false);        b.setMargin(new Insets(1,1,1,1));	String astr = getResourceString(key + actionSuffix);	if (astr == null) {	    astr = key;	}	Action a = getAction(astr);	if (a != null) {	    b.setActionCommand(astr);	    b.addActionListener(a);	} else {	    b.setEnabled(false);	}	String tip = getResourceString(key + tipSuffix);	if (tip != null) {	    b.setToolTipText(tip);	}         return b;    }    /**     * Take the given string and chop it up into a series     * of strings on whitespace boundaries.  This is useful     * for trying to get an array of strings out of the     * resource file.     */    protected String[] tokenize(String input) {	Vector v = new Vector();	StringTokenizer t = new StringTokenizer(input);	String cmd[];	while (t.hasMoreTokens())	    v.addElement(t.nextToken());	cmd = new String[v.size()];	for (int i = 0; i < cmd.length; i++)	    cmd[i] = (String) v.elementAt(i);	return cmd;    }    /**     * Create the menubar for the app.  By default this pulls the     * definition of the menu from the associated resource file.      */    protected JMenuBar createMenubar() {	JMenuItem mi;	JMenuBar mb = new JMenuBar();	String[] menuKeys = tokenize(getResourceString("menubar"));	for (int i = 0; i < menuKeys.length; i++) {	    JMenu m = createMenu(menuKeys[i]);	    if (m != null) {		mb.add(m);	    }	}        this.menubar = mb;	return mb;    }    /**     * Create a menu for the app.  By default this pulls the     * definition of the menu from the associated resource file.     */    protected JMenu createMenu(String key) {	String[] itemKeys = tokenize(getResourceString(key));	JMenu menu = new JMenu(getResourceString(key + "Label"));	for (int i = 0; i < itemKeys.length; i++) {	    if (itemKeys[i].equals("-")) {		menu.addSeparator();	    } else {		JMenuItem mi = createMenuItem(itemKeys[i]);		menu.add(mi);	    }	}	return menu;    }    // Yarked from JMenu, ideally this would be public.    protected PropertyChangeListener createActionChangeListener(JMenuItem b) {	return new ActionChangedListener(b);    }    // Yarked from JMenu, ideally this would be public.    private class ActionChangedListener implements PropertyChangeListener {        JMenuItem menuItem;                ActionChangedListener(JMenuItem mi) {            super();            this.menuItem = mi;        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久91精品国产一区二区三区| 亚洲大片精品永久免费| 亚洲欧美日韩国产一区二区三区| 亚洲福利一二三区| 成人成人成人在线视频| 69堂国产成人免费视频| 亚洲丝袜制服诱惑| 国产原创一区二区| 日韩免费视频一区二区| 亚洲精品国产a久久久久久| 高清视频一区二区| 欧美成人猛片aaaaaaa| 视频一区中文字幕国产| 91免费看视频| 中文字幕亚洲欧美在线不卡| 国内精品不卡在线| 日韩欧美一区二区视频| 午夜精品在线看| 色婷婷国产精品| |精品福利一区二区三区| 高清不卡在线观看| 国产人久久人人人人爽| 麻豆一区二区三| 日韩女同互慰一区二区| 另类小说综合欧美亚洲| 欧美一区二区三区免费| 丝袜美腿一区二区三区| 欧美日韩精品一区二区在线播放| 亚洲乱码国产乱码精品精可以看 | 色婷婷综合五月| 亚洲国产电影在线观看| 国产v综合v亚洲欧| 中文字幕欧美三区| k8久久久一区二区三区| 中文字幕不卡在线播放| 成人av影院在线| 亚洲欧洲美洲综合色网| 99国产精品久久久久久久久久| 国产欧美久久久精品影院| 国产福利精品导航| 国产精品麻豆欧美日韩ww| 91亚洲精品乱码久久久久久蜜桃| 一区二区中文字幕在线| 在线免费观看日本一区| 亚洲1区2区3区4区| 欧美xxxxx裸体时装秀| 国产精品系列在线观看| 国产精品久99| 精品视频一区三区九区| 蜜臀国产一区二区三区在线播放| 精品国产一区二区三区久久久蜜月 | 欧美性猛交xxxxxxxx| 亚洲va天堂va国产va久| 精品欧美黑人一区二区三区| 国产美女视频91| 亚洲欧美日韩在线不卡| 欧美一区二区三区喷汁尤物| 精品一区二区免费视频| 欧美经典三级视频一区二区三区| 99久久亚洲一区二区三区青草| 亚洲女人的天堂| 日韩欧美一级在线播放| 国产激情一区二区三区四区| 综合色中文字幕| 欧美电影影音先锋| 国产精品一区二区三区乱码| 一区二区免费在线播放| 91精品国产91久久久久久最新毛片 | 精品国产乱码久久久久久久久| 国产成人免费视| 一区二区三区色| 久久网这里都是精品| 在线亚洲高清视频| 国产很黄免费观看久久| 亚洲国产日韩a在线播放| 久久久久久综合| 91成人免费在线| 国产一区二区在线观看视频| 一区二区三区四区蜜桃| 久久天堂av综合合色蜜桃网| 欧美三级在线看| av在线综合网| 国产精品白丝jk白祙喷水网站| 一区二区三区成人| 国产区在线观看成人精品 | 亚洲成人福利片| 国产精品全国免费观看高清| 欧美高清dvd| 91麻豆产精品久久久久久| 韩国视频一区二区| 日韩中文字幕不卡| 一区二区三区视频在线观看| 国产精品免费人成网站| 欧美xfplay| 欧美一卡二卡三卡| 欧美亚州韩日在线看免费版国语版| 九九九精品视频| 丝袜脚交一区二区| 亚洲欧洲综合另类| 国产精品第一页第二页第三页| 欧美大片拔萝卜| 51精品视频一区二区三区| 91麻豆成人久久精品二区三区| 成人综合在线视频| 国产成人av电影免费在线观看| 蜜臀久久99精品久久久久宅男| 亚洲国产视频在线| 亚洲一区二区在线免费看| 国产精品理伦片| 欧美国产精品一区二区三区| 久久女同互慰一区二区三区| 日韩精品一区二| 精品欧美黑人一区二区三区| 精品国内片67194| 日韩精品一区二区三区在线| 日韩一区二区精品| 欧美一区二区女人| 精品乱人伦一区二区三区| 日韩片之四级片| 精品国产123| 性做久久久久久免费观看| 一区二区三区在线免费播放| 亚洲视频免费在线| 一区二区三区在线视频播放| 亚洲欧美一区二区不卡| 亚洲免费高清视频在线| 亚洲自拍偷拍欧美| 三级成人在线视频| 麻豆精品视频在线观看免费 | 亚洲国产视频一区二区| 日韩黄色免费网站| 精品一区二区三区免费毛片爱| 国产毛片精品一区| 99国内精品久久| 欧美丝袜自拍制服另类| 日韩欧美国产精品一区| ww亚洲ww在线观看国产| 国产精品的网站| 亚洲国产一区二区视频| 精品一区二区在线播放| 成人影视亚洲图片在线| 在线视频一区二区免费| 日韩免费看网站| ...av二区三区久久精品| 午夜欧美大尺度福利影院在线看 | 午夜私人影院久久久久| 久久爱www久久做| 91亚洲精品一区二区乱码| 538prom精品视频线放| 欧美国产成人在线| 亚洲伊人伊色伊影伊综合网| 欧美aaa在线| 成人app下载| 日韩写真欧美这视频| 亚洲国产精品t66y| 日韩av电影免费观看高清完整版 | 欧美日韩午夜在线| 精品国产免费人成在线观看| 亚洲天堂免费看| 久久精品国产亚洲a| 色综合久久久久综合体| 日韩一级二级三级精品视频| 中文字幕亚洲一区二区va在线| 日本成人在线看| 91片黄在线观看| 久久久亚洲综合| 午夜视频一区在线观看| 北条麻妃一区二区三区| 777xxx欧美| 亚洲老妇xxxxxx| 国产成人免费在线视频| 7777精品伊人久久久大香线蕉| 亚洲手机成人高清视频| 国内成人免费视频| 日韩视频在线观看一区二区| 亚洲综合精品自拍| 99久久99精品久久久久久| 精品999久久久| 免费欧美在线视频| 在线亚洲欧美专区二区| 国产精品电影一区二区三区| 国产精品一区二区x88av| 91精品国产91久久久久久最新毛片| 一区二区三区日韩欧美| aaa国产一区| 国产精品私人影院| 国产电影精品久久禁18| 26uuu另类欧美| 精品一区二区三区欧美| 日韩久久一区二区| 国产成人精品免费| 久久久久久麻豆| 精品亚洲欧美一区| 久久亚洲一区二区三区明星换脸| 免费人成在线不卡| 日韩一区二区三区视频在线观看| 午夜精品久久久久久久| 欧美日韩一区三区四区| 亚洲综合999| 911精品国产一区二区在线|