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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? paragraphview.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
字號(hào):
/* * @(#)ParagraphView.java	1.29 04/09/14 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.text.html;import java.awt.*;import javax.swing.SizeRequirements;import javax.swing.event.DocumentEvent;import javax.swing.text.Document;import javax.swing.text.Element;import javax.swing.text.AttributeSet;import javax.swing.text.StyleConstants;import javax.swing.text.View;import javax.swing.text.ViewFactory;import javax.swing.text.BadLocationException;import javax.swing.text.JTextComponent;/** * Displays the a paragraph, and uses css attributes for its * configuration. * * @author  Timothy Prinzing * @version 1.29 09/14/04 */public class ParagraphView extends javax.swing.text.ParagraphView {    /**     * Constructs a ParagraphView for the given element.     *     * @param elem the element that this view is responsible for     */    public ParagraphView(Element elem) {	super(elem);    }    /**     * Establishes the parent view for this view.  This is     * guaranteed to be called before any other methods if the     * parent view is functioning properly.     * <p>      * This is implemented     * to forward to the superclass as well as call the     * <a href="#setPropertiesFromAttributes">setPropertiesFromAttributes</a>     * method to set the paragraph properties from the css     * attributes.  The call is made at this time to ensure     * the ability to resolve upward through the parents      * view attributes.     *     * @param parent the new parent, or null if the view is     *  being removed from a parent it was previously added     *  to     */    public void setParent(View parent) {	super.setParent(parent);        if (parent != null) {	    setPropertiesFromAttributes();        }    }    /**     * Fetches the attributes to use when rendering.  This is     * implemented to multiplex the attributes specified in the     * model with a StyleSheet.     */    public AttributeSet getAttributes() {	if (attr == null) {	    StyleSheet sheet = getStyleSheet();	    attr = sheet.getViewAttributes(this);	}	return attr;    }    /**     * Sets up the paragraph from css attributes instead of     * the values found in StyleConstants (i.e. which are used     * by the superclass).  Since     */    protected void setPropertiesFromAttributes() {	StyleSheet sheet = getStyleSheet();	attr = sheet.getViewAttributes(this);	painter = sheet.getBoxPainter(attr);	if (attr != null) {	    super.setPropertiesFromAttributes();	    setInsets((short) painter.getInset(TOP, this),		      (short) painter.getInset(LEFT, this),		      (short) painter.getInset(BOTTOM, this),		      (short) painter.getInset(RIGHT, this));	    Object o = attr.getAttribute(CSS.Attribute.TEXT_ALIGN);	    if (o != null) {		// set horizontal alignment		String ta = o.toString();		if (ta.equals("left")) {		    setJustification(StyleConstants.ALIGN_LEFT);		} else if (ta.equals("center")) {		    setJustification(StyleConstants.ALIGN_CENTER);		} else if (ta.equals("right")) {		    setJustification(StyleConstants.ALIGN_RIGHT);		} else if (ta.equals("justify")) {		    setJustification(StyleConstants.ALIGN_JUSTIFIED);		}	    }            // Get the width/height            cssWidth = (CSS.LengthValue)attr.getAttribute(                                        CSS.Attribute.WIDTH);            cssHeight = (CSS.LengthValue)attr.getAttribute(                                         CSS.Attribute.HEIGHT);	}    }    protected StyleSheet getStyleSheet() {	HTMLDocument doc = (HTMLDocument) getDocument();	return doc.getStyleSheet();    }    /**     * Calculate the needs for the paragraph along the minor axis.     * This implemented to use the requirements of the superclass,     * modified slightly to set a minimum span allowed.  Typical     * html rendering doesn't let the view size shrink smaller than     * the length of the longest word.       */    protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) {	r = super.calculateMinorAxisRequirements(axis, r);        if (!BlockView.spanSetFromAttributes(axis, r, cssWidth, cssHeight)) {            // PENDING(prinz) Need to make this better so it doesn't require            // InlineView and works with font changes within the word.            // find the longest minimum span.            float min = 0;            int n = getLayoutViewCount();            for (int i = 0; i < n; i++) {                View v = getLayoutView(i);                if (v instanceof InlineView) {                    float wordSpan = ((InlineView) v).getLongestWordSpan();                    min = Math.max(wordSpan, min);                } else {                    min = Math.max(v.getMinimumSpan(axis), min);                }            }            r.minimum = Math.max(r.minimum, (int) min);            r.preferred = Math.max(r.minimum,  r.preferred);            r.maximum = Math.max(r.preferred, r.maximum);        }        else {            // Offset by the margins so that pref/min/max return the            // right value.            int margin = (axis == X_AXIS) ? getLeftInset() + getRightInset() :                                            getTopInset() + getBottomInset();            r.minimum -= margin;            r.preferred -= margin;            r.maximum -= margin;        }	return r;    }    /**     * Indicates whether or not this view should be      * displayed.  If none of the children wish to be     * displayed and the only visible child is the      * break that ends the paragraph, the paragraph     * will not be considered visible.  Otherwise,     * it will be considered visible and return true.     *      * @return true if the paragraph should be displayed     */    public boolean isVisible() {		int n = getLayoutViewCount() - 1;	for (int i = 0; i < n; i++) {	    View v = getLayoutView(i);	    if (v.isVisible()) {		return true;	    }	}	if (n > 0) {	    View v = getLayoutView(n);	    if ((v.getEndOffset() - v.getStartOffset()) == 1) {		return false;	    }	}	// If it's the last paragraph and not editable, it shouldn't	// be visible.	if (getStartOffset() == getDocument().getLength()) {	    boolean editable = false;	    Component c = getContainer();	    if (c instanceof JTextComponent) {		editable = ((JTextComponent)c).isEditable();	    }	    if (!editable) {		return false;	    }	}	return true;    }    /**     * Renders using the given rendering surface and area on that     * surface.  This is implemented to delgate to the superclass     * after stashing the base coordinate for tab calculations.     *     * @param g the rendering surface to use     * @param a the allocated region to render into     * @see View#paint     */    public void paint(Graphics g, Shape a) {        if (a == null) {            return;        }	Rectangle r;	if (a instanceof Rectangle) {	    r = (Rectangle) a;	} else {	    r = a.getBounds();	}	painter.paint(g, r.x, r.y, r.width, r.height, this);        super.paint(g, a);    }    /**     * Determines the preferred span for this view.  Returns     * 0 if the view is not visible, otherwise it calls the     * superclass method to get the preferred span.     * axis.     *     * @param axis may be either View.X_AXIS or View.Y_AXIS     * @return   the span the view would like to be rendered into;     *           typically the view is told to render into the span     *           that is returned, although there is no guarantee;     *           the parent may choose to resize or break the view     * @see javax.swing.text.ParagraphView#getPreferredSpan     */    public float getPreferredSpan(int axis) {	if (!isVisible()) {	    return 0;	}	return super.getPreferredSpan(axis);    }    /**     * Determines the minimum span for this view along an     * axis.  Returns 0 if the view is not visible, otherwise      * it calls the superclass method to get the minimum span.     *     * @param axis may be either <code>View.X_AXIS</code> or      *	<code>View.Y_AXIS</code>     * @return  the minimum span the view can be rendered into     * @see javax.swing.text.ParagraphView#getMinimumSpan     */    public float getMinimumSpan(int axis) {	if (!isVisible()) {	    return 0;	}	return super.getMinimumSpan(axis);    }    /**     * Determines the maximum span for this view along an     * axis.  Returns 0 if the view is not visible, otherwise     * it calls the superclass method ot get the maximum span.     *     * @param axis may be either <code>View.X_AXIS</code> or      *	<code>View.Y_AXIS</code>     * @return  the maximum span the view can be rendered into     * @see javax.swing.text.ParagraphView#getMaximumSpan     */    public float getMaximumSpan(int axis) {	if (!isVisible()) {	    return 0;	}	return super.getMaximumSpan(axis);    }    private AttributeSet attr;    private StyleSheet.BoxPainter painter;    private CSS.LengthValue cssWidth;    private CSS.LengthValue cssHeight;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕在线观看不卡| 亚洲视频网在线直播| 99热精品一区二区| 青青草97国产精品免费观看无弹窗版| 日韩视频在线你懂得| 91福利国产精品| 成人午夜激情视频| 另类中文字幕网| 亚洲成人免费影院| 亚洲欧美色综合| 国产精品福利一区二区三区| 精品国产乱码久久久久久1区2区| 日本大香伊一区二区三区| 国产成人午夜片在线观看高清观看| 日本伊人精品一区二区三区观看方式 | 美日韩一区二区| 亚洲综合小说图片| 亚洲人成在线播放网站岛国| 久久久av毛片精品| 日韩欧美国产综合| 4hu四虎永久在线影院成人| 色94色欧美sute亚洲线路一久 | 国产一区二区精品久久99| 天天操天天色综合| 亚洲国产人成综合网站| 最新热久久免费视频| 欧美极品xxx| 久久久久久久久久久久久女国产乱 | 中文字幕国产一区二区| 久久嫩草精品久久久精品| 日韩欧美成人一区| 日韩精品一区二区三区swag | 欧美在线观看视频在线| 99国产欧美久久久精品| 成人h动漫精品| 成人免费视频免费观看| 成人精品一区二区三区四区| 国产成人精品亚洲777人妖| 国产盗摄女厕一区二区三区| 国产成人精品一区二| 大白屁股一区二区视频| 粗大黑人巨茎大战欧美成人| 成人性生交大片免费| 99re这里只有精品首页| 91在线码无精品| 欧洲激情一区二区| 欧美日韩视频一区二区| 欧美精品丝袜久久久中文字幕| 欧美日韩你懂的| 欧美一级高清大全免费观看| 日韩欧美国产电影| 久久久国产精品麻豆| 日本一区二区三区在线不卡| 国产精品久久久久一区| 亚洲美女一区二区三区| 一区二区三区欧美在线观看| 偷窥少妇高潮呻吟av久久免费| 视频一区二区中文字幕| 国内一区二区在线| 91一区一区三区| 欧美日韩精品一区二区三区| 日韩欧美国产高清| 国产精品久久久久久久久久久免费看| 国产精品久久综合| 亚洲国产精品久久久久婷婷884| 午夜久久福利影院| 精品一区二区三区欧美| 成人午夜视频福利| 欧美三区免费完整视频在线观看| 欧美男同性恋视频网站| 欧美不卡一区二区三区| 中国色在线观看另类| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲自拍偷拍av| 国内精品在线播放| 色偷偷久久人人79超碰人人澡| 91精品国产综合久久小美女| 久久精品亚洲精品国产欧美kt∨| 国产精品久久久久aaaa樱花| 亚洲va欧美va人人爽午夜| 精品一二三四在线| 欧美综合视频在线观看| 精品99久久久久久| 有坂深雪av一区二区精品| 久久精品国产一区二区三 | 亚洲欧美区自拍先锋| 日韩成人精品在线| 波多野结衣视频一区| 欧美一级生活片| 亚洲三级免费观看| 久久精品999| 在线免费观看视频一区| 久久久久成人黄色影片| 天堂在线一区二区| 北条麻妃一区二区三区| 日韩一级免费观看| 亚洲欧美日韩国产手机在线 | 免费在线观看一区二区三区| 成人sese在线| 26uuu精品一区二区三区四区在线| 亚洲美女淫视频| 国产成人亚洲综合色影视| 欧美日高清视频| 亚洲日本中文字幕区| 国产在线不卡一区| 欧美日韩精品一区二区三区| 亚洲蜜桃精久久久久久久| 国产成人综合自拍| 日韩欧美一区二区久久婷婷| 亚洲高清视频在线| 99久久精品国产精品久久| 久久精品欧美一区二区三区麻豆| 香蕉久久夜色精品国产使用方法| 91丨九色丨蝌蚪富婆spa| 国产农村妇女精品| 精品影视av免费| 日韩欧美一区在线| 五月婷婷综合网| 欧美专区亚洲专区| 亚洲免费看黄网站| 成人精品免费网站| 国产女主播一区| 国产精品中文字幕欧美| 精品欧美一区二区在线观看| 日本中文字幕不卡| 欧美一区二区三区视频在线观看| 午夜欧美在线一二页| 在线日韩国产精品| 一区二区在线观看不卡| 91视频在线观看| 中文字幕精品综合| a在线欧美一区| 自拍视频在线观看一区二区| 成人avav在线| 一区精品在线播放| 99热精品国产| 亚洲一区二区三区四区在线免费观看| 日本高清不卡aⅴ免费网站| 一区二区国产盗摄色噜噜| 欧美亚洲动漫精品| 亚洲一区欧美一区| 欧美日韩免费观看一区二区三区| 亚洲一区在线观看免费观看电影高清| 在线观看国产一区二区| 亚洲444eee在线观看| 91精品国产aⅴ一区二区| 麻豆精品久久精品色综合| 欧美精品一区二区三区一线天视频 | 亚洲视频一区二区免费在线观看| 99精品欧美一区二区蜜桃免费| 亚洲人亚洲人成电影网站色| 91久久免费观看| 亚洲综合无码一区二区| 91精品国产综合久久福利软件| 免费观看91视频大全| 国产午夜亚洲精品午夜鲁丝片| 高清在线不卡av| 亚洲伦理在线精品| 欧美视频三区在线播放| 美女久久久精品| 国产三级三级三级精品8ⅰ区| 成人精品免费网站| 亚洲r级在线视频| 久久色在线视频| 91麻豆视频网站| 日韩av一区二区在线影视| 久久综合久久综合九色| 99久久精品国产网站| 婷婷一区二区三区| 国产性做久久久久久| 在线一区二区三区四区五区 | 成人午夜伦理影院| 亚洲小说欧美激情另类| 26uuu精品一区二区三区四区在线| 成人av网址在线观看| 天天爽夜夜爽夜夜爽精品视频| 久久蜜桃香蕉精品一区二区三区| 91偷拍与自偷拍精品| 美日韩一区二区三区| 亚洲欧美综合网| 欧美一区永久视频免费观看| 国产精品一区二区三区乱码| 亚洲一卡二卡三卡四卡| 久久久久久久久伊人| 欧美性猛交一区二区三区精品| 国产综合久久久久久鬼色| 亚洲国产精品久久久久秋霞影院| 久久久午夜电影| 欧美日韩国产综合草草| 粉嫩嫩av羞羞动漫久久久| 亚洲va国产天堂va久久en| 国产精品嫩草久久久久| 日韩午夜激情电影| 欧美优质美女网站| 成人午夜在线播放| 久久99精品久久久久| 亚洲永久精品国产| 中文字幕色av一区二区三区| 精品久久国产老人久久综合| 欧美中文字幕一区二区三区亚洲|