package eu.dnetlib.dlms.swing.menu;

import javax.swing.JMenuItem;
import org.springframework.beans.factory.annotation.Required;
import eu.dnetlib.dlms.swing.DorotyCore;
import eu.dnetlib.dlms.swing.DorotyMainFrame;

public abstract class AbstractMenuItem extends JMenuItem {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8528937081024546455L;
	private String path;
	
	protected DorotyCore dorotyCore;
	
	public String getPath() {
		return path;
	}

	abstract public void execute(DorotyMainFrame frame);
	
	@Required
	public void setPath(String path) {
		this.path = path;
	}

	@Override
	@Required
	public void setText(String text) {
		super.setText(text);
	}

	public DorotyCore getDorotyCore() {
		return dorotyCore;
	}

	@Required
	public void setDorotyCore(DorotyCore dorotyCore) {
		this.dorotyCore = dorotyCore;
	}
}
