亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品乱码一区二区三区软件 | 国产精品一区二区在线看| 欧美xxx久久| 一本一道综合狠狠老| 日本欧美在线观看| 日韩伦理av电影| 日韩视频一区二区三区在线播放| 国产suv精品一区二区883| 婷婷开心久久网| 国产精品国产三级国产aⅴ无密码| 日韩亚洲欧美高清| 欧美性xxxxxx少妇| av毛片久久久久**hd| 极品少妇一区二区| 天堂一区二区在线免费观看| 中文字幕一区二区日韩精品绯色| 日韩三级精品电影久久久 | 青青草一区二区三区| 国产精品视频一二| 精品sm在线观看| 在线免费观看一区| 国产成人久久精品77777最新版本| 国产视频一区在线观看 | 国产精品自拍毛片| 亚洲 欧美综合在线网络| 欧美成人三级在线| 色吊一区二区三区| 99亚偷拍自图区亚洲| 六月丁香婷婷色狠狠久久| 亚洲v精品v日韩v欧美v专区| 欧美激情一区三区| 久久精品免费在线观看| 91精品国产色综合久久不卡电影| 亚洲地区一二三色| 一片黄亚洲嫩模| 日韩美女精品在线| 最新热久久免费视频| 久久久久久**毛片大全| 91精品国产91久久综合桃花 | 午夜免费久久看| 中文字幕高清不卡| 国产精品丝袜久久久久久app| 精品少妇一区二区三区视频免付费| 欧美精品乱码久久久久久| 色欧美片视频在线观看在线视频| www.日韩av| 成人午夜精品在线| youjizz久久| 成人理论电影网| 另类欧美日韩国产在线| 免费一级欧美片在线观看| 亚洲成精国产精品女| 午夜一区二区三区视频| 亚洲成人777| 久久99久久久欧美国产| 美女一区二区久久| 国产精品白丝jk黑袜喷水| 久久成人18免费观看| 五月天亚洲精品| 日韩精品高清不卡| 日韩高清不卡在线| 亚洲二区在线观看| 午夜激情综合网| 久久精品国产一区二区三| 精品一区二区在线免费观看| 国产伦精品一区二区三区免费迷| 韩国三级中文字幕hd久久精品| 亚洲国产精品久久人人爱蜜臀| 亚洲福利视频导航| 日韩黄色免费电影| 久久黄色级2电影| 国内成人精品2018免费看| 国产曰批免费观看久久久| 国产伦理精品不卡| 色呦呦国产精品| 欧美日韩国产高清一区| 日韩精品一区二区三区在线观看| 欧美电影免费观看高清完整版在| 国产人成亚洲第一网站在线播放| 中文字幕制服丝袜一区二区三区| 亚洲一区在线播放| 奇米精品一区二区三区四区| 成人一区在线观看| 欧美视频在线一区二区三区| 欧日韩精品视频| xvideos.蜜桃一区二区| 中文字幕在线免费不卡| 日本在线不卡一区| 经典三级视频一区| 欧美天天综合网| 精品久久人人做人人爽| 亚洲精品视频观看| 美女一区二区久久| 91黄色免费版| 日韩欧美aaaaaa| 亚洲免费av在线| 精品一区二区三区免费毛片爱 | 专区另类欧美日韩| 麻豆精品国产91久久久久久| 99re视频精品| 日韩视频免费观看高清完整版| 中文一区二区在线观看| 日韩va亚洲va欧美va久久| 国产精品一二三四| 欧美日韩久久久久久| 国产偷v国产偷v亚洲高清| 一区二区欧美在线观看| 日韩精品五月天| 国产一区二区三区日韩 | 欧美一级久久久久久久大片| 亚洲欧美日韩国产另类专区| 激情文学综合网| 欧美一区二区私人影院日本| 国产精品日日摸夜夜摸av| 精品一区二区精品| 精品视频在线免费观看| 国产欧美一区二区精品忘忧草| 日韩精品一级中文字幕精品视频免费观看 | 亚洲欧美怡红院| 久久精品理论片| 精品污污网站免费看| 国产精品狼人久久影院观看方式| 国产一区视频导航| 欧美天天综合网| 亚洲综合图片区| 成人激情午夜影院| 久久久久久久网| 青青草97国产精品免费观看| 欧美三级午夜理伦三级中视频| 国产欧美一区视频| 国产精品自拍网站| 欧美成人一区二区三区| 麻豆国产精品777777在线| 91成人免费在线视频| 中文字幕不卡在线播放| 激情五月激情综合网| 欧美老肥妇做.爰bbww| 亚洲国产精品精华液2区45| 精东粉嫩av免费一区二区三区| 欧美日韩国产另类不卡| 亚洲欧洲av另类| 成人一区二区三区在线观看| 久久久久久久综合色一本| 亚洲永久精品大片| 一本色道亚洲精品aⅴ| 欧美三级日韩在线| 三级欧美在线一区| 在线免费观看日本一区| 香蕉乱码成人久久天堂爱免费| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲免费伊人电影| 91在线国产福利| 樱桃视频在线观看一区| 91网站视频在线观看| 伊人性伊人情综合网| 91女神在线视频| 亚洲激情综合网| 在线观看一区二区视频| 亚洲成人精品一区二区| 色狠狠av一区二区三区| 日本色综合中文字幕| 日韩精品专区在线影院重磅| 国产91精品久久久久久久网曝门| 国产情人综合久久777777| 国产成人av在线影院| 久久久久成人黄色影片| 国产黑丝在线一区二区三区| 国产精品色在线观看| 色婷婷综合久久久久中文一区二区| 日韩毛片高清在线播放| 欧美日韩成人综合天天影院| 亚洲123区在线观看| 精品久久人人做人人爽| 国产成人av一区二区三区在线| 亚洲欧美色图小说| 色婷婷国产精品综合在线观看| 日本免费新一区视频| 欧美va亚洲va在线观看蝴蝶网| av高清久久久| 亚洲小说欧美激情另类| 精品少妇一区二区三区免费观看| 国产精品一区二区你懂的| 亚洲欧美综合另类在线卡通| 欧美日韩国产bt| 国产精品综合一区二区三区| 中文字幕欧美国产| 欧美男男青年gay1069videost| 日韩国产欧美一区二区三区| 亚洲国产精品成人综合| 91在线视频观看| 久久国产精品免费| 久久精品人人做| 精品婷婷伊人一区三区三| 激情欧美日韩一区二区| 中文字幕一区二区三区乱码在线| 欧美精品久久一区| 成人av中文字幕| 久久精品国产久精国产| 国产精品麻豆久久久| 26uuu亚洲|