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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? basichtml.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* * @(#)BasicHTML.java	1.22 04/07/23 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import java.io.*;import java.awt.*;import java.net.URL;import javax.swing.*;import javax.swing.text.*;import javax.swing.text.html.*;import com.sun.java.swing.SwingUtilities2;/** * Support for providing html views for the swing components. * This translates a simple html string to a javax.swing.text.View * implementation that can render the html and provide the necessary * layout semantics. * * @author  Timothy Prinzing * @version 1.22 07/23/04 */public class BasicHTML {    /**     * Create an html renderer for the given component and     * string of html.     */    public static View createHTMLView(JComponent c, String html) {	BasicEditorKit kit = getFactory();	Document doc = kit.createDefaultDocument(c.getFont(),                                                 c.getForeground());	Object base = c.getClientProperty(documentBaseKey);	if (base instanceof URL) {	    ((HTMLDocument)doc).setBase((URL)base);	}	Reader r = new StringReader(html);	try {	    kit.read(r, doc, 0);	} catch (Throwable e) {	}	ViewFactory f = kit.getViewFactory();	View hview = f.create(doc.getDefaultRootElement());	View v = new Renderer(c, f, hview);	return v;    }    /**     * Check the given string to see if it should trigger the     * html rendering logic in a non-text component that supports      * html rendering.     */    public static boolean isHTMLString(String s) {	if (s != null) {	    if ((s.length() >= 6) && (s.charAt(0) == '<') && (s.charAt(5) == '>')) {		String tag = s.substring(1,5);		return tag.equalsIgnoreCase(propertyKey);	    }	}	return false;    }    /**     * Stash the HTML render for the given text into the client     * properties of the given JComponent. If the given text is      * <em>NOT HTML</em> the property will be cleared of any     * renderer.     * <p>     * This method is useful for ComponentUI implementations     * that are static (i.e. shared) and get their state     * entirely from the JComponent.     */    public static void updateRenderer(JComponent c, String text) {	View value = null;        View oldValue = (View)c.getClientProperty(BasicHTML.propertyKey);        Boolean htmlDisabled = (Boolean) c.getClientProperty(htmlDisable);	if (htmlDisabled != Boolean.TRUE && BasicHTML.isHTMLString(text)) {	    value = BasicHTML.createHTMLView(c, text);	}        if (value != oldValue && oldValue != null) {            for (int i = 0; i < oldValue.getViewCount(); i++) {                oldValue.getView(i).setParent(null);            }        }	c.putClientProperty(BasicHTML.propertyKey, value);    }    /**     * If this client property of a JComponent is set to Boolean.TRUE     * the component's 'text' property is never treated as HTML.     */    private static final String htmlDisable = "html.disable";    /**     * Key to use for the html renderer when stored as a      * client property of a JComponent.     */    public static final String propertyKey = "html";    /**     * Key stored as a client property to indicate the base that relative     * references are resolved against. For example, lets say you keep     * your images in the directory resources relative to the code path,     * you would use the following the set the base:     * <pre>     *   jComponent.putClientProperty(documentBaseKey,     *                                xxx.class.getResource("resources/"));     * </pre>     */    public static final String documentBaseKey = "html.base";    static BasicEditorKit getFactory() {	if (basicHTMLFactory == null) {            basicHTMLViewFactory = new BasicHTMLViewFactory();	    basicHTMLFactory = new BasicEditorKit();	}	return basicHTMLFactory;    }    /**     * The source of the html renderers     */    private static BasicEditorKit basicHTMLFactory;    /**     * Creates the Views that visually represent the model.     */    private static ViewFactory basicHTMLViewFactory;    /**     * Overrides to the default stylesheet.  Should consider     * just creating a completely fresh stylesheet.     */    private static final String styleChanges =     "p { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0 }" +    "body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0 }";    /**     * The views produced for the ComponentUI implementations aren't     * going to be edited and don't need full html support.  This kit     * alters the HTMLEditorKit to try and trim things down a bit.       * It does the following:     * <ul>     * <li>It doesn't produce Views for things like comments,      * head, title, unknown tags, etc.       * <li>It installs a different set of css settings from the default     * provided by HTMLEditorKit.     * </ul>     */    static class BasicEditorKit extends HTMLEditorKit {	/** Shared base style for all documents created by us use. */	private static StyleSheet defaultStyles;	/**	 * Overriden to return our own slimmed down style sheet.	 */	public StyleSheet getStyleSheet() {	    if (defaultStyles == null) {		defaultStyles = new StyleSheet();		StringReader r = new StringReader(styleChanges);		try {		    defaultStyles.loadRules(r, null);		} catch (Throwable e) {		    // don't want to die in static initialization... 		    // just display things wrong.		}		r.close();		defaultStyles.addStyleSheet(super.getStyleSheet());	    }	    return defaultStyles;	}	/**	 * Sets the async policy to flush everything in one chunk, and	 * to not display unknown tags.	 */        public Document createDefaultDocument(Font defaultFont,                                              Color foreground) {	    StyleSheet styles = getStyleSheet();	    StyleSheet ss = new StyleSheet();	    ss.addStyleSheet(styles);	    BasicDocument doc = new BasicDocument(ss, defaultFont, foreground);	    doc.setAsynchronousLoadPriority(Integer.MAX_VALUE);	    doc.setPreservesUnknownTags(false);	    return doc;	}        /**         * Returns the ViewFactory that is used to make sure the Views don't         * load in the background.         */        public ViewFactory getViewFactory() {            return basicHTMLViewFactory;        }    }    /**     * BasicHTMLViewFactory extends HTMLFactory to force images to be loaded     * synchronously.     */    static class BasicHTMLViewFactory extends HTMLEditorKit.HTMLFactory {        public View create(Element elem) {            View view = super.create(elem);            if (view instanceof ImageView) {                ((ImageView)view).setLoadsSynchronously(true);            }            return view;        }    }    /**     * The subclass of HTMLDocument that is used as the model. getForeground     * is overridden to return the foreground property from the Component this     * was created for.     */    static class BasicDocument extends HTMLDocument {	/** The host, that is where we are rendering. */	// private JComponent host;	BasicDocument(StyleSheet s, Font defaultFont, Color foreground) {	    super(s);	    setPreservesUnknownTags(false);            setFontAndColor(defaultFont, foreground);	}        /**         * Sets the default font and default color. These are set by         * adding a rule for the body that specifies the font and color.         * This allows the html to override these should it wish to have         * a custom font or color.         */	private void setFontAndColor(Font font, Color fg) {            getStyleSheet().addRule(com.sun.java.swing.SwingUtilities2.                                    displayPropertiesToCSS(font,fg));	}    }    /**     * Root text view that acts as an HTML renderer.     */    static class Renderer extends View {        Renderer(JComponent c, ViewFactory f, View v) {            super(null);	    host = c;	    factory = f;	    view = v;	    view.setParent(this);	    // initially layout to the preferred size	    setSize(view.getPreferredSpan(X_AXIS), view.getPreferredSpan(Y_AXIS));        }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成在线播放网站岛国| 欧美精品自拍偷拍| 91浏览器在线视频| 91免费视频大全| 日本高清不卡在线观看| 在线一区二区三区做爰视频网站| 日本韩国一区二区三区视频| 欧美色爱综合网| 欧美一区二区三区免费| 精品国产乱码久久久久久久久 | 久久精品国产精品亚洲红杏| 激情国产一区二区| 高清免费成人av| 日本高清成人免费播放| 欧美一区二视频| 国产婷婷色一区二区三区四区| 国产精品国产三级国产普通话三级| 亚洲天堂免费看| 日韩在线观看一区二区| 亚洲激情综合网| 午夜视频一区二区| 国精产品一区一区三区mba桃花 | 欧美在线影院一区二区| 欧美一级精品在线| 日本一区二区三区久久久久久久久不 | 精品成人一区二区| 亚洲欧美日韩一区二区三区在线观看| 亚洲国产综合人成综合网站| 舔着乳尖日韩一区| 国产a区久久久| 欧美亚洲一区二区在线观看| 精品国产乱码久久久久久图片| 久久亚洲精华国产精华液| 亚洲视频每日更新| 久久精品二区亚洲w码| 成人av手机在线观看| 欧美挠脚心视频网站| 国产欧美一区二区精品仙草咪| 亚洲精品国产无天堂网2021| 麻豆成人在线观看| 91蜜桃在线观看| 91麻豆精品国产91久久久久久久久| 久久人人超碰精品| 一区二区三区**美女毛片| 国产在线精品一区二区三区不卡 | 波多野结衣中文字幕一区| 欧美日韩一级二级三级| 国产欧美日韩中文久久| 亚洲成人动漫在线免费观看| 成人性视频免费网站| 欧美精品在线视频| 《视频一区视频二区| 麻豆一区二区三区| 色狠狠一区二区三区香蕉| wwwwww.欧美系列| 午夜电影久久久| 91论坛在线播放| 国产欧美视频在线观看| 美女脱光内衣内裤视频久久网站| 成人av在线影院| 精品国产乱码久久久久久免费| 亚洲成人福利片| 色系网站成人免费| 91精品国产欧美日韩| 亚洲免费观看视频| 成人高清视频在线观看| 日韩免费看网站| 国产69精品一区二区亚洲孕妇 | 亚洲欧洲国产日本综合| 国产精品一二三在| 欧美精品一区二区三| 爽好多水快深点欧美视频| 色妞www精品视频| 国产欧美日韩在线看| 狠狠色丁香婷婷综合| 日韩欧美电影一区| 日韩国产欧美在线视频| 欧美三级电影在线观看| 亚洲精品久久久久久国产精华液| 国内外成人在线视频| 日韩欧美一区电影| 亚洲成人av一区| 欧美亚一区二区| 亚洲精品v日韩精品| 91在线一区二区| 亚洲欧美综合网| 成人精品一区二区三区中文字幕| 久久麻豆一区二区| 国产一级精品在线| 久久久夜色精品亚洲| 国产麻豆一精品一av一免费 | 成人av网在线| 亚洲另类色综合网站| 欧美日韩午夜在线视频| 蜜桃av噜噜一区二区三区小说| 日韩精品中午字幕| 国产a久久麻豆| 一区二区免费看| 91.麻豆视频| 国内精品伊人久久久久av一坑| 久久久久久97三级| 色网综合在线观看| 免费高清视频精品| 国产女主播视频一区二区| 一本在线高清不卡dvd| 天天做天天摸天天爽国产一区 | 国产精品一区久久久久| 国产精品国产馆在线真实露脸| 一本色道久久综合亚洲aⅴ蜜桃| 午夜影院久久久| 久久久五月婷婷| 日本精品视频一区二区三区| 蜜桃传媒麻豆第一区在线观看| 欧美国产成人在线| 欧美丝袜自拍制服另类| 韩国三级中文字幕hd久久精品| 国产精品国产成人国产三级| 欧美久久久久久久久久| 国产成人免费xxxxxxxx| 亚洲成人tv网| 国内精品免费**视频| 99热精品一区二区| 日本午夜一区二区| 国产欧美日韩激情| 91精品国模一区二区三区| 成人av在线一区二区| 强制捆绑调教一区二区| 中文字幕一区二区三区视频| 日韩三级高清在线| 91在线视频播放| 久久99精品国产麻豆婷婷洗澡| 亚洲另类中文字| 久久精品一区二区三区不卡牛牛| 欧美日韩在线不卡| 成人爽a毛片一区二区免费| 日韩精品高清不卡| 成人免费一区二区三区视频| 日韩欧美自拍偷拍| 色妹子一区二区| 国产99一区视频免费| 毛片av中文字幕一区二区| 亚洲自拍偷拍综合| 国产精品欧美精品| 精品美女在线播放| 欧美二区三区的天堂| 色哟哟亚洲精品| 成人午夜免费av| 美脚の诱脚舐め脚责91| 亚洲成年人影院| 亚洲女与黑人做爰| 国产欧美日本一区视频| 日韩欧美亚洲一区二区| 欧美日韩夫妻久久| 91麻豆swag| 不卡一区二区中文字幕| 国产成人自拍在线| 国产在线精品视频| 麻豆精品在线播放| 日韩精品亚洲一区| 亚洲成人福利片| 一区二区三区中文在线| 亚洲少妇30p| 国产精品色呦呦| 欧美激情一区二区三区| 欧美成人r级一区二区三区| 在线成人小视频| 欧美日韩国产一二三| 在线一区二区观看| 91福利国产成人精品照片| 色综合久久综合中文综合网| 99精品视频在线观看免费| voyeur盗摄精品| 白白色亚洲国产精品| heyzo一本久久综合| 成人av资源网站| 99亚偷拍自图区亚洲| 99免费精品在线| 不卡av在线网| 色综合中文字幕国产 | 精品一二线国产| 久久99精品久久只有精品| 蜜桃一区二区三区四区| 蜜桃视频免费观看一区| 青青草国产精品97视觉盛宴| 首页国产丝袜综合| 日本sm残虐另类| 美国精品在线观看| 国产综合色产在线精品| 久久aⅴ国产欧美74aaa| 精品亚洲aⅴ乱码一区二区三区| 韩国av一区二区三区在线观看| 国产一区二区美女| 国产91清纯白嫩初高中在线观看| 国产成人亚洲精品青草天美| 粉嫩绯色av一区二区在线观看 | 亚洲一区二区三区四区中文字幕| 亚洲女厕所小便bbb| 亚洲第一成人在线| 美国三级日本三级久久99| 国产麻豆午夜三级精品|