/*******************************************************************************
 * 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.core.utils.ManagerFactory;
//import lu.tudor.santec.gecamed.letter.gui.LetterPanel;
//import lu.tudor.santec.gecamed.letter.gui.LetterTemplateModule;
//import lu.tudor.santec.gecamed.patient.ejb.session.beans.IncidentManagerBean;
//import lu.tudor.santec.gecamed.patient.ejb.session.interfaces.IncidentManager;
//import lu.tudor.santec.gecamed.patient.gui.PatientManagerModule;
//import lu.tudor.santec.gecamed.patient.gui.history.table.HistoryTableModel.HistRow;
//import lu.tudor.santec.i18n.Translatrix;
//
///*
// * Renames a letter
// */
//
//public class RenameLetterListener implements ActionListener {
//	private HistRow row;
//
//	public void actionPerformed(ActionEvent e) {
//		int row_number = LetterPanel.getInstance().getTable().getSelectedRow();
//		if (row_number > -1) {
//			row = LetterPanel.getInstance().getTableData().get(row_number);
//
//			String name = row.getEntry().getFileName();
//
//			String new_name = JOptionPane
//					.showInputDialog(LetterTemplateModule.getInstance().getContentPane(),
//							Translatrix
//									.getTranslationString("LetterTemplateModule.dialog.fields.rename"),
//							name);
//
//			if (new_name != null) {
//				row.getEntry().setFileName(new_name);
//				IncidentManager iManager = (IncidentManager) ManagerFactory
//						.getRemote(IncidentManagerBean.class);
//				iManager.saveEntry(row.getEntry(), IncidentManagerBean.LETTER);
//				PatientManagerModule.getInstance().getPatientPanel()
//						.reloadHistory();
//			}
//		}
//	}
//}
