package lu.tudor.santec.gecamed.formeditor.gui.controller.action;

import java.awt.event.ActionEvent;

import lu.tudor.santec.gecamed.core.gui.GECAMedIconNames;
import lu.tudor.santec.gecamed.core.gui.GECAMedModule;
import lu.tudor.santec.gecamed.core.gui.listener.AEntryAction;
import lu.tudor.santec.gecamed.core.gui.listener.EntryTypeRegister;
import lu.tudor.santec.i18n.Translatrix;

public class FormEntryOpenAction extends AEntryAction {

	private static final long serialVersionUID = 1L;

	public FormEntryOpenAction() {
		/* ======================================== */
		super(Translatrix.getTranslationString("formeditor.form.open"),
				GECAMedModule.getSmallIcon(GECAMedIconNames.OPEN));	
		/* ======================================== */
	}
	public void actionPerformed(ActionEvent e) {
		/* ======================================== */
		// open the entry
		EntryTypeRegister.getHandler(entry2work.getEntryType().getName()).openEntry(entry2work);
		/* ======================================== */
	}

}