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

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

?? basiceditorpaneui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
字號:
/* * @(#)BasicEditorPaneUI.java	1.33 05/11/10 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import java.awt.*;import java.awt.event.*;import java.beans.*;import java.net.URL;import java.net.MalformedURLException;import javax.swing.*;import javax.swing.text.*;import javax.swing.text.html.*;import javax.swing.plaf.*;import javax.swing.border.*;/** * Provides the look and feel for a JEditorPane. * <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 * @version 1.33 11/10/05 */public class BasicEditorPaneUI extends BasicTextUI {    /**     * Creates a UI for the JTextPane.     *     * @param c the JTextPane component     * @return the UI     */    public static ComponentUI createUI(JComponent c) {        return new BasicEditorPaneUI();    }    /**     * Creates a new BasicEditorPaneUI.     */    public BasicEditorPaneUI() {	super();    }    /**     * Fetches the name used as a key to lookup properties through the     * UIManager.  This is used as a prefix to all the standard     * text properties.     *     * @return the name ("EditorPane")     */    protected String getPropertyPrefix() {	return "EditorPane";    }    /**     *{@inheritDoc}     *     * @since 1.5     */    public void installUI(JComponent c) {        super.installUI(c);        updateDisplayProperties(c.getFont(),                                c.getForeground());    }    /**     *{@inheritDoc}     *     * @since 1.5     */    public void uninstallUI(JComponent c) {        cleanDisplayProperties();        super.uninstallUI(c);    }        /**     * Fetches the EditorKit for the UI.  This is whatever is     * currently set in the associated JEditorPane.     *     * @return the editor capabilities     * @see TextUI#getEditorKit     */    public EditorKit getEditorKit(JTextComponent tc) {	JEditorPane pane = (JEditorPane) getComponent();	return pane.getEditorKit();    }    /**     * Fetch an action map to use.  The map for a JEditorPane     * is not shared because it changes with the EditorKit.     */    ActionMap getActionMap() {        ActionMap am = new ActionMapUIResource();        am.put("requestFocus", new FocusAction());	EditorKit editorKit = getEditorKit(getComponent());	if (editorKit != null) {	    Action[] actions = editorKit.getActions();	    if (actions != null) {		addActions(am, actions);	    }	}        am.put(TransferHandler.getCutAction().getValue(Action.NAME),                TransferHandler.getCutAction());        am.put(TransferHandler.getCopyAction().getValue(Action.NAME),                TransferHandler.getCopyAction());        am.put(TransferHandler.getPasteAction().getValue(Action.NAME),                TransferHandler.getPasteAction());	return am;    }    /**     * 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 rebuild the ActionMap based upon an     * EditorKit change.     *     * @param evt the property change event     */    protected void propertyChange(PropertyChangeEvent evt) {        String name = evt.getPropertyName();	if ("editorKit".equals(name)) {	    ActionMap map = SwingUtilities.getUIActionMap(getComponent());	    if (map != null) {		Object oldValue = evt.getOldValue();		if (oldValue instanceof EditorKit) {		    Action[] actions = ((EditorKit)oldValue).getActions();		    if (actions != null) {			removeActions(map, actions);		    }		}		Object newValue = evt.getNewValue();		if (newValue instanceof EditorKit) {		    Action[] actions = ((EditorKit)newValue).getActions();		    if (actions != null) {			addActions(map, actions);		    }		}	    }	    updateFocusTraversalKeys();	} else if ("editable".equals(name)) {	    updateFocusTraversalKeys();	} else if ("foreground".equals(name)                   || "font".equals(name)                   || "document".equals(name)                   || JEditorPane.W3C_LENGTH_UNITS.equals(name)                   || JEditorPane.HONOR_DISPLAY_PROPERTIES.equals(name)                   ) {            JComponent c = getComponent();            updateDisplayProperties(c.getFont(), c.getForeground());            if ( JEditorPane.W3C_LENGTH_UNITS.equals(name)                 || JEditorPane.HONOR_DISPLAY_PROPERTIES.equals(name) ) {                modelChanged();            }            if ("foreground".equals(name)) {                Object honorDisplayPropertiesObject = c.                    getClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES);                boolean honorDisplayProperties = false;                if (honorDisplayPropertiesObject instanceof Boolean) {                    honorDisplayProperties =                         ((Boolean)honorDisplayPropertiesObject).booleanValue();                }                if (honorDisplayProperties) {                    modelChanged();                }            }                       }    }    void removeActions(ActionMap map, Action[] actions) {	int n = actions.length;	for (int i = 0; i < n; i++) {	    Action a = actions[i];	    map.remove(a.getValue(Action.NAME));	}    }    void addActions(ActionMap map, Action[] actions) {	int n = actions.length;	for (int i = 0; i < n; i++) {	    Action a = actions[i];	    map.put(a.getValue(Action.NAME), a);	}    }    void updateDisplayProperties(Font font, Color fg) {        JComponent c = getComponent();        Object honorDisplayPropertiesObject = c.            getClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES);        boolean honorDisplayProperties = false;        Object w3cLengthUnitsObject = c.getClientProperty(JEditorPane.                                                          W3C_LENGTH_UNITS);        boolean w3cLengthUnits = false;        if (honorDisplayPropertiesObject instanceof Boolean) {            honorDisplayProperties =                 ((Boolean)honorDisplayPropertiesObject).booleanValue();        }        if (w3cLengthUnitsObject instanceof Boolean) {            w3cLengthUnits = ((Boolean)w3cLengthUnitsObject).booleanValue();        }        if (this instanceof BasicTextPaneUI            || honorDisplayProperties) {             //using equals because can not use UIResource for Boolean            Document doc = getComponent().getDocument();            if (doc instanceof StyledDocument) {                if (doc instanceof HTMLDocument                    && honorDisplayProperties) {                    updateCSS(font, fg);                } else {                    updateStyle(font, fg);                }            }        } else {            cleanDisplayProperties();        }        if ( w3cLengthUnits ) {            Document doc = getComponent().getDocument();            if (doc instanceof HTMLDocument) {                StyleSheet documentStyleSheet =                     ((HTMLDocument)doc).getStyleSheet();                documentStyleSheet.addRule("W3C_LENGTH_UNITS_ENABLE");            }        } else {            Document doc = getComponent().getDocument();            if (doc instanceof HTMLDocument) {                StyleSheet documentStyleSheet =                     ((HTMLDocument)doc).getStyleSheet();                documentStyleSheet.addRule("W3C_LENGTH_UNITS_DISABLE");            }        }    }        /**     * Attribute key to reference the default font.     * used in javax.swing.text.StyleContext.getFont     * to resolve the default font.     */    private static final String FONT_ATTRIBUTE_KEY = "FONT_ATTRIBUTE_KEY";    void cleanDisplayProperties() {        Document document = getComponent().getDocument();        if (document instanceof HTMLDocument) {            StyleSheet documentStyleSheet =                 ((HTMLDocument)document).getStyleSheet();            StyleSheet[] styleSheets = documentStyleSheet.getStyleSheets();            if (styleSheets != null) {                for (StyleSheet s : styleSheets) {                    if (s instanceof StyleSheetUIResource) {                        documentStyleSheet.removeStyleSheet(s);                        documentStyleSheet.addRule("BASE_SIZE_DISABLE");                        break;                    }                }            }            Style style = ((StyledDocument) document).getStyle(StyleContext.DEFAULT_STYLE);            style.removeAttribute(FONT_ATTRIBUTE_KEY);        }    }        static class StyleSheetUIResource extends StyleSheet implements UIResource {    }        private void updateCSS(Font font, Color fg) {        JTextComponent component = getComponent();        Document document = component.getDocument();        if (document instanceof HTMLDocument) {            StyleSheet styleSheet = new StyleSheetUIResource();            StyleSheet documentStyleSheet =                 ((HTMLDocument)document).getStyleSheet();            StyleSheet[] styleSheets = documentStyleSheet.getStyleSheets();            if (styleSheets != null) {                for (StyleSheet s : styleSheets) {                    if (s instanceof StyleSheetUIResource) {                        documentStyleSheet.removeStyleSheet(s);                    }                }            }            String cssRule = com.sun.java.swing.                SwingUtilities2.displayPropertiesToCSS(font,                                                       fg);            styleSheet.addRule(cssRule);            documentStyleSheet.addStyleSheet(styleSheet);            documentStyleSheet.addRule("BASE_SIZE " +                                        component.getFont().getSize());            Style style = ((StyledDocument) document).getStyle(StyleContext.DEFAULT_STYLE);            style.addAttribute(FONT_ATTRIBUTE_KEY, font);        }    }    private void updateStyle(Font font, Color fg) {        updateFont(font);        updateForeground(fg);    }    /**     * Update the color in the default style of the document.     *     * @param color the new color to use or null to remove the color attribute     *              from the document's style     */    private void updateForeground(Color color) {        StyledDocument doc = (StyledDocument)getComponent().getDocument();        Style style = doc.getStyle(StyleContext.DEFAULT_STYLE);        if (style == null) {            return;        }        if (color == null) {            style.removeAttribute(StyleConstants.Foreground);        } else {            StyleConstants.setForeground(style, color);        }    }        /**     * Update the font in the default style of the document.     *     * @param font the new font to use or null to remove the font attribute     *             from the document's style     */    private void updateFont(Font font) {        StyledDocument doc = (StyledDocument)getComponent().getDocument();        Style style = doc.getStyle(StyleContext.DEFAULT_STYLE);        if (style == null) {            return;        }        if (font == null) {            style.removeAttribute(StyleConstants.FontFamily);            style.removeAttribute(StyleConstants.FontSize);            style.removeAttribute(StyleConstants.Bold);            style.removeAttribute(StyleConstants.Italic);            style.removeAttribute(FONT_ATTRIBUTE_KEY);        } else {            StyleConstants.setFontFamily(style, font.getName());            StyleConstants.setFontSize(style, font.getSize());            StyleConstants.setBold(style, font.isBold());            StyleConstants.setItalic(style, font.isItalic());            style.addAttribute(FONT_ATTRIBUTE_KEY, font);        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久蜜臀 | 亚洲自拍欧美精品| 亚洲国产精品尤物yw在线观看| 日韩成人免费电影| av一区二区三区| 精品国产麻豆免费人成网站| 亚洲综合免费观看高清完整版在线| 国产精品白丝jk黑袜喷水| 欧美日韩大陆在线| 亚洲精品免费电影| 99精品视频在线免费观看| 2021国产精品久久精品| 日本不卡一二三| 欧美日韩小视频| 亚洲精品亚洲人成人网| youjizz久久| 欧美激情一区不卡| 国产乱码精品一区二区三区忘忧草 | 国产精品人成在线观看免费 | 亚洲精品午夜久久久| 国产精品综合网| 精品欧美黑人一区二区三区| 五月天中文字幕一区二区| 91免费视频观看| 中文字幕在线不卡一区| 成人一道本在线| 国产欧美一区二区精品仙草咪| 麻豆91小视频| 26uuuu精品一区二区| 麻豆精品国产传媒mv男同 | 色域天天综合网| 亚洲日本电影在线| 色综合激情五月| 亚洲综合自拍偷拍| 欧美性受xxxx黑人xyx性爽| 亚洲一区二区三区四区五区中文| 在线亚洲一区观看| 亚洲1区2区3区视频| 欧美日韩国产成人在线免费| 午夜久久久影院| 日韩欧美国产精品| 国产一区999| 国产精品久久久久久久久免费相片 | 亚洲视频 欧洲视频| 91年精品国产| 午夜久久电影网| 日韩你懂的电影在线观看| 国产一区二区三区在线观看精品| 国产色产综合色产在线视频| 成人91在线观看| 一区二区三区免费在线观看| 欧美精品日韩精品| 美国三级日本三级久久99| 久久久亚洲高清| 91麻豆自制传媒国产之光| 午夜精品视频在线观看| 日韩一区二区三区电影在线观看| 精品一区在线看| 国产精品国产三级国产普通话99 | 国产精品的网站| 欧美性videosxxxxx| 免费成人美女在线观看| 国产日韩视频一区二区三区| 色欧美片视频在线观看| 久久国产精品99精品国产| 国产精品无圣光一区二区| 欧美午夜免费电影| 国产伦理精品不卡| 一二三区精品视频| 久久久久久久久久久99999| 91黄色免费网站| 国产一区二区在线免费观看| 亚洲自拍偷拍av| 国产欧美一二三区| 在线不卡中文字幕| 99久久精品国产导航| 日韩va欧美va亚洲va久久| 国产精品第五页| 久久理论电影网| 欧美日本免费一区二区三区| 成人综合在线视频| 美腿丝袜亚洲综合| 一区二区在线电影| 欧美国产一区在线| 欧美不卡一区二区| 欧美区一区二区三区| 99久久国产综合精品麻豆| 精品在线免费观看| 日韩精品视频网站| 亚洲综合视频在线观看| 国产精品嫩草久久久久| 精品久久久久久久久久久久久久久| 91国产成人在线| 91影院在线免费观看| 国产福利一区在线| 青青草国产成人av片免费 | 中文字幕一区日韩精品欧美| 日韩欧美成人一区二区| 欧美日韩国产美女| 一本色道亚洲精品aⅴ| 成人高清伦理免费影院在线观看| 激情综合色播激情啊| 日本不卡高清视频| 亚洲成a人片在线观看中文| 亚洲免费av高清| 亚洲色图欧美偷拍| 国产精品久久久久aaaa| 亚洲国产高清不卡| 欧美极品美女视频| 国产精品青草久久| 国产精品拍天天在线| 国产精品女同一区二区三区| 国产三级精品三级| 国产精品美女www爽爽爽| 国产欧美精品一区二区色综合 | 91精品国产欧美一区二区成人| 在线观看不卡一区| 欧美亚洲愉拍一区二区| 欧美日韩一区二区欧美激情| 欧美日韩视频在线一区二区| 欧美日韩国产在线观看| 欧美精品在线视频| 日韩一级黄色片| 精品国产乱码久久久久久1区2区| 欧美不卡视频一区| 国产日本一区二区| 亚洲欧美在线高清| 亚洲国产日产av| 毛片基地黄久久久久久天堂| 久久99精品网久久| 国产成人精品一区二| 99riav久久精品riav| 欧洲在线/亚洲| 日韩欧美一级二级| 国产人成一区二区三区影院| 综合欧美亚洲日本| 婷婷综合久久一区二区三区| 麻豆成人久久精品二区三区红| 国产一区激情在线| 91老司机福利 在线| 欧美二区三区91| 国产亚洲一区二区三区在线观看| 亚洲欧洲www| 免费高清成人在线| 99精品欧美一区二区三区小说| 欧美色爱综合网| 精品av久久707| 亚洲精品久久久久久国产精华液| 视频在线观看91| 国产激情一区二区三区四区| 色欧美88888久久久久久影院| 69堂成人精品免费视频| 亚洲国产成人一区二区三区| 亚洲一级二级三级在线免费观看| 精品一区二区免费| 欧美在线影院一区二区| 久久综合久久久久88| 亚洲一区二区三区四区中文字幕| 韩日精品视频一区| 欧美日韩性生活| 国产精品国产自产拍高清av王其| 日韩综合在线视频| 99精品久久久久久| 欧美成va人片在线观看| 国产很黄免费观看久久| 欧美亚洲一区二区在线观看| 久久精品网站免费观看| 日本午夜一本久久久综合| 一本到高清视频免费精品| 久久久久成人黄色影片| 日韩精品午夜视频| 一本一道久久a久久精品| 国产日韩欧美激情| 免费一级片91| 欧美日本韩国一区| 亚洲六月丁香色婷婷综合久久 | 久久久久久久久岛国免费| 偷窥少妇高潮呻吟av久久免费| 91影视在线播放| 国产精品天天看| 国产aⅴ精品一区二区三区色成熟| 91精品国产色综合久久| 午夜精品一区二区三区三上悠亚| 91麻豆成人久久精品二区三区| 国产欧美精品在线观看| 国产综合一区二区| 日韩欧美国产1| 九九在线精品视频| 日韩欧美区一区二| 久久国产精品第一页| 日韩一区二区影院| 蜜臀国产一区二区三区在线播放| 欧美精品欧美精品系列| 亚州成人在线电影| 在线观看91精品国产麻豆| 亚洲成在人线在线播放| 欧美日韩免费在线视频| 亚洲一卡二卡三卡四卡五卡| 欧美日本在线一区| 日韩精品电影一区亚洲|