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

📄 textareadocument.java

📁 java1.6众多例子参考
💻 JAVA
字号:
/* * @(#)TextAreaDocument.java	1.9 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.text.html;import javax.swing.text.*;/** * TextAreaDocument extends the capabilities of the PlainDocument  * to store the data that is initially set in the Document. * This is stored in order to enable an accurate reset of the  * state when a reset is requested. * * @author Sunita Mani * @version 1.9 11/17/05 */  class TextAreaDocument extends PlainDocument {    String initialText;      /**     * Resets the model by removing all the data,     * and restoring it to its initial state.     */    void reset() {	try {	    remove(0, getLength());	    if (initialText != null) {		insertString(0, initialText, null);	    }	} catch (BadLocationException e) {	}    }    /**     * Stores the data that the model is initially     * loaded with.     */    void storeInitialText() {	try {	    initialText = getText(0, getLength());	} catch (BadLocationException e) {	}    }}

⌨️ 快捷键说明

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