/*
 Tiamat - a role-playing game framework
 NavigationTreeNode.java - node displayed in the navigation panel
 
 Copyright  (C) 2006 Hugues Johnson
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 the GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

package com.huguesjohnson.tiamat.tools.adventureStudio;

import javax.swing.tree.DefaultMutableTreeNode;
import com.huguesjohnson.tiamat.tools.adventureStudio.event.NavigationEventHandler;

/**  NavigationTreeNode - node displayed in the navigation panel
 * @author Hugues Johnson
 */
public class NavigationTreeNode extends DefaultMutableTreeNode{
	/** Determines if a de-serialized file is compatible with this class. See <a href="http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/class.html">Java Object Serialization Specifications</a>. */
	private static final long serialVersionUID=3892007832944182952L;

	private String caption;
	private String getCaption(){ return(this.caption); }
	public void setCaption(String caption){ this.caption=new String(caption); }

	private String filePath;
	public String getFilePath(){ return(this.filePath); }
	private void setFilePath(String filePath){ this.filePath=new String(filePath); }
	
	private NavigationEventHandler eventHandler;
	public NavigationEventHandler getEventHandler(){ return(this.eventHandler); }
	public void setEventHandler(NavigationEventHandler eventHandler){ this.eventHandler=eventHandler; }
	
	public NavigationTreeNode(String caption,String filePath,NavigationEventHandler eventHandler){
		this.setCaption(caption);
		this.setEventHandler(eventHandler);
		this.setFilePath(filePath);
	}
	
	public String toString(){
		return(this.caption);		
	}
	
}