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

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

?? basictreeui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
		else {		    if (getRowCount(tree) == 0) {			preferredSize.width = 0;		    }		    else {			preferredSize.width = lastWidth - getMinX(visRect);		    }		}	    }	    else if (leftToRight) {		preferredSize.width = treeState.getPreferredWidth(null);	    }	    else {		Rectangle tempRect = null;		int rowCount = tree.getRowCount();		int width = 0;		for (int counter = 0; counter < rowCount; counter++) {		    tempRect = treeState.getBounds			       (treeState.getPathForRow(counter), tempRect);		    if (tempRect != null) {			width = Math.max(lastWidth - tempRect.x, width);		    }		}		preferredSize.width = width;	    }	    preferredSize.height = treeState.getPreferredHeight();	    if(i != null) {		preferredSize.width += i.left + i.right;		preferredSize.height += i.top + i.bottom;	    }	}	validCachedPreferredSize = true;    }    /**     * Returns the minimum x location for the nodes in <code>bounds</code>.     */    private int getMinX(Rectangle bounds) {	TreePath      firstPath;	int           endY;	if(bounds == null) {	    firstPath = getPathForRow(tree, 0);	    endY = Integer.MAX_VALUE;	}	else {	    firstPath = treeState.getPathClosestTo(bounds.x, bounds.y);	    endY = bounds.height + bounds.y;	}	Enumeration   paths = treeState.getVisiblePathsFrom(firstPath);	int           minX = 0;	if(paths != null && paths.hasMoreElements()) {	    Rectangle   pBounds = treeState.getBounds		                  ((TreePath)paths.nextElement(), null);	    int         width;	    if(pBounds != null) {		minX = pBounds.x + pBounds.width;		if (pBounds.y >= endY) {		    return minX;		}	    }	    while (pBounds != null && paths.hasMoreElements()) {		pBounds = treeState.getBounds((TreePath)paths.nextElement(),					      pBounds);		if (pBounds != null && pBounds.y < endY) {		    minX = Math.min(minX, pBounds.x);		}		else {		    pBounds = null;		}	    }	    return minX;	}	return minX;    }    /**      * Messaged from the VisibleTreeNode after it has been expanded.      */    protected void pathWasExpanded(TreePath path) {	if(tree != null) {	    tree.fireTreeExpanded(path);	}    }    /**      * Messaged from the VisibleTreeNode after it has collapsed.      */    protected void pathWasCollapsed(TreePath path) {	if(tree != null) {	    tree.fireTreeCollapsed(path);	}    }    /**      * Ensures that the rows identified by beginRow through endRow are      * visible.      */    protected void ensureRowsAreVisible(int beginRow, int endRow) {	if(tree != null && beginRow >= 0 && endRow < getRowCount(tree)) {            boolean scrollVert = DefaultLookup.getBoolean(tree, this,                              "Tree.scrollsHorizontallyAndVertically", false);	    if(beginRow == endRow) {		Rectangle     scrollBounds = getPathBounds(tree, getPathForRow							   (tree, beginRow));		if(scrollBounds != null) {                    if (!scrollVert) {                        scrollBounds.x = tree.getVisibleRect().x;                        scrollBounds.width = 1;                    }		    tree.scrollRectToVisible(scrollBounds);		}	    }	    else {		Rectangle   beginRect = getPathBounds(tree, getPathForRow						      (tree, beginRow));		Rectangle   visRect = tree.getVisibleRect();		Rectangle   testRect = beginRect;		int         beginY = beginRect.y;		int         maxY = beginY + visRect.height;		for(int counter = beginRow + 1; counter <= endRow; counter++) {		    testRect = getPathBounds(tree,					     getPathForRow(tree, counter));		    if((testRect.y + testRect.height) > maxY)			counter = endRow;		}		tree.scrollRectToVisible(new Rectangle(visRect.x, beginY, 1,						  testRect.y + testRect.height-						  beginY));	    }	}    }    /** Sets the preferred minimum size.      */    public void setPreferredMinSize(Dimension newSize) {	preferredMinSize = newSize;    }    /** Returns the minimum preferred size.      */    public Dimension getPreferredMinSize() {	if(preferredMinSize == null)	    return null;	return new Dimension(preferredMinSize);    }    /** Returns the preferred size to properly display the tree,      * this is a cover method for getPreferredSize(c, false).      */    public Dimension getPreferredSize(JComponent c) {	return getPreferredSize(c, true);    }    /** Returns the preferred size to represent the tree in      * <I>c</I>.  If <I>checkConsistancy</I> is true      * <b>checkConsistancy</b> is messaged first.      */    public Dimension getPreferredSize(JComponent c,				      boolean checkConsistancy) {	Dimension       pSize = this.getPreferredMinSize();	if(!validCachedPreferredSize)	    updateCachedPreferredSize();	if(tree != null) {	    if(pSize != null)		return new Dimension(Math.max(pSize.width,					      preferredSize.width),			      Math.max(pSize.height, preferredSize.height));	    return new Dimension(preferredSize.width, preferredSize.height);	}	else if(pSize != null)	    return pSize;	else	    return new Dimension(0, 0);    }    /**      * Returns the minimum size for this component.  Which will be      * the min preferred size or 0, 0.      */    public Dimension getMinimumSize(JComponent c) {	if(this.getPreferredMinSize() != null)	    return this.getPreferredMinSize();	return new Dimension(0, 0);    }    /**      * Returns the maximum size for this component, which will be the      * preferred size if the instance is currently in a JTree, or 0, 0.      */    public Dimension getMaximumSize(JComponent c) {	if(tree != null)	    return getPreferredSize(tree);	if(this.getPreferredMinSize() != null)	    return this.getPreferredMinSize();	return new Dimension(0, 0);    }    /**     * Messages to stop the editing session. If the UI the receiver     * is providing the look and feel for returns true from     * <code>getInvokesStopCellEditing</code>, stopCellEditing will     * invoked on the current editor. Then completeEditing will     * be messaged with false, true, false to cancel any lingering     * editing.     */    protected void completeEditing() {	/* If should invoke stopCellEditing, try that */	if(tree.getInvokesStopCellEditing() &&	   stopEditingInCompleteEditing && editingComponent != null) {	    cellEditor.stopCellEditing();	}	/* Invoke cancelCellEditing, this will do nothing if stopCellEditing	   was successful. */	completeEditing(false, true, false);    }    /**      * Stops the editing session.  If messageStop is true the editor      * is messaged with stopEditing, if messageCancel is true the      * editor is messaged with cancelEditing. If messageTree is true      * the treeModel is messaged with valueForPathChanged.      */    protected void completeEditing(boolean messageStop,				   boolean messageCancel,				   boolean messageTree) {	if(stopEditingInCompleteEditing && editingComponent != null) {	    Component             oldComponent = editingComponent;	    TreePath              oldPath = editingPath;	    TreeCellEditor        oldEditor = cellEditor;	    Object                newValue = oldEditor.getCellEditorValue();	    Rectangle             editingBounds = getPathBounds(tree, 								editingPath);	    boolean               requestFocus = (tree != null &&		                   (tree.hasFocus() || SwingUtilities.				    findFocusOwner(editingComponent) != null));	    editingComponent = null;	    editingPath = null;	    if(messageStop)		oldEditor.stopCellEditing();	    else if(messageCancel)		oldEditor.cancelCellEditing();	    tree.remove(oldComponent);	    if(editorHasDifferentSize) {		treeState.invalidatePathBounds(oldPath);		updateSize();	    }	    else {		editingBounds.x = 0;		editingBounds.width = tree.getSize().width;		tree.repaint(editingBounds);	    }	    if(requestFocus)		tree.requestFocus();	    if(messageTree)		treeModel.valueForPathChanged(oldPath, newValue);	}    }    // cover method for startEditing that allows us to pass extra    // information into that method via a class variable    private boolean startEditingOnRelease(TreePath path,                                          MouseEvent event,                                          MouseEvent releaseEvent) {        this.releaseEvent = releaseEvent;        try {            return startEditing(path, event);        } finally {            this.releaseEvent = null;        }    }    /**      * Will start editing for node if there is a cellEditor and      * shouldSelectCell returns true.<p>      * This assumes that path is valid and visible.      */    protected boolean startEditing(TreePath path, MouseEvent event) {        if (isEditing(tree) && tree.getInvokesStopCellEditing() &&                               !stopEditing(tree)) {            return false;        }	completeEditing();	if(cellEditor != null && tree.isPathEditable(path)) {	    int           row = getRowForPath(tree, path);	    if(cellEditor.isCellEditable(event)) {                editingComponent = cellEditor.getTreeCellEditorComponent		      (tree, path.getLastPathComponent(),		       tree.isPathSelected(path), tree.isExpanded(path),		       treeModel.isLeaf(path.getLastPathComponent()), row);		Rectangle           nodeBounds = getPathBounds(tree, path);		editingRow = row;		Dimension editorSize = editingComponent.getPreferredSize();		// Only allow odd heights if explicitly set.		if(editorSize.height != nodeBounds.height &&		   getRowHeight() > 0)		    editorSize.height = getRowHeight();		if(editorSize.width != nodeBounds.width ||		   editorSize.height != nodeBounds.height) {		    // Editor wants different width or height, invalidate 		    // treeState and relayout.		    editorHasDifferentSize = true;		    treeState.invalidatePathBounds(path);		    updateSize();		}		else		    editorHasDifferentSize = false;		tree.add(editingComponent);		editingComponent.setBounds(nodeBounds.x, nodeBounds.y,					   editorSize.width,					   editorSize.height);		editingPath = path;		editingComponent.validate();		Rectangle              visRect = tree.getVisibleRect();		tree.paintImmediately(nodeBounds.x, nodeBounds.y,				      visRect.width + visRect.x - nodeBounds.x,				      editorSize.height);		if(cellEditor.shouldSelectCell(event)) {		    stopEditingInCompleteEditing = false;		    try {			tree.setSelectionRow(row);		    } catch (Exception e) {			System.err.println("Editing exception: " + e);		    }		    stopEditingInCompleteEditing = true;		}		Component focusedComponent = BasicLookAndFeel.		                 compositeRequestFocus(editingComponent);		boolean selectAll = true;		if(event != null && event instanceof MouseEvent) {		    /* Find the component that will get forwarded all the		       mouse events until mouseReleased. */		    Point          componentPoint = SwingUtilities.convertPoint			(tree, new Point(event.getX(), event.getY()),			 editingComponent);		    /* Create an instance of BasicTreeMouseListener to handle		       passing the mouse/motion events to the necessary		       component. */		    // We really want similar behavior to getMouseEventTarget,		    // but it is package private.		    Component activeComponent = SwingUtilities.			            getDeepestComponentAt(editingComponent,				       componentPoint.x, componentPoint.y);		    if (activeComponent != null) {                        MouseInputHandler handler =                            new MouseInputHandler(tree, activeComponent,                                                  event, focusedComponent);                        if (releaseEvent != null) {                            handler.mouseReleased(releaseEvent);                        }                        selectAll = false;		    }		}		if (selectAll && focusedComponent instanceof JTextField) {		    ((JTextField)focusedComponent).selectAll();		}		return true;	    }	    else		editingComponent = null;	}	return false;    }    //    // Following are primarily for handling mouse events.    //    /**     * If the <code>mouseX</code> and <code>mouseY</code> are in the     * expand/collapse region of the <code>row</code>, this will toggle     * the row.     */    protected void checkForClickInExpandControl(TreePath path,						int mouseX, int mouseY) {      if (isLocationInExpandControl(path, mouseX, mouseY)) {	  handleExpandControlClick(path, mouseX, mouseY);	}    }    /**     * Returns true if <code>mouseX</code> and <code>mouseY</code> fall     * in the area of row that is used to expand/collapse the node and     * the node at <code>row</code> does not represent a leaf.     */    protected boolean isLocationInExpandControl(TreePath path, 						int mouseX, int mouseY) {	if(path != null && !treeModel.isLeaf(path.getLastPathComponent())){	    int                     boxWidth;	    Insets                  i = tree.getInsets();	    if(getExpandedIcon() != null)		boxWidth = getExpandedIcon().getIconWidth();	    else		boxWidth = 8;	    int boxLeftX = getRowX(tree.getRowForPath(path),                   path.getPathCount() - 1) - getRightChildIndent() -                   boxWidth / 2;	    if (leftToRight) {                boxLeftX += i.left;	    }	    else {	        boxLeftX = i.left + lastWidth - 1 - 		            ((path.getPathCount() - 2 + depthOffset) *			     totalChildIndent) - getLeftChildIndent() -		            boxWidth / 2;	    }	    int boxRigh

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久成人18免费观看| 亚洲精品视频观看| 久久精品国产第一区二区三区| 欧美精品一二三| 青青草国产成人99久久| 精品国产一区二区精华| 免播放器亚洲一区| www国产亚洲精品久久麻豆| 国产美女精品人人做人人爽| 欧美国产成人精品| 色婷婷av一区| 蜜桃91丨九色丨蝌蚪91桃色| 国产日韩欧美亚洲| 色av综合在线| 麻豆精品视频在线| 国产精品久线观看视频| 91国内精品野花午夜精品| 日本vs亚洲vs韩国一区三区| 久久精品亚洲麻豆av一区二区| 成人午夜免费电影| 亚洲综合在线视频| 精品久久国产97色综合| 99久久久精品| 免费精品视频最新在线| 中文字幕日韩精品一区| 欧美肥妇bbw| 国产乱码精品1区2区3区| 亚洲乱码日产精品bd| 日韩欧美123| 91在线小视频| 久久99国产精品麻豆| 一区二区三区日韩欧美| 精品成人在线观看| 精品视频在线看| 成人激情文学综合网| 天堂一区二区在线| 亚洲欧洲无码一区二区三区| 精品国产一区二区三区av性色 | 免费高清在线视频一区·| 国产欧美日韩另类视频免费观看| 欧美亚洲综合久久| 成人性视频免费网站| 蜜臀国产一区二区三区在线播放| 亚洲精品视频观看| 中文字幕精品综合| 日韩欧美国产一区二区三区| 欧美写真视频网站| 丁香一区二区三区| 精品中文字幕一区二区| 午夜激情一区二区| 亚洲在线免费播放| 国产精品久久久久久亚洲伦| 欧美变态口味重另类| 欧美日韩高清影院| 在线观看日产精品| 91麻豆文化传媒在线观看| 国产精品夜夜嗨| 国产在线精品一区二区| 美女网站在线免费欧美精品| 亚洲午夜精品一区二区三区他趣| 亚洲人成网站色在线观看| 欧美国产日韩亚洲一区| 精品免费国产二区三区| 91精品国产综合久久久蜜臀粉嫩| 欧美日韩国产片| 精品1区2区3区| 欧美在线色视频| 一本一道久久a久久精品| 91尤物视频在线观看| 99精品黄色片免费大全| 粉嫩蜜臀av国产精品网站| 国产一区二区不卡老阿姨| 色成人在线视频| 欧洲人成人精品| 在线观看成人小视频| 欧美在线观看视频在线| 欧美日韩一级片在线观看| 91官网在线免费观看| 欧美专区亚洲专区| 欧美日韩中文字幕一区| 7777精品伊人久久久大香线蕉经典版下载 | 中文字幕日韩精品一区| 国产精品福利影院| 综合精品久久久| 亚洲码国产岛国毛片在线| 亚洲一区免费视频| 五月婷婷久久丁香| 免费av网站大全久久| 国产一区中文字幕| 成人免费毛片a| 色欲综合视频天天天| 欧美日韩一级二级| 日韩视频免费观看高清完整版在线观看 | www欧美成人18+| 国产精品欧美一区二区三区| 日韩久久一区二区| 亚洲一区二区成人在线观看| 日精品一区二区三区| 老司机午夜精品| 欧美一区欧美二区| 精品美女被调教视频大全网站| 激情成人综合网| 国产在线精品一区二区不卡了| 丁香激情综合国产| 91麻豆精品一区二区三区| 在线视频综合导航| 欧美一区二区三区白人| 久久久久九九视频| 专区另类欧美日韩| 日韩av中文字幕一区二区三区| 激情五月激情综合网| 波多野结衣一区二区三区| 在线观看日韩毛片| 精品国产区一区| 亚洲欧洲av在线| 视频一区中文字幕| 成人在线一区二区三区| 欧美三级中文字幕| 中文幕一区二区三区久久蜜桃| 亚洲国产日韩一区二区| 国产精品一区二区在线观看不卡| 一本久久综合亚洲鲁鲁五月天| 欧美一区二区三区四区视频| 中文字幕免费一区| 日韩成人dvd| 9久草视频在线视频精品| 91精品福利在线一区二区三区 | 精品视频在线免费观看| 欧美mv和日韩mv的网站| 亚洲人成人一区二区在线观看 | 有码一区二区三区| 国产在线精品免费| 欧美亚洲图片小说| 国产精品视频免费| 久久精品国产亚洲一区二区三区 | 中文字幕亚洲欧美在线不卡| 免费在线看一区| 91黄色激情网站| 国产精品乱码妇女bbbb| 理论片日本一区| 欧美伦理视频网站| 亚洲黄色av一区| a4yy欧美一区二区三区| 久久久www成人免费毛片麻豆| 天天操天天综合网| 色婷婷久久一区二区三区麻豆| 久久久久久久综合| 蜜臀va亚洲va欧美va天堂| 欧美午夜电影网| 亚洲日本青草视频在线怡红院| 国产成人精品影视| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | k8久久久一区二区三区| 久久综合色鬼综合色| 午夜影院久久久| 欧美三级视频在线观看| 亚洲美女精品一区| 一本久久综合亚洲鲁鲁五月天| 中文字幕不卡的av| 高清免费成人av| 国产日韩综合av| 国产大片一区二区| 久久这里都是精品| 黑人巨大精品欧美一区| 精品久久久久av影院| 精品一区精品二区高清| 欧美一级淫片007| 美国三级日本三级久久99| 67194成人在线观看| 丝瓜av网站精品一区二区| 7777精品久久久大香线蕉 | 亚洲视频每日更新| 精品人在线二区三区| 国内久久精品视频| 久久婷婷色综合| 成人亚洲精品久久久久软件| 国产精品欧美久久久久一区二区| 成人免费三级在线| 成人欧美一区二区三区白人 | 欧美三级电影网站| 亚洲电影一级黄| 日韩无一区二区| 国产麻豆一精品一av一免费| 久久久久久一二三区| 成人av在线资源网| 亚洲男人电影天堂| 欧美日韩在线三级| 九色porny丨国产精品| 国产性做久久久久久| 色婷婷久久综合| 男人的天堂亚洲一区| 久久久99精品免费观看不卡| 播五月开心婷婷综合| 亚洲资源中文字幕| 日韩免费电影网站| 97精品国产露脸对白| 亚洲成人动漫精品| 久久精品男人的天堂| 91高清视频免费看| 狠狠狠色丁香婷婷综合久久五月|