/*
 * ProcessoMutableTreeNode.java
 *
 * Created on 29 de Abril de 2007, 19:31
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package siprp.medicina.processo.estrutura;

import java.awt.Color;

import siprp.database.cayenne.objects.TrabalhadoresProcesso;
import siprp.medicina.MedicinaConstants;
import siprp.medicina.processo.ProcessoConstants;

/**
 *
 * @author Frederico
 */
public class ProcessoMutableTreeNode extends EstruturaProcessoMutableTreeNode
{
	private static final long serialVersionUID = 1L;
	public static final String ICON_PATH = "siprp/medicina/processo/estrutura/icons/processo.png";
		
	/** Creates a new instance of ProcessoMutableTreeNode */
	public ProcessoMutableTreeNode( TrabalhadoresProcesso userObject )
	{
		super( userObject );
	}
	
	@Override
	public Color getColor()
	{
		if(userObject != null && ProcessoConstants.PROCESSO_ABERTO_CODE.equals( ((TrabalhadoresProcesso)userObject).getEstado()))
		{
			return Color.RED;
		}
		return Color.BLACK;
	}
	
	protected String getIconPath()
	{
		return ICON_PATH;
	}
}