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

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

?? htmleditorkit.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
				    HTML.Tag alternateParentTag,				    HTML.Tag alternateAddTag,				    boolean adjustSelection) {	    super(name);	    this.html = html;	    this.parentTag = parentTag;	    this.addTag = addTag;	    this.alternateParentTag = alternateParentTag;	    this.alternateAddTag = alternateAddTag;	    this.adjustSelection = adjustSelection;	}	/**	 * A cover for HTMLEditorKit.insertHTML. If an exception it	 * thrown it is wrapped in a RuntimeException and thrown.	 */	protected void insertHTML(JEditorPane editor, HTMLDocument doc,				  int offset, String html, int popDepth,				  int pushDepth, HTML.Tag addTag) {	    try {		getHTMLEditorKit(editor).insertHTML(doc, offset, html,						    popDepth, pushDepth,						    addTag);	    } catch (IOException ioe) {		throw new RuntimeException("Unable to insert: " + ioe);	    } catch (BadLocationException ble) {		throw new RuntimeException("Unable to insert: " + ble);	    }	}	/**	 * This is invoked when inserting at a boundary. It determines	 * the number of pops, and then the number of pushes that need	 * to be performed, and then invokes insertHTML.	 * @since 1.3	 */	protected void insertAtBoundary(JEditorPane editor, HTMLDocument doc,					int offset, Element insertElement,					String html, HTML.Tag parentTag,					HTML.Tag addTag) {	    insertAtBoundry(editor, doc, offset, insertElement, html,			    parentTag, addTag);	}	/**	 * This is invoked when inserting at a boundary. It determines	 * the number of pops, and then the number of pushes that need	 * to be performed, and then invokes insertHTML.	 * @deprecated As of Java 2 platform v1.3, use insertAtBoundary	 */        @Deprecated	protected void insertAtBoundry(JEditorPane editor, HTMLDocument doc,				       int offset, Element insertElement,				       String html, HTML.Tag parentTag,				       HTML.Tag addTag) {	    // Find the common parent.	    Element e;	    Element commonParent;	    boolean isFirst = (offset == 0);	    if (offset > 0 || insertElement == null) {		e = doc.getDefaultRootElement();		while (e != null && e.getStartOffset() != offset &&		       !e.isLeaf()) {		    e = e.getElement(e.getElementIndex(offset));		}		commonParent = (e != null) ? e.getParentElement() : null;	    }	    else {		// If inserting at the origin, the common parent is the		// insertElement.		commonParent = insertElement;	    }	    if (commonParent != null) {		// Determine how many pops to do.		int pops = 0;		int pushes = 0;		if (isFirst && insertElement != null) {		    e = commonParent;		    while (e != null && !e.isLeaf()) {			e = e.getElement(e.getElementIndex(offset));			pops++;		    }		}		else {		    e = commonParent;		    offset--;		    while (e != null && !e.isLeaf()) {			e = e.getElement(e.getElementIndex(offset));			pops++;		    }		    // And how many pushes		    e = commonParent;		    offset++;		    while (e != null && e != insertElement) {			e = e.getElement(e.getElementIndex(offset));			pushes++;		    }		}		pops = Math.max(0, pops - 1);		// And insert!		insertHTML(editor, doc, offset, html, pops, pushes, addTag);	    }	}	/**	 * If there is an Element with name <code>tag</code> at	 * <code>offset</code>, this will invoke either insertAtBoundary	 * or <code>insertHTML</code>. This returns true if there is	 * a match, and one of the inserts is invoked.	 */	/*protected*/	boolean insertIntoTag(JEditorPane editor, HTMLDocument doc,			      int offset, HTML.Tag tag, HTML.Tag addTag) {	    Element e = findElementMatchingTag(doc, offset, tag);	    if (e != null && e.getStartOffset() == offset) {		insertAtBoundary(editor, doc, offset, e, html,				 tag, addTag);		return true;	    }	    else if (offset > 0) {		int depth = elementCountToTag(doc, offset - 1, tag);		if (depth != -1) {		    insertHTML(editor, doc, offset, html, depth, 0, addTag);		    return true;		}	    }	    return false;	}	/**	 * Called after an insertion to adjust the selection.	 */	/* protected */	void adjustSelection(JEditorPane pane, HTMLDocument doc, 			     int startOffset, int oldLength) {	    int newLength = doc.getLength();	    if (newLength != oldLength && startOffset < newLength) {		if (startOffset > 0) {		    String text;		    try {			text = doc.getText(startOffset - 1, 1);		    } catch (BadLocationException ble) {			text = null;		    }		    if (text != null && text.length() > 0 &&			text.charAt(0) == '\n') {			pane.select(startOffset, startOffset);		    }		    else {			pane.select(startOffset + 1, startOffset + 1);		    }		}		else {		    pane.select(1, 1);		}	    }	}        /**         * Inserts the HTML into the document.         *         * @param ae the event         */        public void actionPerformed(ActionEvent ae) {	    JEditorPane editor = getEditor(ae);	    if (editor != null) {		HTMLDocument doc = getHTMLDocument(editor);		int offset = editor.getSelectionStart();		int length = doc.getLength();		boolean inserted;		// Try first choice		if (!insertIntoTag(editor, doc, offset, parentTag, addTag) &&		    alternateParentTag != null) {		    // Then alternate.		    inserted = insertIntoTag(editor, doc, offset,					     alternateParentTag,					     alternateAddTag);		}		else {		    inserted = true;		}		if (adjustSelection && inserted) {		    adjustSelection(editor, doc, offset, length);		}	    }	}	/** HTML to insert. */	protected String html;	/** Tag to check for in the document. */	protected HTML.Tag parentTag;	/** Tag in HTML to start adding tags from. */	protected HTML.Tag addTag;	/** Alternate Tag to check for in the document if parentTag is	 * not found. */	protected HTML.Tag alternateParentTag;	/** Alternate tag in HTML to start adding tags from if parentTag	 * is not found and alternateParentTag is found. */	protected HTML.Tag alternateAddTag;	/** True indicates the selection should be adjusted after an insert. */	boolean adjustSelection;    }    /**     * InsertHRAction is special, at actionPerformed time it will determine     * the parent HTML.Tag based on the paragraph element at the selection     * start.     */    static class InsertHRAction extends InsertHTMLTextAction {	InsertHRAction() {	    super("InsertHR", "<hr>", null, HTML.Tag.IMPLIED, null, null,		  false);	}        /**         * Inserts the HTML into the document.         *         * @param ae the event         */        public void actionPerformed(ActionEvent ae) {	    JEditorPane editor = getEditor(ae);	    if (editor != null) {		HTMLDocument doc = getHTMLDocument(editor);		int offset = editor.getSelectionStart();		Element paragraph = doc.getParagraphElement(offset);		if (paragraph.getParentElement() != null) {		    parentTag = (HTML.Tag)paragraph.getParentElement().		                  getAttributes().getAttribute		                  (StyleConstants.NameAttribute);		    super.actionPerformed(ae);		}	    }	}	    }    /*     * Returns the object in an AttributeSet matching a key     */    static private Object getAttrValue(AttributeSet attr, HTML.Attribute key) {	Enumeration names = attr.getAttributeNames();	while (names.hasMoreElements()) {	    Object nextKey = names.nextElement();	    Object nextVal = attr.getAttribute(nextKey);	    if (nextVal instanceof AttributeSet) {		Object value = getAttrValue((AttributeSet)nextVal, key);		if (value != null) {		    return value;		}	    } else if (nextKey == key) {		return nextVal;	    }		}	return null;    }    /*     * Action to move the focus on the next or previous hypertext link      * or object. TODO: This method relies on support from the      * javax.accessibility package.  The text package should support     * keyboard navigation of text elements directly.     */    static class NavigateLinkAction extends TextAction         implements CaretListener {	private static int prevHypertextOffset = -1;	private static boolean foundLink = false;	private FocusHighlightPainter focusPainter =	    new FocusHighlightPainter(null);	private Object selectionTag;	private boolean focusBack = false;        /*         * Create this action with the appropriate identifier.          */        public NavigateLinkAction(String actionName) {            super(actionName);	    if ("previous-link-action".equals(actionName)) {		focusBack = true;	    }        }		/**	 * Called when the caret position is updated.	 *	 * @param e the caret event	 */	public void caretUpdate(CaretEvent e) {	    if (foundLink) {		foundLink = false;		// TODO: The AccessibleContext for the editor should register		// as a listener for CaretEvents and forward the events to		// assistive technologies listening for such events.		Object src = e.getSource();		if (src instanceof JTextComponent) {		    ((JTextComponent)src).getAccessibleContext().firePropertyChange(                        AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET,		        new Integer(prevHypertextOffset),		        new Integer(e.getDot()));		}	    }	}        /*	 * The operation to perform when this action is triggered. 	 */        public void actionPerformed(ActionEvent e) {            JTextComponent comp = getTextComponent(e);	    if (comp == null || comp.isEditable()) {		return;	    }	    Document doc = comp.getDocument();	    if (doc == null) {		return;	    }	    // TODO: Should start successive iterations from the	    // current caret position.	    ElementIterator ei = new ElementIterator(doc);	    int currentOffset = comp.getCaretPosition();	    int prevStartOffset = -1;	    int prevEndOffset = -1;			    // highlight the next link or object after the current caret position	    Element nextElement = null;	    while ((nextElement = ei.next()) != null) {		String name = nextElement.getName();		AttributeSet attr = nextElement.getAttributes();				Object href = getAttrValue(attr, HTML.Attribute.HREF);		if (!(name.equals(HTML.Tag.OBJECT.toString())) && href == null) {		    continue;		}				int elementOffset = nextElement.getStartOffset();		if (focusBack) {		    if (elementOffset >= currentOffset &&			prevStartOffset >= 0) {			foundLink = true;			comp.setCaretPosition(prevStartOffset);			moveCaretPosition(comp, prevStartOffset, 					  prevEndOffset);			prevHypertextOffset = prevStartOffset;			return;		    }		} else { // focus forward		    if (elementOffset > currentOffset) {			foundLink = true;			comp.setCaretPosition(elementOffset);			moveCaretPosition(comp, elementOffset,					  nextElement.getEndOffset());			prevHypertextOffset = elementOffset;			return;		    } 		}		prevStartOffset = nextElement.getStartOffset();		prevEndOffset = nextElement.getEndOffset();	    }            if (focusBack && prevStartOffset >= 0) {                foundLink = true;                comp.setCaretPosition(prevStartOffset);                moveCaretPosition(comp, prevStartOffset,                                   prevEndOffset);                prevHypertextOffset = prevStartOffset;                return;            }        }		/*	 * Moves the caret from mark to dot	 */	private void moveCaretPosition(JTextComponent comp, int mark, int dot) {	    Highlighter h = comp.getHighlighter();	    if (h != null) {		int p0 = Math.min(dot, mark);		int p1 = Math.max(dot, mark);		try {		    if (selectionTag != null) {			h.changeHighlight(selectionTag, p

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频免费观看高清完整版在线观看| 免费日本视频一区| 偷拍一区二区三区四区| 久久99在线观看| 成人午夜激情影院| 欧美午夜精品久久久| 国产精品传媒视频| 一区二区三区在线免费视频| 亚洲动漫第一页| 99re成人精品视频| 成人97人人超碰人人99| 日本午夜一区二区| 久草中文综合在线| 国产在线精品不卡| 大胆欧美人体老妇| 欧美视频在线一区二区三区| 91精品国产欧美一区二区成人| 欧美精品v国产精品v日韩精品| 日韩欧美精品在线视频| 91蝌蚪porny| 亚洲欧美在线视频| 亚洲一区二区三区美女| 成人午夜在线免费| www久久精品| 日韩精品成人一区二区三区| 不卡视频在线观看| 国产精品水嫩水嫩| 狠狠狠色丁香婷婷综合久久五月| 中文字幕视频一区| 免费成人美女在线观看| 欧美视频在线不卡| 亚洲欧洲日产国码二区| 高清成人在线观看| 欧美美女一区二区三区| 中文字幕一区二区三| 99精品久久99久久久久| 捆绑调教美女网站视频一区| 欧美精品一区二区久久婷婷| 91免费国产视频网站| 麻豆成人在线观看| 国产亚洲一区二区三区在线观看| 国产精品一区二区黑丝| 亚洲一区二区欧美激情| 久久蜜桃香蕉精品一区二区三区| 91蜜桃婷婷狠狠久久综合9色| 蜜桃av一区二区在线观看| 亚洲免费观看高清完整版在线观看| 视频一区二区国产| 欧美日韩在线三区| 国产福利91精品| 国产精品自在欧美一区| 国产精品一卡二卡在线观看| 亚洲小说欧美激情另类| 一区二区在线观看视频| 中文字幕中文字幕一区| 国产日韩欧美制服另类| 欧美在线免费观看亚洲| 欧美三级视频在线播放| 欧美精品aⅴ在线视频| 91豆麻精品91久久久久久| 91在线观看视频| 欧美性色aⅴ视频一区日韩精品| 在线视频国内一区二区| 欧美午夜电影网| 欧美在线观看视频在线| 欧美视频在线观看一区二区| 成人一区二区视频| 国产成人精品综合在线观看| 国内精品久久久久影院色| 成人黄色av电影| 91极品美女在线| 成a人片国产精品| 床上的激情91.| 国产a久久麻豆| 成人免费毛片a| 成人精品视频一区二区三区尤物| 顶级嫩模精品视频在线看| 91原创在线视频| 欧美一个色资源| 国产日韩一级二级三级| 亚洲免费三区一区二区| 日韩精品电影在线| 国产高清不卡一区二区| 欧美亚洲一区二区在线| av亚洲精华国产精华精华| 成人国产精品免费观看视频| 欧美日韩三级视频| 中文字幕一区二区视频| 国产美女av一区二区三区| 狠狠色综合日日| 91麻豆国产精品久久| 欧美一区二区福利视频| 中文字幕国产一区| 日韩在线一区二区| 国产成人午夜片在线观看高清观看| www.亚洲精品| 久久综合久久综合亚洲| 亚洲免费av在线| 国产成人av电影在线观看| 欧美v日韩v国产v| 美女被吸乳得到大胸91| 欧美一二区视频| 男女激情视频一区| 精品成人免费观看| 久久国产精品99久久人人澡| 欧美肥大bbwbbw高潮| 日日骚欧美日韩| 日韩免费视频一区| 国产在线国偷精品产拍免费yy| 久久综合一区二区| 国产电影一区二区三区| 在线观看一区二区视频| 国产精品无人区| 国产成人av福利| 欧美成人a视频| 麻豆传媒一区二区三区| 91精品国产高清一区二区三区蜜臀 | 久久众筹精品私拍模特| 麻豆91小视频| 日韩欧美激情一区| 免费成人小视频| 日韩欧美不卡一区| 成人中文字幕在线| 亚洲色大成网站www久久九九| av不卡在线播放| 日韩一区二区不卡| 久久精工是国产品牌吗| 欧美巨大另类极品videosbest | zzijzzij亚洲日本少妇熟睡| 精品国产乱码久久| 青青草一区二区三区| 欧美电影免费观看高清完整版在线观看| 天堂午夜影视日韩欧美一区二区| 91国产福利在线| 丝袜美腿成人在线| 日韩美女在线视频| 国产激情偷乱视频一区二区三区| 欧美xxxxx裸体时装秀| 国产一级精品在线| 中文字幕一区日韩精品欧美| av电影天堂一区二区在线观看| 中文字幕中文乱码欧美一区二区 | 久久影院午夜片一区| 高潮精品一区videoshd| 中文字幕一区二区三| 欧美日韩精品一区二区三区蜜桃| 视频一区二区国产| 久久久久亚洲综合| 欧美在线观看视频一区二区三区| 亚洲一级电影视频| 欧美大黄免费观看| 色综合久久综合网97色综合 | 偷拍自拍另类欧美| 国产女同性恋一区二区| 欧美日韩视频在线第一区 | 欧美va在线播放| 91片黄在线观看| 久久99精品国产麻豆婷婷洗澡| 日本一区二区免费在线观看视频| 色综合婷婷久久| 狠狠色狠狠色合久久伊人| 一区二区三区日韩| 国产情人综合久久777777| 欧美中文字幕久久| 国产高清视频一区| 日韩电影一区二区三区| 成人免费在线观看入口| 精品国产乱码久久久久久蜜臀| 93久久精品日日躁夜夜躁欧美| 精一区二区三区| 蜜臀99久久精品久久久久久软件| 亚洲人精品一区| 国产精品动漫网站| 国产人久久人人人人爽| 欧美午夜不卡视频| 国产最新精品免费| 韩国女主播一区| 日本欧美在线观看| 欧美麻豆精品久久久久久| 精品亚洲免费视频| 一区二区三区四区中文字幕| 欧美吻胸吃奶大尺度电影| 免费成人av在线播放| 久久久精品2019中文字幕之3| 99精品久久久久久| 国产精品一二三四五| 日本伊人精品一区二区三区观看方式| ...xxx性欧美| 天天操天天干天天综合网| 免费成人结看片| 欧美性猛片xxxx免费看久爱| 国产精品天干天干在线综合| 日韩电影在线一区二区三区| 日本道在线观看一区二区| 18欧美乱大交hd1984| 国产乱人伦偷精品视频免下载| 成人午夜看片网址| 波多野洁衣一区| 国产一区二区剧情av在线| 亚洲一二三级电影|