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

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

?? accordiontreedrawerfinal.java

?? 生物物種進化歷程的演示
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/*   Copyright (c) 2002 Compaq Computer Corporation      SOFTWARE RELEASE      Permission is hereby granted, free of charge, to any person obtaining   a copy of this software and associated documentation files (the   "Software"), to deal in the Software without restriction, including   without limitation the rights to use, copy, modify, merge, publish,   distribute, sublicense, and/or sell copies of the Software, and to   permit persons to whom the Software is furnished to do so, subject to   the following conditions:      - Redistributions of source code must retain the above copyright     notice, this list of conditions and the following disclaimer.      - Redistributions in binary form must reproduce the above copyright     notice, this list of conditions and the following disclaimer in the     documentation and/or other materials provided with the distribution.      - Neither the names of Compaq Research, Compaq Computer Corporation     nor the names of its contributors may be used to endorse or promote     products derived from this Software without specific prior written     permission.      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.    IN NO EVENT SHALL COMPAQ COMPUTER CORPORATION BE LIABLE FOR ANY CLAIM,   DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR   OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR   THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/package TreeJuxtaposer;import java.util.*;import java.awt.event.*;import AccordionDrawer.*;import AccordionTreeDrawer.*;/** * A class that fleshes out the abstract methods left in * AccordionTreeDrawer. * * In particular, mouse and keyboard events are mapped to * AccordionTreeDrawer methods. * * @author  Tamara Munzner, Serdar Tasiran, Li Zhang, Yunhong Zhou * @version  * @see     AccordionDrawer.AccordionDrawer * @see     AccordionDrawer.AccordionTreeDrawer */public class AccordionTreeDrawerFinal extends AccordionTreeDrawer {    TreeJuxtaposer tj;    int dragStart[] = new int[2];    int dragEnd[] = new int[2];    int mousePrev[]=new int[2];    int mouseNow[]=new int[2];    TreeNode mouseOverNode;	// actiongroup: what is supposed to grow when grow option (bigger/smaller) is pressed    private int actiongroup;    // markgroup: what is the selection colour that is currently being used    //  (only applies to MARK[0-3], other ints are only associated with actiongroup)    private int markgroup;    /*     * Don't use these and expect it to work since tj.????Group stuff is used elsewhere    final static int MARK0 = 0;    final static int MARK1 = 1;    final static int MARK2 = 2;    final static int MARK3 = 3;    final static int FLASH = 4;    final static int DIFF = 5;    final static int LIST = 6;    */        // which direction to grow    private int growDirection;    final static int HORIZ = 0;    final static int VERT = 1;    final static int ALL = 2;    private int growDirectionDefault = VERT;        // does the selection (marking) of a node select just the node or the subtree    private int selectionResolution;    final static int NODE = 0;    final static int SUBTREE = 1;    private int selectionResolutionDefault = SUBTREE;    	private int keytarget;    // developer mode for keytarget only    final static int DEVELOPER = 11;    // only let the keytarget and actionmode be set to NONE    // any other state that can be seen externally should have real state (default value)    final static int NONE = 12;    private final static int keytargetDefault = TreeJuxtaposer.flashGroup;        private int actionmode;    final static int MOUSEOVER = 0;    final static int ST_FREEMOVE = 1;    final static int ST_FREEMOVEAGAIN = 2;    final static int ST_RESHAPE = 3;    final static int RECT_CREATE = 4;    final static int RECT_FREEMOVE = 5;    final static int RECT_FREEMOVEAGAIN = 6;    final static int RECT_RESHAPE = 7;    private final static int actionmodeDefault = MOUSEOVER;	final static int MOVE_STUCKPOS = 11;    boolean jump;    TreeNode pickedNode;    TreeNode pickedNodeOld;    	/* State accessors and mutators */		/* Action group */	public void setActionGroup(int newActionGroup)	{		//System.out.println("setting action group: " + newActionGroup);		setActionGroupWrapper(newActionGroup, true);	}	public void setActionGroupWrapper(int newActionGroup, boolean repeat)	{		actiongroup = newActionGroup;		if (repeat)		{			Iterator tdIter = tj.treeDrawers.iterator();			while (tdIter.hasNext())			{				AccordionTreeDrawerFinal atd = (AccordionTreeDrawerFinal)tdIter.next();				atd.setActionGroupWrapper(newActionGroup, false);			}		}		tj.observe();	}	public int getActionGroup()	{		return actiongroup;	}		/* Action mode */	public void setActionMode(int newActionMode)	{		//System.out.println("setting action mode: " + newActionMode);		setActionModeWrapper(newActionMode, false);	}	public void setActionModeWrapper(int newActionMode, boolean repeat)	{		actionmode = newActionMode;		if (repeat)		{			Iterator tdIter = tj.treeDrawers.iterator();			while (tdIter.hasNext())			{				AccordionTreeDrawerFinal atd = (AccordionTreeDrawerFinal)tdIter.next();				atd.setActionModeWrapper(newActionMode, false);			}		}		tj.observe();	}	public int getActionMode()	{		return actionmode;	}		public void setGrowDirection(int growDirection)	{		//System.out.println("setting grow direction: " + growDirection);		setGrowDirectionWrapper(growDirection, true);	}	public void setGrowDirectionWrapper(int growDirection, boolean repeat)	{		this.growDirection = growDirection;		if (repeat)		{			Iterator tdIter = tj.treeDrawers.iterator();			while (tdIter.hasNext())			{				AccordionTreeDrawerFinal atd = (AccordionTreeDrawerFinal)tdIter.next();				atd.setGrowDirectionWrapper(growDirection, false);			}		}		tj.observe();	}	public int getGrowDirection()	{		return growDirection;	}		public void setSelectionResolution(int selectionResolution)	{		//System.out.println("setting action target: " + selectionResolution);		setSelectionResolutionWrapper(selectionResolution, true);	}	public void setSelectionResolutionWrapper(int selectionResolution, boolean repeat)	{		this.selectionResolution = selectionResolution;		if (repeat)		{			Iterator tdIter = tj.treeDrawers.iterator();			while (tdIter.hasNext())			{				AccordionTreeDrawerFinal atd = (AccordionTreeDrawerFinal)tdIter.next();				atd.setSelectionResolutionWrapper(selectionResolution, false);			}		}		tj.observe();	}	public int getSelectionResolution()	{		return selectionResolution;	}		public void setMarkGroup(int newMarkGroup)	{		setMarkGroupWrapper(newMarkGroup, true);	}	public void setMarkGroupWrapper(int newMarkGroup, boolean repeat)	{		markgroup = newMarkGroup;		if (repeat)		{			Iterator tdIter = tj.treeDrawers.iterator();			while (tdIter.hasNext())			{				AccordionTreeDrawerFinal atd = (AccordionTreeDrawerFinal)tdIter.next();				atd.setMarkGroupWrapper(newMarkGroup, false);			}		}		tj.observe();	}	public int getMarkGroup()	{		return markgroup;	}    AccordionTreeDrawerFinal(Tree t, int w, int h, TreeJuxtaposer thetj) {	super(t, w, h);	tj = thetj;	setMarkGroup(TreeJuxtaposer.markGroup[0]);	setActionGroup(TreeJuxtaposer.flashGroup);	setActionMode(actionmodeDefault);	keytarget = NONE;	setGrowDirection(growDirectionDefault);	setSelectionResolution(selectionResolutionDefault);	jump = false;	baseBox = null;	splitLine[X].setMaxStuckValue(0.7f); // so you can see the names on the leaves    }    // implement abstract classes    public ArrayList getColorsForRange(int objmin, int objmax) {	return tj.getColorsForRange(objmin, objmax, (AccordionTreeDrawer) this);    }	// implement abstract classes	public ArrayList getColorsForRange(int objmin, int objmax, int a, int b) {	   return tj.getColorsForRange(objmin, objmax, (AccordionTreeDrawer) this);	   }    /**     * Make an InteractionBox from the GridCells nearest to the box of the mousedrag.     * Expects dragStart[X]/Y, dragEnd[X]/Y to be set.      *      * @author Francois Guimbretiere, Tamara Munzner */    private void drawActiveSubtreeBox() {	// turn off original flashbox	flashBox = null;	setFlash(null, rubberbandColor, -1, -1, true);	CellGeom fg = null;	if (getActionGroup() == TreeJuxtaposer.flashGroup) {	    baseBox = makeBox(pickedNode); 	    if (null == baseBox) {//		System.out.println("basebox null");		return;	    }	    flashBox = baseBox;	    if (null != pickedNode)			fg = pickedNode;//	    else if (null != temp && null != temp.item)//		fg = temp.item;	} else {	    ArrayList forestRoots = tj.getGroupForest(getActionGroup(), this); // array of TreeNodes	    if (forestRoots.isEmpty()) {		actionmodeReset();		return;	    }	    TreeNode n = (TreeNode)(forestRoots.get(0));	    baseBox = makeBox(n); // just use the first one, for now	    if (null == baseBox) {//		System.out.println("basebox2 null");		return;	    }	    fg = n;	    flashBox = baseBox;	}	flashBoxWidth=3f;	if (fg == null) fg = tree.getRoot();	tj.setFocus(fg, this);	setFlash(fg, rubberbandColor,-1, -1, true);    }    public void actionmodeReset() {	//System.out.println("reset");		// reason: set action mode to mouseover when exiting other modes	setActionMode(MOUSEOVER);		baseBox = null;	flashBox = null;	pickedNode = null;	pickedNodeOld = null;	flashBoxWidth = 1f;	tj.doFlashGeom(null, TreeJuxtaposer.flashGroup, this, mouseNow[X], mouseNow[Y], false);	//setFlash(null, tj.rubberbandColor, mouseNow[X], mouseNow[Y], true);    	// can't set this null until after setflash...	//flashBoxOld = null;	//flashGeomOld = null;	//flashGeom = null;		// reason?	// setActionGroup(tj.flashGroup);		keytarget = NONE; // squash keys in state machine	//setGrowDirection(growDirectionDefault); // this resets the grow direction to both... why?	tj.setQuasimode(false);	mouseover(mouseNow[X], mouseNow[Y]);    }    private void mouseover(int x, int y) {     	TreeNode pickedGeom = (TreeNode)pickAttached(x,y);	if (null == pickedGeom) return;        mouseOverNode = pickedGeom;    pickedNode = pickedGeom;	if (pickedNode == pickedNodeOld) return;		pickedNodeOld = pickedNode;	tj.doFlashGeom(pickedNode, TreeJuxtaposer.flashGroup, this, x, y, true);	tj.debugFrame.result[DebugFrame.NAV_TYPE].setText(pickedNode.toString());	tj.debugFrame.result[DebugFrame.BCN_SCORE].setText((pickedNode.getBcnScore()).toString());        }	private void reshaperectangle(boolean doOther) {				if (null == baseBox) {			actionmodeReset();			return;		}				// CRFP: return 2 integers, pixel differences for baseBox movable lines in X and Y		int[] rectBox = createRectFromPick(baseBox);				if (rectBox == null)			return;//		System.out.println("RectBox: " + rectBox[0] + " " + rectBox[1]);			int numAnimSteps = 3;		while (transitionAnimating)			endAllTransitions(); // end transitions, new queue is going to be swapped in		Hashtable newToMove = new Hashtable();		for (int xy = X; xy <= Y; xy++)		{			splitLine[xy].moveLine(baseBox.moveLineIndex[xy], // the split to move				rectBox[xy], // move it to the end position				baseBox.stuckLineIndex[xy], // the split to stay				numAnimSteps, newToMove);		}		toMove = newToMove; // swap in new queue		incrementFrameNumber(); // so compute place this frame will update, this can be moved to after transitions are created				if (doOther			&& null != baseBox.item) { // linked navigation to other trees			double changeRatio[] = new double[2];			for (int xy = 0; xy < 2; xy++) {				SplitLine split = getSplitLine(xy);				int movement = baseBox.dragEnd[xy] - baseBox.oldDragEnd[xy];//				System.out.println("movement: " + movement);				if (baseBox.stuckLineIndex[xy] > baseBox.moveLineIndex[xy])					movement *= -1;				changeRatio[xy] = s2w(movement, xy);//				double dragEnd = (double)s2w(rectBox[xy], xy);//				if (dragEnd < split.getMinStuckValue() + minContextPeriphery ||//					dragEnd > split.getMaxStuckValue() - minContextPeriphery)//				{//					System.out.println("drag too far");//					break;//					//				}//				double staticEnd = split.getAbsoluteValue(baseBox.stuckLineIndex[xy]);//				double dragStart = split.getAbsoluteValue(baseBox.moveLineIndex[xy]);//				double oldBoxSize = Math.abs(staticEnd - dragStart);//				double newBoxSize = Math.abs(staticEnd - dragEnd);//////				changeRatio[xy] = newBoxSize - oldBoxSize;//			}			TreeNode n = (TreeNode)baseBox.item;			tj.resizeRectOthers(n, changeRatio, numAnimSteps, this);			tj.requestRedrawAll();		}		else			requestRedraw(); // redraw the frame, this will enact the movements in the move queue		flashBox = baseBox;		setFlash(null, rubberbandColor, mouseNow[X], mouseNow[Y], true);	}    private void remakerectangle() {//	if (null == flashBox) {//	    actionmodeReset(); return;//	}//	// flashbox is leftover from last reshaperectangle.//	/*//	// need to transfer the cells from the last basebox to it.//	flashBox.minc = baseBox.minc;//	flashBox.maxc = baseBox.maxc;//	System.out.println("remake "+flashBox.minc+" "+flashBox.maxc); //	setFlash(null, tj.rubberbandColor, -1, -1, true);//	return;//	*///	// need to remake the baseBox with real cell data//	// using boundaries of last rectmove flashBox//	for (int xy = 0; xy<2; xy++) {//	    // get just inside box//	    dragStart[xy] = flashBox.min[xy]+1;//	    dragEnd[xy] = flashBox.max[xy]-1;//	}//	CellGeom item = baseBox.item;//	baseBox = createBoxFromCells(dragStart, dragEnd);//	baseBox.item = item;//	if (baseBox.minc == null || baseBox.maxc == null) System.out.println("NO CELLS!");//	flashBox = baseBox;//	setFlash(null, rubberbandColor, -1, -1, true);//	// put back dragStart/End to real values//	for (int xy = 0; xy < 2; xy++) {//	    dragStart[xy] = mouseNow[xy];//	    dragEnd[xy] = mouseNow[xy];//	}    }    public void mouseEntered(MouseEvent e) {    	requestRedraw();		if (mouseOutOfWindow(e))			return;	//System.out.println("entered window");	if (!tj.getQuasimode()) requestFocus();	else tj.wantsFocusInQuasi(this);    }    public void mouseExited(MouseEvent e) {		if (mouseOutOfWindow(e))			return;	//System.out.println("left window");	if (!tj.getQuasimode()) transferFocus();	//else tj.lostFocusInQuasi(this);    }	private boolean mouseOutOfWindow(MouseEvent e)	{		return e.getX() <= 0 || e.getX() >= getWinMax(X) || e.getY() <= 0 || e.getY() >= getWinMax(Y);	}	private int closeToStuck()	{		double mouse[] = {s2w(mouseNow[X], X), s2w(mouseNow[Y], Y)};		double fuzz[] = {s2w(pickFuzz, Y), s2w(pickFuzz, Y)};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品视频在线| 婷婷开心激情综合| 亚洲老妇xxxxxx| 亚洲午夜久久久久久久久久久| 亚洲视频中文字幕| 亚洲chinese男男1069| 亚洲福利一区二区| 黄色日韩三级电影| 97久久久精品综合88久久| 欧美午夜精品一区二区三区 | 91精品一区二区三区久久久久久| 91久久免费观看| 欧美日韩国产另类不卡| 婷婷国产在线综合| 韩国精品主播一区二区在线观看| 国产在线看一区| 国产一区在线观看麻豆| 制服丝袜亚洲播放| 欧美成人一级视频| 国产欧美一区二区精品婷婷| 一区二区高清在线| 久久99精品一区二区三区三区| 懂色av一区二区三区蜜臀| 日本高清不卡在线观看| 91麻豆精品国产91久久久资源速度| 精品精品国产高清a毛片牛牛| 国产精品乱人伦中文| 日韩电影在线免费| 99视频在线精品| 国产亚洲福利社区一区| 日韩高清不卡在线| 国产精品亚洲第一| 在线视频综合导航| 欧美成人乱码一区二区三区| 亚洲第一久久影院| 成人毛片视频在线观看| 精品国产自在久精品国产| 亚洲成av人片一区二区梦乃| 99re热这里只有精品免费视频| 国产亚洲女人久久久久毛片| 首页欧美精品中文字幕| 色国产综合视频| 一级特黄大欧美久久久| 久久99精品久久久久久动态图| 欧美一区二区在线观看| 日韩专区中文字幕一区二区| 色婷婷久久久综合中文字幕| 中文字幕不卡在线播放| www.日韩av| 亚洲美女免费视频| 欧美视频一区在线| 中文字幕一区三区| 91九色最新地址| 午夜不卡av免费| 欧美www视频| 欧美军同video69gay| 亚洲成人手机在线| 欧美高清视频www夜色资源网| 午夜精品久久久久久久99水蜜桃| 欧美情侣在线播放| 国产原创一区二区三区| 亚洲人成在线播放网站岛国| 日本道免费精品一区二区三区| 亚洲九九爱视频| 久久综合中文字幕| 国产美女主播视频一区| 亚洲欧美怡红院| wwwwww.欧美系列| 欧美性受极品xxxx喷水| 国产高清精品网站| 日韩福利视频网| 一区二区三区丝袜| 久久精品视频在线看| 欧美色倩网站大全免费| 国产成人免费在线| 久久99久久精品| 亚洲成人黄色影院| 亚洲色图欧洲色图| 中文字幕一区二区三区蜜月| 国产网站一区二区| 久久一日本道色综合| 综合色中文字幕| 中文字幕av资源一区| 日韩一级视频免费观看在线| 欧美日韩在线免费视频| 在线观看日产精品| 97精品视频在线观看自产线路二| 国产成人自拍网| 天堂午夜影视日韩欧美一区二区| 亚洲综合免费观看高清完整版在线| 久久久99久久精品欧美| 国产欧美日韩麻豆91| 久久久久久久久久久久久夜| 欧美激情一区二区在线| 亚洲欧美偷拍三级| 亚洲日本韩国一区| 亚洲最色的网站| 日本欧美韩国一区三区| 国产在线播放一区二区三区| 成人丝袜高跟foot| 欧美在线观看视频在线| 精品福利一区二区三区| 日韩欧美激情四射| 精品一区二区久久久| 国产在线精品一区二区夜色| 国产999精品久久| 欧美日韩精品一区二区天天拍小说| 欧美一卡2卡3卡4卡| 国产精品乱码一区二三区小蝌蚪| 亚洲国产精品久久人人爱蜜臀| 日韩精品视频网| 成人激情av网| 日韩美女在线视频 | 91社区在线播放| 6080国产精品一区二区| 国产精品免费久久久久| 日本不卡在线视频| 在线一区二区三区四区| 久久久久久久久久久久久久久99| 夜夜爽夜夜爽精品视频| 国产精品88888| 精品卡一卡二卡三卡四在线| 亚洲一级二级三级在线免费观看| 国产成人在线网站| 欧美一级日韩不卡播放免费| 亚洲一区中文在线| 老司机精品视频在线| 欧美剧在线免费观看网站| 亚洲人成亚洲人成在线观看图片 | 国产精品中文字幕一区二区三区| 日本精品免费观看高清观看| 国产拍揄自揄精品视频麻豆| 免费日韩伦理电影| 欧美日韩一区二区三区在线看| 日本va欧美va瓶| 欧美一区三区四区| 久久99蜜桃精品| 26uuuu精品一区二区| 国产99精品在线观看| 国产午夜精品久久久久久免费视 | 国内外成人在线| www国产亚洲精品久久麻豆| 精品一区二区三区久久| 欧美一级二级在线观看| 国产伦精品一区二区三区在线观看 | 亚洲日本一区二区| 欧洲中文字幕精品| 久久av资源网| 精品国免费一区二区三区| 成人伦理片在线| 五月天激情综合| 国产欧美精品区一区二区三区| 成人av动漫在线| 日韩高清中文字幕一区| 中文一区二区在线观看| 欧美日韩另类国产亚洲欧美一级| 毛片一区二区三区| 国产精品视频第一区| 欧美喷潮久久久xxxxx| 国产精品18久久久久久久久| 欧美激情一区二区在线| 欧美日韩久久一区| 91视频一区二区| 国产在线麻豆精品观看| 日本美女视频一区二区| 亚洲激情第一区| 亚洲国产成人午夜在线一区| 91精品国产综合久久福利| 99久久伊人网影院| 久久综合综合久久综合| 国产精品一区专区| 人人超碰91尤物精品国产| 亚洲人成亚洲人成在线观看图片 | 日韩一卡二卡三卡| 精品视频免费在线| 欧美日韩精品欧美日韩精品一| 日本不卡免费在线视频| 2024国产精品视频| 91国产免费看| 成人黄色软件下载| 成人av在线网站| 91在线看国产| 欧亚洲嫩模精品一区三区| 91丨porny丨蝌蚪视频| 97久久超碰精品国产| 91一区二区在线| 欧美福利一区二区| 精品国产亚洲在线| 久久久久久免费网| 国产女人18毛片水真多成人如厕| 久久人人97超碰com| 国产欧美一区二区三区在线看蜜臀| 久久久激情视频| 一区二区三区精品| 免费成人av在线播放| 91精品国产一区二区三区香蕉| 欧美一区二区三区影视| 中文字幕欧美区| 日韩激情av在线| bt欧美亚洲午夜电影天堂|