//----------------------------BEGIN LICENSE----------------------------
/* 
 * Willow : the Open Source WorkFlow Project
 * Distributable under GNU LGPL license by gun.org
 *
 * Copyright (C) 2004-2010 huihoo.org 
 * Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com> 
 * 
 * ====================================================================
 * Project Homepage : http://www.huihoo.org/god4j
 * Source Forge     : http://sourceforge.net/projects/huihoo
 * Mailing list     : god4j@lists.sourceforge.net 
 */
//----------------------------END  LICENSE-----------------------------
package org.huihoo.god4j.tree;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class NodeExplorerMouseListner extends MouseAdapter
{
	private NodeExplorer nodeTree;
	public NodeExplorerMouseListner(NodeExplorer tree)
	{
		this.nodeTree = tree;
	}

	public void mouseReleased(MouseEvent event)
	{
		if(event.isPopupTrigger())
		{
			nodeTree.showPopup(event.getPoint());
		}
	}
	
	public void mouseClicked(MouseEvent event)
	{	
		if (event.getClickCount() == 2)
		{
			nodeTree.graphProperties();
		}
	}
}