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

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

?? basictextui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * @(#)BasicTextUI.java	1.106 05/06/03 * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import java.util.*;import java.awt.*;import java.awt.event.*;import java.awt.font.*;import java.awt.datatransfer.*;import java.awt.dnd.*;import java.awt.im.InputContext;import java.beans.*;import java.io.*;import java.net.*;import javax.swing.*;import javax.swing.plaf.*;import javax.swing.text.*;import javax.swing.event.*;import javax.swing.border.Border;import javax.swing.plaf.UIResource;import sun.swing.DefaultLookup;import sun.awt.AppContext;import javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag;/** * <p> * Basis of a text components look-and-feel.  This provides the * basic editor view and controller services that may be useful * when creating a look-and-feel for an extension of * <code>JTextComponent</code>. * <p> * Most state is held in the associated <code>JTextComponent</code> * as bound properties, and the UI installs default values for the  * various properties.  This default will install something for * all of the properties.  Typically, a LAF implementation will * do more however.  At a minimum, a LAF would generally install * key bindings. * <p> * This class also provides some concurrency support if the  * <code>Document</code> associated with the JTextComponent is a subclass of * <code>AbstractDocument</code>.  Access to the View (or View hierarchy) is * serialized between any thread mutating the model and the Swing * event thread (which is expected to render, do model/view coordinate * translation, etc).  <em>Any access to the root view should first * acquire a read-lock on the AbstractDocument and release that lock * in a finally block.</em> * <p> * An important method to define is the {@link #getPropertyPrefix} method * which is used as the basis of the keys used to fetch defaults * from the UIManager.  The string should reflect the type of  * TextUI (eg. TextField, TextArea, etc) without the particular  * LAF part of the name (eg Metal, Motif, etc). * <p> * To build a view of the model, one of the following strategies  * can be employed. * <ol> * <li> * One strategy is to simply redefine the  * ViewFactory interface in the UI.  By default, this UI itself acts * as the factory for View implementations.  This is useful * for simple factories.  To do this reimplement the  * {@link #create} method. * <li> * A common strategy for creating more complex types of documents * is to have the EditorKit implementation return a factory.  Since * the EditorKit ties all of the pieces necessary to maintain a type * of document, the factory is typically an important part of that * and should be produced by the EditorKit implementation. * <li> * A less common way to create more complex types is to have * the UI implementation create a. * separate object for the factory.  To do this, the  * {@link #createViewFactory} method should be reimplemented to  * return some factory. * </ol> * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing.  As of 1.4, support for long term storage * of all JavaBeans<sup><font size="-2">TM</font></sup> * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @author Timothy Prinzing * @author Shannon Hickey (drag recognition) * @version 1.106 06/03/05 */public abstract class BasicTextUI extends TextUI implements ViewFactory {    /**     * Creates a new UI.     */    public BasicTextUI() {        painted = false;    }    /**     * Creates the object to use for a caret.  By default an     * instance of BasicCaret is created.  This method     * can be redefined to provide something else that implements     * the InputPosition interface or a subclass of JCaret.     *     * @return the caret object     */    protected Caret createCaret() {        return new BasicCaret();    }    /**     * Creates the object to use for adding highlights.  By default     * an instance of BasicHighlighter is created.  This method     * can be redefined to provide something else that implements     * the Highlighter interface or a subclass of DefaultHighlighter.     *     * @return the highlighter     */    protected Highlighter createHighlighter() {        return new BasicHighlighter();    }    /**     * Fetches the name of the keymap that will be installed/used      * by default for this UI. This is implemented to create a     * name based upon the classname.  The name is the the name     * of the class with the package prefix removed.     *     * @return the name     */    protected String getKeymapName() {	String nm = getClass().getName();	int index = nm.lastIndexOf('.');	if (index >= 0) {	    nm = nm.substring(index+1, nm.length());	}	return nm;    }    /**     * Creates the keymap to use for the text component, and installs     * any necessary bindings into it.  By default, the keymap is     * shared between all instances of this type of TextUI. The     * keymap has the name defined by the getKeymapName method.  If the     * keymap is not found, then DEFAULT_KEYMAP from JTextComponent is used.     * <p>     * The set of bindings used to create the keymap is fetched      * from the UIManager using a key formed by combining the     * {@link #getPropertyPrefix} method     * and the string <code>.keyBindings</code>.  The type is expected     * to be <code>JTextComponent.KeyBinding[]</code>.     *     * @return the keymap     * @see #getKeymapName     * @see javax.swing.text.JTextComponent     */    protected Keymap createKeymap() {	String nm = getKeymapName();	Keymap map = JTextComponent.getKeymap(nm);	if (map == null) {	    Keymap parent = JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP);	    map = JTextComponent.addKeymap(nm, parent);	    String prefix = getPropertyPrefix();	    Object o = DefaultLookup.get(editor, this,                prefix + ".keyBindings");	    if ((o != null) && (o instanceof JTextComponent.KeyBinding[])) {		JTextComponent.KeyBinding[] bindings = (JTextComponent.KeyBinding[]) o;		JTextComponent.loadKeymap(map, bindings, getComponent().getActions());	    }	}	return map;    }    /**     * This method gets called when a bound property is changed     * on the associated JTextComponent.  This is a hook     * which UI implementations may change to reflect how the     * UI displays bound properties of JTextComponent subclasses.     * This is implemented to do nothing (i.e. the response to     * properties in JTextComponent itself are handled prior     * to calling this method).     *     * @param evt the property change event     */    protected void propertyChange(PropertyChangeEvent evt) {    }    /**     * Gets the name used as a key to look up properties through the     * UIManager.  This is used as a prefix to all the standard     * text properties.     *     * @return the name     */    protected abstract String getPropertyPrefix();    /**     * Initializes component properties, e.g. font, foreground,      * background, caret color, selection color, selected text color,     * disabled text color, and border color.  The font, foreground, and     * background properties are only set if their current value is either null     * or a UIResource, other properties are set if the current     * value is null.     *      * @see #uninstallDefaults     * @see #installUI     */    protected void installDefaults()     {        String prefix = getPropertyPrefix();        Font f = editor.getFont();        if ((f == null) || (f instanceof UIResource)) {            editor.setFont(UIManager.getFont(prefix + ".font"));        }        Color bg = editor.getBackground();        if ((bg == null) || (bg instanceof UIResource)) {            editor.setBackground(UIManager.getColor(prefix + ".background"));        }                Color fg = editor.getForeground();        if ((fg == null) || (fg instanceof UIResource)) {            editor.setForeground(UIManager.getColor(prefix + ".foreground"));        }        Color color = editor.getCaretColor();        if ((color == null) || (color instanceof UIResource)) {            editor.setCaretColor(UIManager.getColor(prefix + ".caretForeground"));        }        Color s = editor.getSelectionColor();        if ((s == null) || (s instanceof UIResource)) {            editor.setSelectionColor(UIManager.getColor(prefix + ".selectionBackground"));        }        Color sfg = editor.getSelectedTextColor();        if ((sfg == null) || (sfg instanceof UIResource)) {            editor.setSelectedTextColor(UIManager.getColor(prefix + ".selectionForeground"));        }        Color dfg = editor.getDisabledTextColor();        if ((dfg == null) || (dfg instanceof UIResource)) {            editor.setDisabledTextColor(UIManager.getColor(prefix + ".inactiveForeground"));        }        Border b = editor.getBorder();        if ((b == null) || (b instanceof UIResource)) {            editor.setBorder(UIManager.getBorder(prefix + ".border"));        }        Insets margin = editor.getMargin();        if (margin == null || margin instanceof UIResource) {            editor.setMargin(UIManager.getInsets(prefix + ".margin"));        }    }    private void installDefaults2() {        editor.addMouseListener(dragListener);        editor.addMouseMotionListener(dragListener);	        String prefix = getPropertyPrefix();        Caret caret = editor.getCaret();        if (caret == null || caret instanceof UIResource) {            caret = createCaret();            editor.setCaret(caret);                    int rate = DefaultLookup.getInt(getComponent(), this, prefix + ".caretBlinkRate", 500);            caret.setBlinkRate(rate);        }        Highlighter highlighter = editor.getHighlighter();        if (highlighter == null || highlighter instanceof UIResource) {            editor.setHighlighter(createHighlighter());        }	TransferHandler th = editor.getTransferHandler();	if (th == null || th instanceof UIResource) {	    editor.setTransferHandler(getTransferHandler());	}	DropTarget dropTarget = editor.getDropTarget();	if (dropTarget instanceof UIResource) {            if (defaultDropTargetListener == null) {                defaultDropTargetListener = new TextDropTargetListener();            }	    try {		dropTarget.addDropTargetListener(defaultDropTargetListener);	    } catch (TooManyListenersException tmle) {		// should not happen... swing drop target is multicast	    }	}    }    /**     * Sets the component properties that haven't been explicitly overridden to      * null.  A property is considered overridden if its current value     * is not a UIResource.     *      * @see #installDefaults     * @see #uninstallUI     */    protected void uninstallDefaults()     {        editor.removeMouseListener(dragListener);        editor.removeMouseMotionListener(dragListener);        if (editor.getCaretColor() instanceof UIResource) {            editor.setCaretColor(null);        }                                                                                                 if (editor.getSelectionColor() instanceof UIResource) {            editor.setSelectionColor(null);        }        if (editor.getDisabledTextColor() instanceof UIResource) {            editor.setDisabledTextColor(null);        }        if (editor.getSelectedTextColor() instanceof UIResource) {            editor.setSelectedTextColor(null);        }        if (editor.getBorder() instanceof UIResource) {            editor.setBorder(null);        }        if (editor.getMargin() instanceof UIResource) {            editor.setMargin(null);        }        if (editor.getCaret() instanceof UIResource) {            editor.setCaret(null);        }        if (editor.getHighlighter() instanceof UIResource) {            editor.setHighlighter(null);        }	if (editor.getTransferHandler() instanceof UIResource) {	    editor.setTransferHandler(null);	}    }    /**     * Installs listeners for the UI.     */    protected void installListeners() {    }    /**     * Uninstalls listeners for the UI.     */    protected void uninstallListeners() {    }    protected void installKeyboardActions() {	// backward compatibility support... keymaps for the UI	// are now installed in the more friendly input map.        editor.setKeymap(createKeymap());         InputMap km = getInputMap();	if (km != null) {	    SwingUtilities.replaceUIInputMap(editor, JComponent.WHEN_FOCUSED,					     km);	}		ActionMap map = getActionMap();	if (map != null) {	    SwingUtilities.replaceUIActionMap(editor, map);	}	updateFocusAcceleratorBinding(false);    }    /**     * Get the InputMap to use for the UI.       */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区三区乱码| 国产精品亚洲一区二区三区在线| 青青草成人在线观看| 国产成人免费在线| 在线观看亚洲专区| 欧美国产成人精品| 日韩电影在线一区| 日本电影亚洲天堂一区| 久久久久久免费网| 午夜视频在线观看一区二区三区| 国产成人精品亚洲日本在线桃色| 欧美情侣在线播放| 一区二区三区四区蜜桃 | 丁香激情综合国产| 欧美一二三四区在线| 玉足女爽爽91| 波多野结衣精品在线| 欧美v日韩v国产v| 亚洲1区2区3区视频| 91社区在线播放| 亚洲国产精品传媒在线观看| 精品亚洲porn| 欧美一级欧美三级在线观看| 亚洲超碰精品一区二区| 91蝌蚪porny九色| 中文字幕在线不卡一区| 国产大片一区二区| 精品美女一区二区| 九九精品视频在线看| 91精品婷婷国产综合久久竹菊| 一区二区三区欧美视频| 一本色道综合亚洲| 亚洲特级片在线| 91浏览器在线视频| 亚洲女厕所小便bbb| 日本伦理一区二区| 一区二区视频在线| 欧美偷拍一区二区| 亚洲成av人片一区二区梦乃| 欧美日韩国产欧美日美国产精品| 亚洲午夜久久久久中文字幕久| 日本高清成人免费播放| 亚洲亚洲人成综合网络| 精品污污网站免费看| 青青草97国产精品免费观看无弹窗版| 欧美在线观看一区二区| 天涯成人国产亚洲精品一区av| 欧美二区在线观看| 久久国内精品视频| 久久久精品欧美丰满| av一区二区三区| 亚洲卡通动漫在线| 欧美巨大另类极品videosbest| 日韩精品高清不卡| 精品av综合导航| 国产91高潮流白浆在线麻豆 | ...av二区三区久久精品| 91老司机福利 在线| 日韩主播视频在线| 久久精品欧美一区二区三区不卡 | 日本一区二区三区久久久久久久久不 | 日韩午夜激情av| 国产东北露脸精品视频| 最新久久zyz资源站| 欧美少妇一区二区| 色94色欧美sute亚洲线路二| 亚洲一卡二卡三卡四卡无卡久久| 在线观看91av| 豆国产96在线|亚洲| 亚洲精品少妇30p| 欧美不卡一二三| 99久久99久久精品免费看蜜桃 | 国产精品久久一卡二卡| 欧美色图第一页| 韩国av一区二区三区在线观看| 国产精品成人免费精品自在线观看| 欧美日韩精品一区二区三区蜜桃| 九色综合国产一区二区三区| 一区二区三区四区激情| 欧美不卡一二三| 欧美性淫爽ww久久久久无| 国产一区二区在线免费观看| 亚洲午夜av在线| 久久女同精品一区二区| 欧美日韩亚州综合| 91丝袜国产在线播放| 久久成人av少妇免费| 亚洲一区二区不卡免费| 久久久亚洲欧洲日产国码αv| 在线观看视频一区二区| 成人免费毛片高清视频| 六月丁香婷婷色狠狠久久| 亚洲欧洲综合另类| 国产欧美日韩综合精品一区二区| 欧美久久久久免费| 91在线免费播放| 国产成人午夜电影网| 久久精品国产在热久久| 亚洲影视资源网| 国产精品免费av| 久久蜜桃一区二区| 欧美一区二区三区在线看| 91成人国产精品| 成人免费视频网站在线观看| 国产一区不卡精品| 蜜臀a∨国产成人精品| 亚洲激情网站免费观看| 国产精品三级电影| 国产日韩欧美亚洲| 2019国产精品| 日韩一级成人av| 日韩视频123| 欧美成人乱码一区二区三区| 日韩一区二区在线看| 91精品国产黑色紧身裤美女| 欧美日本在线播放| 欧美福利电影网| 6080日韩午夜伦伦午夜伦| 欧美视频一区二区三区在线观看| 99久久99久久精品国产片果冻| 国产激情视频一区二区三区欧美 | 91视频com| 91在线观看下载| 91麻豆免费视频| 91在线观看成人| 97精品国产露脸对白| 色综合久久久久| 欧洲激情一区二区| 欧美电影在线免费观看| 欧美成人乱码一区二区三区| 2019国产精品| 国产精品丝袜久久久久久app| 中文字幕一区二区视频| 亚洲精选视频免费看| 亚洲国产精品一区二区久久恐怖片| 一区二区三区在线播放| 日本va欧美va精品| 国产一区二区影院| 不卡在线视频中文字幕| 欧美色男人天堂| 日韩亚洲欧美在线| 中文字幕欧美国产| 亚洲精品日韩一| 蜜臀av一区二区在线免费观看| 狠狠色丁香久久婷婷综合丁香| 国产成人精品免费| 91国偷自产一区二区使用方法| 欧美另类z0zxhd电影| 久久蜜桃香蕉精品一区二区三区| 国产精品久久看| 午夜精品一区二区三区免费视频 | 亚洲国产成人高清精品| 精品一区二区日韩| 99re这里只有精品首页| 欧美高清dvd| 欧美国产日韩一二三区| 亚洲国产色一区| 国产精品一品二品| 欧美日韩免费观看一区二区三区 | 中文字幕亚洲在| 午夜av区久久| k8久久久一区二区三区 | 一本高清dvd不卡在线观看| 制服丝袜av成人在线看| 国产日韩一级二级三级| 日韩av电影免费观看高清完整版在线观看| 另类的小说在线视频另类成人小视频在线| 成人网在线播放| 91精品婷婷国产综合久久性色| 国产精品丝袜在线| 久久99久久久久| 欧美午夜电影网| 中文字幕av一区二区三区| 亚洲一区二区av电影| 成人性生交大合| 日韩一区二区三区三四区视频在线观看| 国产精品三级av| 国产另类ts人妖一区二区| 欧美猛男超大videosgay| 国产精品不卡在线观看| 国产美女在线精品| 91精品在线麻豆| 亚洲成人黄色小说| 一本色道久久综合精品竹菊| 国产亚洲欧美在线| 精品影院一区二区久久久| 欧美日韩国产不卡| 亚洲精品欧美二区三区中文字幕| 国产精品一卡二卡在线观看| 欧美精品成人一区二区三区四区| 亚洲精品视频在线观看免费 | 久久精品免视看| 久久99久久99| 欧美一区二区精品在线| 五月天中文字幕一区二区| 欧美私人免费视频| 亚洲黄色av一区| 欧美午夜理伦三级在线观看| 亚洲午夜久久久久久久久电影院 | eeuss鲁片一区二区三区在线观看|