/*
 * RemarcacoesActionFactory.java
 *
 * Created on January 31, 2007, 6:37 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package siprp.lembretes.remarcacoes;

import com.evolute.utils.data.IDObject;
import com.evolute.utils.ui.panel.multipleactionlist.ActionFactory;
import javax.swing.Action;
import siprp.lembretes.remarcacoes.actions.TratarMarcacaoEstabelecimentoAction;
import siprp.lembretes.remarcacoes.actions.TratarMarcacaoTrabalhadorAction;

/**
 *
 * @author fpalma
 */
public class RemarcacoesActionFactory implements ActionFactory<IDObject>
{
	public static final int TRABALHADOR = 0;
	public static final int ESTABELECIMENTO = 1;
	
	protected final int TIPO;
	
	/**
	 * Creates a new instance of RemarcacoesActionFactory
	 */
	public RemarcacoesActionFactory( int tipo )
	{
		TIPO = tipo;
	}

	public Action createAction(IDObject[] objects)
	{
		return null;
	}

	public Action createAction(IDObject object)
	{
		switch( TIPO )
		{
			case TRABALHADOR:
				return new TratarMarcacaoTrabalhadorAction( object );
				
			case ESTABELECIMENTO:
				return new TratarMarcacaoEstabelecimentoAction( object );
				
			default:
				return null;
		}
	}
	
}
