package de.dass_it.vanhelsing.gui.items;

import javax.swing.tree.DefaultMutableTreeNode;
import com.icesoft.faces.component.tree.IceUserObject;
/**
 * UserObjectItemType contains the UserObjectItem i.e the ResourceItem.
 * The visual properties of the tree node are set using the UserObjectItemType.
 * @author tgoecke
 *
 */
public class UserObjectItemType extends IceUserObject {

	private UserObjectItem userObject;
	private boolean selected;
	
	public UserObjectItemType(DefaultMutableTreeNode defaultMutableTreeNode){
		super(defaultMutableTreeNode);
		setBranchContractedIcon("tree_folder_closed.gif");
		setBranchExpandedIcon("tree_folder_open.gif");
		setLeafIcon("tree_document.gif");
		setLeaf(true);
		setExpanded(false);
		setSelected(false);
	}

	public UserObjectItem getUserObject(){
		return userObject;
	}
	public void setUserObject(UserObjectItem userObject){
		this.userObject = userObject;
	}
	public boolean getSelected(){
		return selected;
	}
	public void setSelected(boolean selected){
		this.selected = selected;
	}
	public void switchSelected(){
		setSelected(!selected);
	}

}
