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

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

?? treeview2.java

?? 一個Web爬蟲(機器人
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
package symantec.itools.awt;import java.awt.BorderLayout;import java.awt.Color;//import java.awt.SystemColor; JDK1.1import java.awt.Dimension;import java.awt.Event;import java.awt.FontMetrics;import java.awt.Font;import java.awt.Graphics;import java.awt.Image;import java.awt.LayoutManager;import java.awt.Scrollbar;import java.awt.Panel;import java.awt.Rectangle;//import java.awt.ItemSelectable; JDK1.1//import java.awt.AWTEventMulticaster; JDK1.1//import java.awt.event.ItemEvent;//import java.awt.event.ItemListener;//import java.awt.event.KeyEvent;//import java.awt.event.KeyAdapter;//import java.awt.event.MouseEvent;//import java.awt.event.MouseAdapter;//import java.awt.event.FocusEvent;//import java.awt.event.FocusAdapter;//import java.awt.event.AdjustmentEvent;//import java.awt.event.AdjustmentListener;//import java.awt.event.ActionEvent;//import java.awt.event.ActionListener;import java.util.Vector;//import java.beans.PropertyVetoException;//import java.beans.PropertyChangeListener;//import java.beans.VetoableChangeListener;//import java.beans.PropertyChangeEvent;//	01/15/97	RKM	Changed drawTree to make certain g1 has a font, before calling getFontMetrics on it//	01/15/07	RKM	Added invalidate to setTreeStructure//	01/29/97	TWB	Integrated changes from Windows and RKM's changes// 	01/29/97	TWB	Integrated changes from Macintosh//  02/05/97    MSH Changed so that draws from first visible node//  02/27/97    MSH Merged change to add SEL_CHANGED//  04/02/97    TNM Draw all vertical lines//  04/14/97    RKM Changed bogus invalidates to repaint//				RKM	Changed hard coded sbVWidth to use preferredSize.width//				RKM Changed getTreeStructure so it actually returned a representation of what was in the treeview//				RKM	Rearranged a lot of stuff to get this to work//				RKM Changed g1.drawRect in drawTree to not overlap the scrollbar//				RKM Changed parseTreeStructure to not force a root node//  05/02/97    RKM Add arg to addSibling so caller could control whether the sible was added as the last sibling or not//				RKM	Changed insert to call addSibling with false when handling NEXT//				RKM	Kept addSibling with two params for compatibility//	05/31/97	RKM	Updated to support Java 1.1//					Made properties bound & constrained//					Removed get/setBackground & get/setForeground overrides, getter did nothing but call the super//					and setters were calling repaint, no one else does this//					Deprecated foreground and background hilite colors, used system colors instead//					Deprecated SEL_CHANGED, replaced by ItemSelectable interface//					Hid scrollbar on creation, to avoid ugly redraw problems//					Changed to triggered redraw//					NOTE: SystemColor seems to be broken on Mac// 06/01/97		RKM	Changed symantec.beans references to java.beans// 05/13/97     TNM Added horizontal scrollbar// 05/15/97     TNM Check for vendor to corect scrollbar problem// 06/09/97     CAR Modified check for vendor to include java.version 1.1.x// 06/19/97     TNM Merging changes/** * Creates an "outline view" of text headings and, optionally, images. * The headings are arranged in a hierarchical fashion, and can be * expanded to show their sub-headings or collapsed, hiding their * sub-headings. * <p> * A TreeView is typically used to display information that is organized in a * hierarchical fashion like an index or table of contents. * <p> * A TreeNode2 object is used for each heading. * @see TreeNode2 */public class TreeView2	extends Panel                //	implements ItemSelectable JDK1.1{	// constants for insertion	/**	 * Constant indicating that the new node is to be a child	 * of the existing node.	 * @see #insert	 */	public static final int CHILD   = 0;	/**	 * Constant indicating that the new node is to be the next	 * sibling of the existing node.	 * @see #insert	 */	public static final int NEXT    = CHILD + 1;	/**	 * Constant indicating that the new node is to be the last	 * sibling of the existing node.	 * @see #insert	 */	public static final int LAST    = CHILD + 2;    /**     * @deprecated As of JDK version 1.1,     * replaced by ItemSelectable interface.     * @see java.awt.ItemSelectable     */	public static final int SEL_CHANGED = 1006; //selection changed event	private TreeNode2 rootNode;         		 // root node of tree	private TreeNode2 selectedNode;				// highlighted node	private TreeNode2 topVisibleNode;			// first node in window	protected Scrollbar	verticalScrollBar;	// vertical scrollbar	int			sbVPosition = 0;		// hold value of vertical scrollbar	int			sbVWidth;       		// width of vertical scrollbar	long		sbVTimer = -1;			// time of last vert scrollbar event	private boolean sbVShow = false;    // show or hide vertical scrollbar	protected int count = 0;    		// Number of nodes in the tree	protected int	viewCount = 0;		// Number of viewable nodes in the tree	                        			// (A node is viewable if all of its	                        			// parents are expanded.)    protected Scrollbar horizontalScrollBar; // horizontal scrollbar	int			sbHPosition=0;	// hold value of horizontal scrollbar	int			sbHHeight = 0;  // height of horizontal scrollbar    private int sbHSize;        // size of horizontal scrollbar    private int newWidth = 0;   // for horizontal scrollbar   	private boolean sbHShow = false; // show or hide horizontal scrollbar	private int sbHLineIncrement = 4;	private int viewHeight = 300;	private int viewWidth  = 300; // pixel size of tree display	private int viewWidest = 0 ;  // widest item displayable (for horz scroll)	int cellSize    = 16;   // size of node image	int clickSize   = 8;    // size of mouse toggle (plus or minus)	int imageInset  = 3;    // left margin of node image	int textInset   = 6;    // left margin for text	int textBaseLine= 3;    // position of font baseline from bottom of cell	private FontMetrics fm; // current font metrics    //long timeMouseDown;     // save time of last mouse down (for double click)    //int doubleClickResolution = 333; // double-click speed in milliseconds    protected boolean isSun1_1; // checks for scrollbars that have different max value	/**	 * Offscreen Image used for buffering the painting process.	 */	protected Image im1;    // offscreen image	/**	 * Offscreen graphics context used for buffering the painting process.	 */	protected Graphics g1 = null;  // offscreen graphics context	//	// Constructors	//	/**	 * Constructs an empty TreeView2.	 */	public TreeView2()	{		super.setLayout(null);	    verticalScrollBar = new Scrollbar(Scrollbar.VERTICAL);        verticalScrollBar.hide();        add(verticalScrollBar);        horizontalScrollBar = new Scrollbar(Scrollbar.HORIZONTAL);        horizontalScrollBar.hide();        add(horizontalScrollBar);        // Sun has different max value for setValues method in ScrollBar        //isSun1_1 = ( System.getProperty("java.vendor").startsWith("Sun Microsystems Inc.")        //             && (System.getProperty("java.version").startsWith("11")        //                 || System.getProperty("java.version").indexOf("1.1") > -1) );        isSun1_1 = true;	}	/**	 * Constructs a TreeView2 with the given node.	 *	 * @param head the root node of the constructed tree	 */	public TreeView2(TreeNode2 head)	{	    this();	    selectedNode = rootNode = head;	    count = 1;	}	//	// Properties	//	public synchronized void clear ()	{	    rootNode = selectedNode = null;	    count = 0;	    viewCount = 0;	    triggerRedraw ();	}    /**     * Initializes the TreeView2 from a string array.     * There is one string for each node in the array. That string     * contains the text of the node indented with same number of     * leading spaces as the depth of that node in the tree.     * @param s the string array used for initialization     * @see #getTreeStructure     */	public void setTreeStructure(String s[])	{	    rootNode = selectedNode = null;	    try	    {	        parseTreeStructure(s);	    }	    catch(InvalidTreeNode2Exception e)	    {	        System.out.println(e);	    }		triggerRedraw();		//!!!RKM!!! If preferredSize ever has to do with actual data (duh), uncomment this	    //invalidate();	}    /**     * Gets a string array that reflects the current TreeView2's contents.     * There is one string for each node in the array. That string     * contains the text of the node indented with same number of     * leading spaces as the depth of that node in the tree.     * @return the string array that reflects the TreeView2's contents     * @see #setTreeStructure     */	public String[] getTreeStructure()	{		//Create a vector representing current tree structure		if (rootNode==null) return null;		Vector nodesVector = new Vector(count);		rootNode.depth = 0;		vectorize(rootNode,false,nodesVector);		//Convert this to a String[]		int numNodes = nodesVector.size();		String[] treeStructure = new String[numNodes];		for (int i = 0;i < numNodes;i++)		{			TreeNode2 thisNode = (TreeNode2)nodesVector.elementAt(i);			//Add appropriate number of blanks			String treeString = "";			for (int numBlanks = 0;numBlanks < thisNode.depth;numBlanks++)				treeString += ' ';			//Add tree			treeString += thisNode.text;			//Put string into array			treeStructure[i] = treeString;		}	    return treeStructure;	}	//	// Deprecated Properties	//	/**     * @deprecated As of JDK version 1.1,     * replaced by use of SystemColors.textHighlightText.	 */	public void setFgHilite(Color c)	{	}	/**     * @deprecated As of JDK version 1.1,     * replaced by use of SystemColors.textHighlightText.	 */	public Color getFgHilite()	{	    //return SystemColor.textHighlightText;            return Color.black;	}	/**     * @deprecated As of JDK version 1.1,     * replaced by use of SystemColors.textHighlight.	 */	public void setBgHilite(Color c)	{	}	/**     * @deprecated As of JDK version 1.1,     * replaced by use of SystemColors.textHighlight.	 */	public Color getBgHilite()	{	    //return SystemColor.textHighlight;            return Color.white;	}	//	// ItemSelectable interface	//    /**     * Returns the selected items or null if no items are selected.     * <p>     * This is a standard method of the ItemSelectable interface.     */    public Object[] getSelectedObjects()    {    	if (selectedNode == null)    		return null;    	TreeNode2[] selectedObjects = new TreeNode2[1];    	selectedObjects[0] = selectedNode;    	return selectedObjects;    }    /**     * Add a listener to recieve item events when the state of     * an item changes.     * <p>     * This is a standard method of the ItemSelectable interface.     * @param l the listener to recieve events     * @see ItemEvent     */    /* JDK1.1    public void addItemListener(ItemListener l)    {        itemListener = AWTEventMulticaster.add(itemListener, l);    }    */    /**     * Removes an item listener.     * <p>     * This is a standard method of the ItemSelectable interface.     * @param l the listener being removed     * @see ItemEvent     */    /* JDK1.1    public void removeItemListener(ItemListener l)    {        itemListener = AWTEventMulticaster.remove(itemListener, l);    }    */	//	// Methods	//	// Insert a new node relative to a node in the tree.	// position = CHILD inserts the new node as a child of the node	// position = NEXT inserts the new node as the next sibling	// position = LAST inserts the new node as the last sibling	/**	 * Inserts a new node relative to an existing node in the tree.	 * @param newNode the new node to insert into the tree	 * @param relativeNode the existing node used for a position reference	 * @param position where to insert the new node relative to relativeNode.	 * Legal values are CHILD, NEXT and LAST.	 * @see #CHILD	 * @see #NEXT	 * @see #LAST	 * @see #append	*/	public void insert(TreeNode2 newNode, TreeNode2 relativeNode, int position)	{	    if (newNode == null || relativeNode == null)	        return;	    if (exists(relativeNode)==false)	        return;	    switch (position)	    {	        case CHILD:	            addChild(newNode, relativeNode);	            break;	        case NEXT:	            addSibling(newNode, relativeNode, false);	            break;	        case LAST:	            addSibling(newNode, relativeNode, true);	            break;	        default:	            // invalid position	            return;	    }	}    /**     * Returns the "root" node.     * The root node is the first top-level node in the tree hierarchy.     * All other nodes are either children or siblings of that one.     * @return the root tree node     */	public TreeNode2 getRootNode()	{	    return rootNode;	}	/**	 * Returns the total number of nodes in the tree.	 */	public int getCount()	{	    return count;	}	/**	 * Returns the total number of viewable nodes in the tree.     * A node is viewable if all of its parents are expanded.     */	public int getViewCount()	{	    return viewCount;	}	/**	 * Determines if the given node is viewable.     * A node is viewable if all of its parents are expanded.     * @param node the node to check     * @return true if the node is visible, false if it is not     * @see #viewable(java.lang.String)	 */	boolean viewable(TreeNode2 node)	{	    for (int i=0; i<viewCount; i++)	    {	        if (node == v.elementAt(i))	        {	            return true;	        }	    }	    return false;	}	/**	 * Determines if the node with the given text is viewable.     * A node is viewable if all of its parents are expanded.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品免费在线观看| 激情六月婷婷综合| 日韩一区二区电影网| 极品少妇xxxx精品少妇偷拍| 国产精品视频一二三区| 91女神在线视频| 麻豆精品久久精品色综合| 国产精品―色哟哟| 日韩一区二区在线看| 成人精品一区二区三区中文字幕| 亚洲第一成人在线| 国产亚洲人成网站| 欧美日韩国产不卡| 美女一区二区三区| 亚洲精品少妇30p| 日韩久久久精品| 91久久国产最好的精华液| 久久99久久99| 国产精品美女www爽爽爽| 欧美一区在线视频| 一本一道久久a久久精品 | 一区二区三区不卡在线观看| 精品va天堂亚洲国产| 在线免费观看日本欧美| 国产电影一区在线| 国内不卡的二区三区中文字幕| 一区二区激情视频| 欧美高清一级片在线观看| 欧美一区二区三区在线观看视频| 99久久精品国产导航| 国产一区不卡精品| 亚洲自拍都市欧美小说| 国产精品国产三级国产有无不卡 | 中文字幕日韩一区二区| 精品国产污污免费网站入口| 99精品欧美一区二区三区综合在线| 日本不卡的三区四区五区| 亚洲在线视频网站| 成人欧美一区二区三区在线播放| 日韩精品一区二区三区视频在线观看 | 国产精品资源网站| 亚洲国产日韩a在线播放性色| 国产精品夫妻自拍| 国产精品三级视频| 国产午夜亚洲精品羞羞网站| 欧美美女激情18p| 欧美在线观看一二区| av在线综合网| av不卡免费电影| 国产一区二区三区| 国产原创一区二区| 久久成人久久爱| 免费久久精品视频| 日韩电影免费一区| 日韩精品亚洲专区| 午夜精品久久久久影视| 图片区日韩欧美亚洲| 一区二区三区在线视频播放| 亚洲精品中文字幕乱码三区| 亚洲天堂成人在线观看| 亚洲另类一区二区| 亚洲一区二区三区四区在线| 一区二区三区中文字幕电影| 亚洲丝袜另类动漫二区| 亚洲精品国产第一综合99久久| 亚洲欧洲综合另类| 一区二区三区精密机械公司| 亚洲一区中文日韩| 一区二区三区 在线观看视频| 怡红院av一区二区三区| 亚洲r级在线视频| 日日摸夜夜添夜夜添国产精品 | 欧美韩日一区二区三区| 亚洲国产精品精华液ab| 国产日韩欧美亚洲| 亚洲欧美乱综合| 亚洲国产精品天堂| 免费成人在线网站| 国产精品1024| 美女一区二区三区在线观看| 国产综合色在线视频区| 黑人巨大精品欧美一区| 99免费精品视频| 欧美视频一区二区三区四区| 欧美一区二区在线免费观看| 国产亚洲综合在线| 亚洲图片激情小说| 日本亚洲最大的色成网站www| 日本亚洲电影天堂| 国产高清不卡一区二区| 欧洲精品一区二区三区在线观看| 欧美精品一区二区三区一线天视频 | 欧美色精品天天在线观看视频| 精品成人私密视频| 亚洲v精品v日韩v欧美v专区 | 欧美精品久久久久久久久老牛影院| 精品国产一区久久| 亚洲五码中文字幕| 成人黄页在线观看| 精品美女在线观看| 亚洲成人av在线电影| 91在线高清观看| 久久久久国产成人精品亚洲午夜| 亚洲国产成人porn| 色综合久久88色综合天天6| 久久久久久久久一| 蜜桃精品在线观看| 欧美美女一区二区在线观看| 亚洲欧美一区二区久久| 成人网在线播放| 精品999久久久| 蜜臀av在线播放一区二区三区| 91黄色激情网站| 综合精品久久久| 成人黄色av电影| 国产欧美日韩亚州综合| 韩国三级中文字幕hd久久精品| 欧美精品视频www在线观看| 亚洲男同1069视频| 99re这里只有精品视频首页| 国产欧美一区二区三区网站| 国产一区二区不卡在线| 日韩精品一区二区三区四区 | 亚洲欧洲性图库| 大白屁股一区二区视频| 久久久久久久久久久久久夜| 激情久久五月天| 久久网站最新地址| 国产一区二区剧情av在线| 精品国产99国产精品| 久久精品99久久久| 日韩女优电影在线观看| 免费在线观看一区二区三区| 欧美一区二区三区视频在线| 免费欧美在线视频| 精品三级在线看| 国产精品1区2区| 国产欧美精品一区| 99久久久免费精品国产一区二区| 最好看的中文字幕久久| 91麻豆6部合集magnet| 一区二区在线观看免费| 在线视频欧美区| 日韩高清不卡一区二区三区| 91精品国产麻豆国产自产在线 | 4438成人网| 久久精品72免费观看| 2023国产一二三区日本精品2022| 国产尤物一区二区在线| 国产无一区二区| 99在线精品一区二区三区| 一区二区在线观看av| 欧美午夜寂寞影院| 免费人成黄页网站在线一区二区| 日韩欧美国产wwwww| 国产黄色精品视频| 中文字幕中文在线不卡住| 91福利资源站| 日本少妇一区二区| 国产午夜亚洲精品羞羞网站| 一本色道久久综合亚洲91| 亚洲成av人在线观看| 欧美成人乱码一区二区三区| 国产成人午夜精品影院观看视频| 中文字幕在线不卡| 欧美日本一道本| 国产一区二区三区国产| 亚洲视频免费在线观看| 69堂国产成人免费视频| 国产乱子伦视频一区二区三区 | 日韩电影在线观看网站| 久久综合久久99| 91福利在线导航| 另类欧美日韩国产在线| 国产精品国产精品国产专区不蜜| 欧美日韩中文字幕精品| 国产精品一区二区久久不卡| 亚洲精品美腿丝袜| 精品乱人伦小说| 色婷婷久久综合| 国产一区二区在线看| 一个色综合网站| 久久青草国产手机看片福利盒子| 91网站在线播放| 激情久久五月天| 亚洲丶国产丶欧美一区二区三区| 国产日韩欧美综合一区| 69堂成人精品免费视频| eeuss鲁片一区二区三区在线观看| 污片在线观看一区二区| 自拍偷拍亚洲综合| 26uuu久久天堂性欧美| 在线日韩一区二区| 国产激情偷乱视频一区二区三区| 日日摸夜夜添夜夜添国产精品| 国产精品成人网| 久久这里只有精品视频网| 欧美日韩午夜影院| 99久久99久久综合| 国内外精品视频|