///*******************************************************************************
// * This file is part of GECAMed.
// * 
// * GECAMed is free software: you can redistribute it and/or modify
// * it under the terms of the GNU Lesser General Public License (L-GPL) as published by
// * the Free Software Foundation, either version 3 of the License, or
// * (at your option) any later version.
// * 
// * GECAMed 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 Lesser General Public License for more details.
// * 
// * You should have received a copy of the GNU Lesser General Public License (L-GPL)
// * along with GECAMed.  If not, see <http://www.gnu.org/licenses/>.
// * 
// * GECAMed is Copyrighted by the Centre de Recherche Public Henri Tudor (http://www.tudor.lu)
// * (c) CRP Henri Tudor, Luxembourg, 2008
// *******************************************************************************/
//package lu.tudor.santec.gecamed.letter.gui.listeners;
//
//import java.awt.event.ActionEvent;
//import java.awt.event.ActionListener;
//
//import javax.swing.JOptionPane;
//
//import lu.tudor.santec.gecamed.letter.ejb.entity.beans.LetterTemplate;
//import lu.tudor.santec.gecamed.letter.gui.LetterTemplateModule;
//import lu.tudor.santec.i18n.Translatrix;
//
///*
// *  Renames a template
// */
//
//public class RenameTemplateListener implements ActionListener {
//
//	public void actionPerformed(ActionEvent e) {
//		if (LetterTemplateModule.getInstance().getList().getSelectedIndex() > -1) {
//
//			LetterTemplate letterTemplate = (LetterTemplate) LetterTemplateModule
//					.getInstance().getList().getSelectedValue();
//			String name = letterTemplate.getName();
//			String new_name = JOptionPane
//					.showInputDialog(
//							LetterTemplateModule.getInstance().getContentPane(),
//							Translatrix
//									.getTranslationString("LetterTemplateModule.dialog.fields.rename"),
//							name);
//
//			if (new_name != null) {
//				letterTemplate.setName(new_name);
//
//				LetterTemplateModule.getInstance().getManager().addTemplate(
//						letterTemplate);
//				LetterTemplateModule.getInstance().getDetails().render(
//						(LetterTemplate) LetterTemplateModule.getInstance().getList()
//								.getSelectedValue());
//			}
//		}
//	}
//}
