Demo entry 6347296

sss

   

Submitted by hah on Feb 14, 2017 at 06:33
Language: Java. Code size: 917 Bytes.

/* 鼠标右键事件,根据不同的节点类型显示弹出菜单 */
if(e.getButton() == MouseEvent.BUTTON3){

	if(node instanceof SUINodeSysRoot){ // 系统节点
		new SUIPopMenuS(nodeTree, (SUINodeSysRoot)node, treeModel).show(nodeTree, e.getX(), e.getY());
	}else if(node instanceof SUINodeProcessor){ // 处理器节点
		new SUIPopMenuPo(nodeTree, (SUINodeProcessor)node, treeModel, clickPath).show(nodeTree, e.getX(), e.getY());
	}else if(node instanceof SUINodePartition){ // 分区节点
		new SUIPopMenuPa(nodeTree, (SUINodePartition)node, treeModel, clickPath).show(nodeTree, e.getX(), e.getY());
	}else if(node instanceof SUINodeTaskLeaf){ // 任务节点
		new SUIPopMenuT(nodeTree, (SUINodeTaskLeaf)node, treeModel, clickPath).show(nodeTree, e.getX(), e.getY());
	}else if(node instanceof SUINodeEventList){ // 任务事件集合节点
		new mh.sim.ui.popmenu.SUIPopMenuEeventList(nodeTree, (SUINodeEventList)node, treeModel, clickPath).show(nodeTree, e.getX(), e.getY());
	}

}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).