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

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

?? basictextui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
    /**     * Paints the interface.  This is routed to the     * paintSafely method under the guarantee that     * the model won't change from the view of this thread     * while it's rendering (if the associated model is     * derived from AbstractDocument).  This enables the      * model to potentially be updated asynchronously.     *     * @param g the graphics context     * @param c the editor component     */    public final void paint(Graphics g, JComponent c) {	if ((rootView.getViewCount() > 0) && (rootView.getView(0) != null)) {	    Document doc = editor.getDocument();	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readLock();	    }	    try {		paintSafely(g);	    } finally {		if (doc instanceof AbstractDocument) {		    ((AbstractDocument)doc).readUnlock();		}	    }	}    }    /**     * Gets the preferred size for the editor component.  If the component     * has been given a size prior to receiving this request, it will     * set the size of the view hierarchy to reflect the size of the component     * before requesting the preferred size of the view hierarchy.  This     * allows formatted views to format to the current component size before     * answering the request.  Other views don't care about currently formatted     * size and give the same answer either way.     *     * @param c the editor component     * @return the size     */    public Dimension getPreferredSize(JComponent c) {	Document doc = editor.getDocument();	Insets i = c.getInsets();	Dimension d = c.getSize();	if (doc instanceof AbstractDocument) {	    ((AbstractDocument)doc).readLock();	}	try {	    if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) {		rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom);	    }            else if (d.width == 0 && d.height == 0) {                // Probably haven't been layed out yet, force some sort of                // initial sizing.                rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);            }	    d.width = (int) Math.min((long) rootView.getPreferredSpan(View.X_AXIS) +				     (long) i.left + (long) i.right, Integer.MAX_VALUE);	    d.height = (int) Math.min((long) rootView.getPreferredSpan(View.Y_AXIS) +				      (long) i.top + (long) i.bottom, Integer.MAX_VALUE);	} finally {	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readUnlock();	    }	}	return d;    }    /**     * Gets the minimum size for the editor component.     *     * @param c the editor component     * @return the size     */    public Dimension getMinimumSize(JComponent c) {	Document doc = editor.getDocument();        Insets i = c.getInsets();	Dimension d = new Dimension();	if (doc instanceof AbstractDocument) {	    ((AbstractDocument)doc).readLock();	}	try {	    d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right;	    d.height = (int)  rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom;	} finally {	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readUnlock();	    }	}        return d;    }    /**     * Gets the maximum size for the editor component.     *     * @param c the editor component     * @return the size     */    public Dimension getMaximumSize(JComponent c) {	Document doc = editor.getDocument();        Insets i = c.getInsets();	Dimension d = new Dimension();	if (doc instanceof AbstractDocument) {	    ((AbstractDocument)doc).readLock();	}	try {	    d.width = (int) Math.min((long) rootView.getMaximumSpan(View.X_AXIS) + 				     (long) i.left + (long) i.right, Integer.MAX_VALUE);	    d.height = (int) Math.min((long) rootView.getMaximumSpan(View.Y_AXIS) + 				      (long) i.top + (long) i.bottom, Integer.MAX_VALUE);	} finally {	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readUnlock();	    }	}        return d;    }    // ---- TextUI methods -------------------------------------------    /**     * Gets the allocation to give the root View.  Due     * to an unfortunate set of historical events this      * method is inappropriately named.  The Rectangle     * returned has nothing to do with visibility.       * The component must have a non-zero positive size for      * this translation to be computed.     *     * @return the bounding box for the root view     */    protected Rectangle getVisibleEditorRect() {	Rectangle alloc = editor.getBounds();	if ((alloc.width > 0) && (alloc.height > 0)) {	    alloc.x = alloc.y = 0;	    Insets insets = editor.getInsets();	    alloc.x += insets.left;	    alloc.y += insets.top;	    alloc.width -= insets.left + insets.right;	    alloc.height -= insets.top + insets.bottom;	    return alloc;	}	return null;    }    /**     * Converts the given location in the model to a place in     * the view coordinate system.     * The component must have a non-zero positive size for      * this translation to be computed.     *     * @param tc the text component for which this UI is installed     * @param pos the local location in the model to translate >= 0     * @return the coordinates as a rectangle, null if the model is not painted     * @exception BadLocationException  if the given position does not     *   represent a valid location in the associated document     * @see TextUI#modelToView     */    public Rectangle modelToView(JTextComponent tc, int pos) throws BadLocationException {	return modelToView(tc, pos, Position.Bias.Forward);    }    /**     * Converts the given location in the model to a place in     * the view coordinate system.     * The component must have a non-zero positive size for      * this translation to be computed.     *     * @param tc the text component for which this UI is installed     * @param pos the local location in the model to translate >= 0     * @return the coordinates as a rectangle, null if the model is not painted     * @exception BadLocationException  if the given position does not     *   represent a valid location in the associated document     * @see TextUI#modelToView     */    public Rectangle modelToView(JTextComponent tc, int pos, Position.Bias bias) throws BadLocationException {	Document doc = editor.getDocument();	if (doc instanceof AbstractDocument) {	    ((AbstractDocument)doc).readLock();	}	try {	    Rectangle alloc = getVisibleEditorRect();	    if (alloc != null) {		rootView.setSize(alloc.width, alloc.height);		Shape s = rootView.modelToView(pos, alloc, bias);		if (s != null) {		  return s.getBounds();		}	    }	} finally {	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readUnlock();	    }	}	return null;    }    /**     * Converts the given place in the view coordinate system     * to the nearest representative location in the model.     * The component must have a non-zero positive size for      * this translation to be computed.     *     * @param tc the text component for which this UI is installed     * @param pt the location in the view to translate.  This     *  should be in the same coordinate system as the mouse events.     * @return the offset from the start of the document >= 0,     *   -1 if not painted     * @see TextUI#viewToModel     */    public int viewToModel(JTextComponent tc, Point pt) {	return viewToModel(tc, pt, discardBias);    }    /**     * Converts the given place in the view coordinate system     * to the nearest representative location in the model.     * The component must have a non-zero positive size for      * this translation to be computed.     *     * @param tc the text component for which this UI is installed     * @param pt the location in the view to translate.  This     *  should be in the same coordinate system as the mouse events.     * @return the offset from the start of the document >= 0,     *   -1 if the component doesn't yet have a positive size.     * @see TextUI#viewToModel     */    public int viewToModel(JTextComponent tc, Point pt,			   Position.Bias[] biasReturn) {	int offs = -1;	Document doc = editor.getDocument();	if (doc instanceof AbstractDocument) {	    ((AbstractDocument)doc).readLock();	}	try {	    Rectangle alloc = getVisibleEditorRect();	    if (alloc != null) {		rootView.setSize(alloc.width, alloc.height);		offs = rootView.viewToModel(pt.x, pt.y, alloc, biasReturn);	    }	} finally {	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readUnlock();	    }	}        return offs;    }    /**     * Provides a way to determine the next visually represented model      * location that one might place a caret.  Some views may not be visible,     * they might not be in the same order found in the model, or they just     * might not allow access to some of the locations in the model.     *     * @param pos the position to convert >= 0     * @param a the allocated region to render into     * @param direction the direction from the current position that can     *  be thought of as the arrow keys typically found on a keyboard.     *  This may be SwingConstants.WEST, SwingConstants.EAST,      *  SwingConstants.NORTH, or SwingConstants.SOUTH.       * @return the location within the model that best represents the next     *  location visual position.     * @exception BadLocationException     * @exception IllegalArgumentException for an invalid direction     */    public int getNextVisualPositionFrom(JTextComponent t, int pos,		    Position.Bias b, int direction, Position.Bias[] biasRet)	            throws BadLocationException{	Document doc = editor.getDocument();	if (doc instanceof AbstractDocument) {	    ((AbstractDocument)doc).readLock();	}	try {	    if (painted) {		Rectangle alloc = getVisibleEditorRect();                if (alloc != null) {                    rootView.setSize(alloc.width, alloc.height);                }		return rootView.getNextVisualPositionFrom(pos, b, alloc, direction,							  biasRet);	    }	} finally {	    if (doc instanceof AbstractDocument) {		((AbstractDocument)doc).readUnlock();	    }	}	return -1;    }    /**     * Causes the portion of the view responsible for the     * given part of the model to be repainted.  Does nothing if     * the view is not currently painted.     *     * @param tc the text component for which this UI is installed     * @param p0 the beginning of the range >= 0     * @param p1 the end of the range >= p0     * @see TextUI#damageRange     */    public void damageRange(JTextComponent tc, int p0, int p1) {	damageRange(tc, p0, p1, Position.Bias.Forward, Position.Bias.Backward);    }    /**     * Causes the portion of the view responsible for the      * given part of the model to be repainted.     *     * @param p0 the beginning of the range >= 0     * @param p1 the end of the range >= p0     */    public void damageRange(JTextComponent t, int p0, int p1,			    Position.Bias p0Bias, Position.Bias p1Bias) {        if (painted) {            Rectangle alloc = getVisibleEditorRect();            if (alloc != null) {                Document doc = t.getDocument();                if (doc instanceof AbstractDocument) {                    ((AbstractDocument)doc).readLock();                }                try {                    rootView.setSize(alloc.width, alloc.height);                    Shape toDamage = rootView.modelToView(p0, p0Bias,                            p1, p1Bias, alloc);                    Rectangle rect = (toDamage instanceof Rectangle) ?                            (Rectangle)toDamage : toDamage.getBounds();                    editor.repaint(rect.x, rect.y, rect.width, rect.height);                } catch (BadLocationException e) {                } finally {                    if (doc instanceof AbstractDocument) {                        ((AbstractDocument)doc).readUnlock();                    }                }            }        }    }    /**     * Fetches the EditorKit for the UI.     *     * @param tc the text component for which this UI is installed     * @return the editor capabilities     * @see TextUI#getEditorKit     */    public EditorKit getEditorKit(JTextComponent tc) {        return defaultKit;    }    /**     * Fetches a View with the allocation of the associated      * text component (i.e. the root of the hierarchy) that      * can be traversed to determine how the model is being     * represented spatially.     * <p>     * <font color=red><b>NOTE:</b>The View hierarchy can     * be traversed from the root view, and other things     * can be done as well.  Things done in this way cannot     * be protected like simple method calls through the TextUI.     * Therefore, proper operation in the presence of concurrency     * must be arranged by any logic that calls this method!     * </font>     *     * @param tc the text component for which this UI is installed     * @return the view     * @see TextUI#getRootView     */    public View getRootView(JTextComponent tc) {        return rootView;    }    /**     * Returns the string to be used as the tooltip at the passed in location.     * This forwards the method onto the root View.     *     * @see javax.swing.text.JTextComponent#getToolTipText     * @see javax.swing.text.View#getToolTipText     * @since 1.4     */    public String getToolTipText(JTextComponent t, Point pt) {        if (!painted) {            return null;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产成人av| 欧美日韩免费一区二区三区视频| 91色九色蝌蚪| 日韩一区国产二区欧美三区| 国产精品免费丝袜| 久久精品99国产精品日本| 91亚洲国产成人精品一区二区三 | 久久久久国产精品麻豆ai换脸| 国产精品国产三级国产普通话99 | 日韩精品一区二区三区中文精品| 国产精品乱码久久久久久| 日本不卡一二三| 欧美日韩免费一区二区三区视频| 中文字幕一区二区三中文字幕| 精油按摩中文字幕久久| 欧美日韩高清在线| 亚洲高清一区二区三区| 色老汉一区二区三区| 国产精品卡一卡二卡三| 国产传媒日韩欧美成人| 精品av综合导航| 精品在线播放午夜| 欧美不卡一区二区| 九色|91porny| 久久久美女毛片| 高清beeg欧美| 国产精品久久毛片| 国产成人鲁色资源国产91色综 | 国产精品情趣视频| 国产精品一区不卡| 久久综合久久综合久久综合| 九九热在线视频观看这里只有精品| 日韩一区二区三区在线| 视频一区二区欧美| 欧美一级欧美三级| 激情图片小说一区| 欧美激情综合五月色丁香小说| 国产精品99久久久久久有的能看| 精品国产乱码久久久久久浪潮 | 麻豆国产精品官网| 欧美成人高清电影在线| 精品在线观看免费| 日本一区二区三区免费乱视频| 国产成人综合视频| 亚洲色图制服诱惑| 欧美浪妇xxxx高跟鞋交| 日韩av电影天堂| 欧美精品一区二区三区久久久| 国产mv日韩mv欧美| 一级做a爱片久久| 日韩视频免费直播| 成人免费毛片aaaaa**| 亚洲青青青在线视频| 欧美日韩国产一级片| 九色|91porny| 亚洲欧美日韩人成在线播放| 欧美日韩一区三区四区| 极品美女销魂一区二区三区| 国产欧美日韩三级| 欧美日韩免费一区二区三区| 免费看欧美女人艹b| 亚洲国产成人午夜在线一区| 欧美在线影院一区二区| 精品制服美女久久| 亚洲色图色小说| 日韩午夜在线播放| 91麻豆福利精品推荐| 青青草伊人久久| 中文字幕日韩一区| 日韩精品一区国产麻豆| 色香蕉久久蜜桃| 久久国产精品一区二区| 亚洲情趣在线观看| 久久久久国产精品麻豆| 欧美探花视频资源| 高清成人免费视频| 日本强好片久久久久久aaa| 中文在线一区二区| 日韩三级高清在线| 欧美天堂一区二区三区| 国产98色在线|日韩| 首页欧美精品中文字幕| 国产精品久久久久毛片软件| 日韩亚洲欧美一区| 91黄色激情网站| 成人精品鲁一区一区二区| 爽爽淫人综合网网站| 亚洲视频每日更新| 国产欧美日韩三级| 26uuu国产日韩综合| 555夜色666亚洲国产免| 色综合中文字幕国产 | 一区在线观看免费| 欧美videossexotv100| 欧美三级在线播放| 91在线看国产| 国产麻豆精品在线观看| 午夜天堂影视香蕉久久| 最新热久久免费视频| 久久天天做天天爱综合色| 日韩视频在线你懂得| 欧美天天综合网| 一本大道久久精品懂色aⅴ| 国产激情偷乱视频一区二区三区| 日本sm残虐另类| 日韩电影免费一区| 日韩1区2区3区| 日本不卡一区二区| 视频一区在线视频| 国产一区高清在线| 国产综合久久久久久久久久久久| 日本在线不卡一区| 男女性色大片免费观看一区二区 | 1区2区3区欧美| 中文字幕在线不卡视频| 欧美国产日本视频| 国产精品免费丝袜| 亚洲日本一区二区| 夜夜精品视频一区二区| 亚洲午夜在线电影| 日本视频一区二区| 蜜桃久久精品一区二区| 激情欧美一区二区三区在线观看| 狠狠色综合色综合网络| 国产呦萝稀缺另类资源| 成人黄色综合网站| 色呦呦国产精品| 在线观看成人小视频| 欧美精品色综合| 日韩视频在线观看一区二区| 精品国产露脸精彩对白| 国产亚洲一区二区三区四区 | 国产91精品久久久久久久网曝门| 国产一区二区在线观看视频| 国产原创一区二区| 99久久久久免费精品国产| 在线观看成人小视频| 777午夜精品视频在线播放| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 亚洲精品少妇30p| 亚洲成av人片在线| 韩国v欧美v亚洲v日本v| 成人免费毛片app| 欧美三区在线观看| 久久久亚洲国产美女国产盗摄 | 麻豆久久久久久久| 91精品午夜视频| 精品91自产拍在线观看一区| 日本一区二区综合亚洲| 亚洲免费视频中文字幕| 麻豆久久一区二区| 91丨porny丨最新| 3751色影院一区二区三区| 国产精品网曝门| 日韩高清一区在线| 不卡一区二区三区四区| 欧美日韩高清在线| 国产精品电影一区二区| 麻豆高清免费国产一区| 91精品91久久久中77777| 久久一留热品黄| 亚洲国产日产av| 成人亚洲一区二区一| 日韩一区二区在线看| 一区二区三区日本| 国产精品中文字幕欧美| 欧美剧情电影在线观看完整版免费励志电影 | 精品视频一区三区九区| 国产午夜精品一区二区 | 亚洲欧美日韩久久| 美女精品自拍一二三四| 91在线看国产| 国产欧美精品一区| 奇米精品一区二区三区四区| 99久久国产综合精品色伊| 精品国产一区二区亚洲人成毛片| 一区二区理论电影在线观看| 成人午夜免费视频| 久久―日本道色综合久久| 日本系列欧美系列| 色激情天天射综合网| 欧美经典一区二区| 国产一区二区成人久久免费影院| 欧美剧在线免费观看网站| 亚洲一卡二卡三卡四卡| 色综合天天综合网天天看片| 国产精品视频免费| 国产乱码精品一品二品| 欧美成人a视频| 美国精品在线观看| 日韩欧美三级在线| 蜜乳av一区二区三区| 91麻豆精品国产91久久久使用方法| 亚洲精品va在线观看| 91亚洲精品久久久蜜桃| 亚洲精品久久嫩草网站秘色| 97精品电影院| 亚洲黄一区二区三区| 色拍拍在线精品视频8848| 一区二区三区丝袜|