package lu.tudor.santec.gecamed.letter.gui.actions;

import java.awt.event.ActionEvent;

import javax.swing.ImageIcon;

import lu.tudor.santec.gecamed.core.gui.GECAMedAction;
import lu.tudor.santec.gecamed.letter.gui.LetterTemplateModule;

/**
 * @author jens.ferring(at)tudor.lu
 * 
 * @version
 * <br>$Log: SaveTemplateAction.java,v $
 * <br>Revision 1.1  2013-01-02 13:17:43  ferring
 * <br>Letter module layout and behaviour adapted to GECAMed defaults
 * <br>
 */

public class SaveTemplateAction extends GECAMedAction
{
	/* ======================================== */
	// 		CONSTANTS
	/* ======================================== */
	
	private static final long	serialVersionUID	= 1L;
	
	
	
	/* ======================================== */
	// 		MEMBERS
	/* ======================================== */
	
	private LetterTemplateModule module;
	
	
	/* ======================================== */
	// 		CONSTRUCTORS
	/* ======================================== */
	
	public SaveTemplateAction(LetterTemplateModule parent, String name,
			ImageIcon icon, Integer shortcut, boolean isMenuAction,
			boolean isTopBarAction, boolean isBottomBarAction) 
	{
		super(parent, name, icon, shortcut, isMenuAction,
				isTopBarAction, isBottomBarAction);
		
		this.module = parent;
	}
	
	
	
	/* ======================================== */
	// 		CLASS BODY
	/* ======================================== */
	
	@Override
	public void actionPerformed(ActionEvent p_Event)
	{
		module.save();
	}
}
