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

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

?? notepad.java

?? 一個小公司要求給寫的很簡單的任務管理系統(tǒng)。
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        public void propertyChange(PropertyChangeEvent e) {            String propertyName = e.getPropertyName();            if (e.getPropertyName().equals(Action.NAME)) {                String text = (String) e.getNewValue();                menuItem.setText(text);            } else if (propertyName.equals("enabled")) {                Boolean enabledState = (Boolean) e.getNewValue();                menuItem.setEnabled(enabledState.booleanValue());            }        }    }    private JTextComponent editor;    private Hashtable commands;    private Hashtable menuItems;    private JMenuBar menubar;    private JToolBar toolbar;    private JComponent status;    private JFrame elementTreeFrame;    protected ElementTreePanel elementTreePanel;    protected FileDialog fileDialog;    /**     * Listener for the edits on the current document.     */    protected UndoableEditListener undoHandler = new UndoHandler();    /** UndoManager that we add edits to. */    protected UndoManager undo = new UndoManager();    /**     * Suffix applied to the key used in resource file     * lookups for an image.     */    public static final String imageSuffix = "Image";    /**     * Suffix applied to the key used in resource file     * lookups for a label.     */    public static final String labelSuffix = "Label";    /**     * Suffix applied to the key used in resource file     * lookups for an action.     */    public static final String actionSuffix = "Action";    /**     * Suffix applied to the key used in resource file     * lookups for tooltip text.     */    public static final String tipSuffix = "Tooltip";    public static final String openAction = "open";    public static final String newAction  = "new";    public static final String saveAction = "save";    public static final String exitAction = "exit";    public static final String showElementTreeAction = "showElementTree";    class UndoHandler implements UndoableEditListener {	/**	 * Messaged when the Document has created an edit, the edit is	 * added to <code>undo</code>, an instance of UndoManager.	 */        public void undoableEditHappened(UndoableEditEvent e) {	    undo.addEdit(e.getEdit());	    undoAction.update();	    redoAction.update();	}    }    /**     * FIXME - I'm not very useful yet     */    class StatusBar extends JComponent {        public StatusBar() {	    super();	    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));	}        public void paint(Graphics g) {	    super.paint(g);	}    }    // --- action implementations -----------------------------------    private UndoAction undoAction = new UndoAction();    private RedoAction redoAction = new RedoAction();    /**     * Actions defined by the Notepad class     */    private Action[] defaultActions = {	new NewAction(),	new OpenAction(),        new SaveAction(),	new ExitAction(),	new ShowElementTreeAction(),        undoAction,        redoAction    };    class UndoAction extends AbstractAction {	public UndoAction() {	    super("Undo");	    setEnabled(false);	}	public void actionPerformed(ActionEvent e) {	    try {		undo.undo();	    } catch (CannotUndoException ex) {		System.out.println("Unable to undo: " + ex);		ex.printStackTrace();	    }	    update();	    redoAction.update();	}	protected void update() {	    if(undo.canUndo()) {		setEnabled(true);		putValue(Action.NAME, undo.getUndoPresentationName());	    }	    else {		setEnabled(false);		putValue(Action.NAME, "Undo");	    }	}    }    class RedoAction extends AbstractAction {	public RedoAction() {	    super("Redo");	    setEnabled(false);	}	public void actionPerformed(ActionEvent e) {	    try {		undo.redo();	    } catch (CannotRedoException ex) {		System.out.println("Unable to redo: " + ex);		ex.printStackTrace();	    }	    update();	    undoAction.update();	}	protected void update() {	    if(undo.canRedo()) {		setEnabled(true);		putValue(Action.NAME, undo.getRedoPresentationName());	    }	    else {		setEnabled(false);		putValue(Action.NAME, "Redo");	    }	}    }    class OpenAction extends NewAction {	OpenAction() {	    super(openAction);	}        public void actionPerformed(ActionEvent e) {	    Frame frame = getFrame();            JFileChooser chooser = new JFileChooser();            int ret = chooser.showOpenDialog(frame);            if (ret != JFileChooser.APPROVE_OPTION) {		return;	    }            File f = chooser.getSelectedFile();	    if (f.isFile() && f.canRead()) {		Document oldDoc = getEditor().getDocument();		if(oldDoc != null)		    oldDoc.removeUndoableEditListener(undoHandler);		if (elementTreePanel != null) {		    elementTreePanel.setEditor(null);		}		getEditor().setDocument(new PlainDocument());                frame.setTitle(f.getName());		Thread loader = new FileLoader(f, editor.getDocument());		loader.start();	    } else {                JOptionPane.showMessageDialog(getFrame(),                        "Could not open file: " + f,                        "Error opening file",                        JOptionPane.ERROR_MESSAGE);	    }	}    }        class SaveAction extends AbstractAction {	SaveAction() {	    super(saveAction);	}        public void actionPerformed(ActionEvent e) {            Frame frame = getFrame();            JFileChooser chooser = new JFileChooser();            int ret = chooser.showSaveDialog(frame);            if (ret != JFileChooser.APPROVE_OPTION) {                return;            }            File f = chooser.getSelectedFile();            frame.setTitle(f.getName());            Thread saver = new FileSaver(f, editor.getDocument());            saver.start();	}    }    class NewAction extends AbstractAction {	NewAction() {	    super(newAction);	}	NewAction(String nm) {	    super(nm);	}        public void actionPerformed(ActionEvent e) {	    Document oldDoc = getEditor().getDocument();	    if(oldDoc != null)		oldDoc.removeUndoableEditListener(undoHandler);	    getEditor().setDocument(new PlainDocument());	    getEditor().getDocument().addUndoableEditListener(undoHandler);	    resetUndoManager();            getFrame().setTitle(resources.getString("Title"));	    revalidate();	}    }    /**     * Really lame implementation of an exit command     */    class ExitAction extends AbstractAction {	ExitAction() {	    super(exitAction);	}        public void actionPerformed(ActionEvent e) {	    System.exit(0);	}    }    /**     * Action that brings up a JFrame with a JTree showing the structure     * of the document.     */    class ShowElementTreeAction extends AbstractAction {	ShowElementTreeAction() {	    super(showElementTreeAction);	}	ShowElementTreeAction(String nm) {	    super(nm);	}        public void actionPerformed(ActionEvent e) {	    if(elementTreeFrame == null) {		// Create a frame containing an instance of 		// ElementTreePanel.		try {		    String    title = resources.getString			                ("ElementTreeFrameTitle");		    elementTreeFrame = new JFrame(title);		} catch (MissingResourceException mre) {		    elementTreeFrame = new JFrame();		}		elementTreeFrame.addWindowListener(new WindowAdapter() {		    public void windowClosing(WindowEvent weeee) {			elementTreeFrame.setVisible(false);		    }		});		Container fContentPane = elementTreeFrame.getContentPane();		fContentPane.setLayout(new BorderLayout());		elementTreePanel = new ElementTreePanel(getEditor());		fContentPane.add(elementTreePanel);		elementTreeFrame.pack();	    }	    elementTreeFrame.show();	}    }    /**     * Thread to load a file into the text storage model     */    class FileLoader extends Thread {	FileLoader(File f, Document doc) {	    setPriority(4);	    this.f = f;	    this.doc = doc;	}        public void run() {	    try {		// initialize the statusbar		status.removeAll();		JProgressBar progress = new JProgressBar();		progress.setMinimum(0);		progress.setMaximum((int) f.length());		status.add(progress);		status.revalidate();		// try to start reading		Reader in = new FileReader(f);		char[] buff = new char[4096];		int nch;		while ((nch = in.read(buff, 0, buff.length)) != -1) {		    doc.insertString(doc.getLength(), new String(buff, 0, nch), null);		    progress.setValue(progress.getValue() + nch);		}	    }	    catch (IOException e) {                final String msg = e.getMessage();                SwingUtilities.invokeLater(new Runnable() {                    public void run() {                        JOptionPane.showMessageDialog(getFrame(),                                "Could not open file: " + msg,                                "Error opening file",                                JOptionPane.ERROR_MESSAGE);	    }                });            }	    catch (BadLocationException e) {		System.err.println(e.getMessage());	    }            doc.addUndoableEditListener(undoHandler);            // we are done... get rid of progressbar            status.removeAll();            status.revalidate();            resetUndoManager();	    if (elementTreePanel != null) {		SwingUtilities.invokeLater(new Runnable() {		    public void run() {			elementTreePanel.setEditor(getEditor());		    }		});	    }	}	Document doc;	File f;    }    /**     * Thread to save a document to file     */    class FileSaver extends Thread {        Document doc;        File f;	FileSaver(File f, Document doc) {	    setPriority(4);	    this.f = f;	    this.doc = doc;	}        public void run() {	    try {		// initialize the statusbar		status.removeAll();		JProgressBar progress = new JProgressBar();		progress.setMinimum(0);		progress.setMaximum((int) doc.getLength());		status.add(progress);		status.revalidate();		// start writing		Writer out = new FileWriter(f);                Segment text = new Segment();                text.setPartialReturn(true);                int charsLeft = doc.getLength();		int offset = 0;                while (charsLeft > 0) {                    doc.getText(offset, Math.min(4096, charsLeft), text);                    out.write(text.array, text.offset, text.count);                    charsLeft -= text.count;                    offset += text.count;                    progress.setValue(offset);                    try {                        Thread.sleep(10);                    } catch (InterruptedException e) {                        e.printStackTrace();                    }                }                out.flush();                out.close();	    }	    catch (IOException e) {                final String msg = e.getMessage();                SwingUtilities.invokeLater(new Runnable() {                    public void run() {                        JOptionPane.showMessageDialog(getFrame(),                                "Could not save file: " + msg,                                "Error saving file",                                JOptionPane.ERROR_MESSAGE);	    }                });	    }	    catch (BadLocationException e) {		System.err.println(e.getMessage());	    }            // we are done... get rid of progressbar            status.removeAll();            status.revalidate();	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2020国产精品自拍| 欧美日韩视频在线观看一区二区三区 | 国产在线精品国自产拍免费| 精品污污网站免费看| 亚洲成在人线免费| 3d成人动漫网站| 国产尤物一区二区| 国产精品久久久久久妇女6080| 99精品国产一区二区三区不卡| 亚洲精品视频在线观看免费| 欧美日韩亚洲不卡| 国产一区 二区| 亚洲人成小说网站色在线| 欧美偷拍一区二区| 久久精品久久精品| 国产精品毛片a∨一区二区三区| 成人黄色国产精品网站大全在线免费观看 | 一区二区三区欧美在线观看| 欧美日韩一二区| 激情丁香综合五月| 国产精品久久久久久妇女6080| 欧洲中文字幕精品| 久久国产麻豆精品| 亚洲免费观看高清完整版在线观看熊| 欧美色网站导航| 国产九色精品成人porny| 专区另类欧美日韩| 日韩视频在线一区二区| 床上的激情91.| 日本视频一区二区三区| 日本一二三四高清不卡| 欧美一区二区视频在线观看2020 | 午夜久久久久久电影| 久久久国际精品| 欧美三级韩国三级日本一级| 日本成人中文字幕在线视频| 国产精品对白交换视频 | 99久久99久久精品免费观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 日本一区二区免费在线| 欧美一区二区观看视频| 色婷婷久久99综合精品jk白丝| 久久99久国产精品黄毛片色诱| 最好看的中文字幕久久| 精品99久久久久久| 91精品国产综合久久精品麻豆 | 久久伊人蜜桃av一区二区| 欧美视频在线观看一区| 国产91精品在线观看| 日韩va欧美va亚洲va久久| 亚洲欧美另类久久久精品2019| 久久久无码精品亚洲日韩按摩| 欧美电影一区二区| 日本二三区不卡| 国产东北露脸精品视频| 经典一区二区三区| 奇米色一区二区三区四区| 一区二区视频在线看| 欧美—级在线免费片| 久久日韩粉嫩一区二区三区| 91精品国产综合久久久久久漫画| 91福利资源站| 不卡视频一二三| 国产69精品一区二区亚洲孕妇 | 亚洲成av人综合在线观看| 亚洲欧美日韩国产综合| 国产精品久久精品日日| 国产欧美视频在线观看| 久久久久久久久免费| 精品粉嫩aⅴ一区二区三区四区| 91精品国产麻豆国产自产在线 | 日日骚欧美日韩| 亚洲国产精品麻豆| 亚洲免费高清视频在线| 国产精品毛片a∨一区二区三区| 国产午夜精品久久久久久久| 精品盗摄一区二区三区| 欧美成人video| 日韩女优av电影在线观看| 欧美成人猛片aaaaaaa| 日韩女同互慰一区二区| 久久综合久色欧美综合狠狠| 日韩一卡二卡三卡国产欧美| 日韩欧美一二三区| 久久影视一区二区| 国产精品三级av| 亚洲男人都懂的| 亚洲主播在线观看| 天堂va蜜桃一区二区三区| 日韩中文字幕不卡| 麻豆专区一区二区三区四区五区| 美女在线视频一区| 久久成人久久鬼色| 成人黄色av电影| 在线中文字幕一区| 日韩写真欧美这视频| 欧美精品一区在线观看| 国产精品情趣视频| 亚洲欧美一区二区三区极速播放 | 久久久久久久久久久久电影| 国产亚洲精品bt天堂精选| 亚洲视频小说图片| 五月天国产精品| 国产精品小仙女| 91免费看视频| 日韩一区二区三区在线| 久久久久久黄色| 亚洲欧美色一区| 日日夜夜免费精品| 国产成人精品一区二| 91麻豆成人久久精品二区三区| 欧美猛男gaygay网站| 久久夜色精品国产噜噜av| 亚洲色欲色欲www| 日韩精品电影一区亚洲| 国产老肥熟一区二区三区| 91成人在线观看喷潮| 2019国产精品| 亚洲福利一区二区| 成人激情图片网| 欧美精品在欧美一区二区少妇| 国产亚洲欧美一区在线观看| 亚洲福利一区二区三区| 国产成人精品www牛牛影视| 欧美色爱综合网| 久久精品夜色噜噜亚洲a∨ | 免费在线观看一区| 成人白浆超碰人人人人| 日韩一卡二卡三卡| 亚洲少妇30p| 国产激情一区二区三区四区 | 欧美视频一区在线观看| 中文字幕不卡三区| 麻豆精品在线观看| 色综合天天综合在线视频| 中文字幕日韩一区| 欧美a级理论片| 欧美专区亚洲专区| 国产精品成人一区二区艾草| 日本欧美大码aⅴ在线播放| 91在线云播放| 久久久精品蜜桃| 久久丁香综合五月国产三级网站| 日本高清不卡aⅴ免费网站| 久久精品欧美一区二区三区不卡| 日韩中文字幕91| 欧美三级三级三级| 亚洲精品综合在线| 成人国产视频在线观看| 久久色.com| 久久精品二区亚洲w码| 欧美裸体bbwbbwbbw| 亚洲中国最大av网站| 91在线观看下载| 国产精品美女久久久久久 | 亚洲国产美女搞黄色| 99热在这里有精品免费| 国产女主播在线一区二区| 精品一区二区三区影院在线午夜| 欧美日本在线播放| 亚洲成人综合网站| 欧美私模裸体表演在线观看| 一区二区激情小说| 欧美视频一二三区| 亚洲一区免费观看| 欧美日韩在线播放一区| 亚洲狠狠丁香婷婷综合久久久| 91污片在线观看| 一区二区在线看| 欧美亚洲国产bt| 亚洲小说春色综合另类电影| 欧美日韩免费一区二区三区视频| 悠悠色在线精品| 欧美丝袜丝交足nylons图片| 午夜精品久久久久久久| 3atv一区二区三区| 久久99九九99精品| 欧美国产丝袜视频| 9久草视频在线视频精品| 中文字幕亚洲电影| 欧美在线观看视频一区二区| 亚洲第四色夜色| 欧美疯狂做受xxxx富婆| 美女精品自拍一二三四| 久久综合色婷婷| 99视频有精品| 亚洲6080在线| 欧美精品一区二区精品网| 国产精品一区二区久激情瑜伽 | 伊人开心综合网| 欧美一区二区视频免费观看| 乱一区二区av| 国产精品久久久久久久久动漫| 99久久精品国产导航| 亚洲1区2区3区视频| 久久亚洲一区二区三区四区| 北岛玲一区二区三区四区| 一区二区在线观看不卡| 日韩精品自拍偷拍| 色综合天天综合色综合av|