package nc.ui.wa.ruleex.view;

import nc.ui.hr.formula.HRFormulaEditorDialog;
import nc.ui.hr.formula.HRFormulaRefPane;
import nc.ui.hr.formula.itf.IVariableFactory;
import nc.ui.hr.uif2.view.HrBillFormEditor;
import nc.ui.uif2.model.AbstractUIAppModel;
import nc.ui.wa.ruleex.formular.WaRuleFormularFactory;

/**
 * 薪资规则表公式编辑器参照
 * 
 * @author: xuhw
 * @date: 2010-2-3 下午04:06:59
 * @since: eHR V6.0
 * @走查人:
 * @走查日期:
 * @修改人:
 * @修改日期:
 */
public class WaRuleFormulaRefPane extends HRFormulaRefPane
{
	/**
	 * @author xuhw on 2010-4-15
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * FormulaRefPane 构造子注解.
	 */
	public WaRuleFormulaRefPane(AbstractUIAppModel model, HrBillFormEditor parentEditor)
	{
		super(parentEditor, model);
	}

	@Override
	protected String getConfigFileName()
	{
		return "/nc/ui/wa/rule/warule_formulaedit.xml";

	}

	@Override
	protected IVariableFactory getWaVaribleFactory()
	{
		// 必须实现该
		WaRuleFormularFactory f = new WaRuleFormularFactory();
		f.setModel(getModel());
		return f;
	}

	/**
	 * @author xuhw on 2010-4-19
	 * @see nc.ui.uif2.AppEventListener#handleEvent(nc.ui.uif2.AppEvent)
	 */
	public void setEditorDialog()
	{
		formulaDialog = new HRFormulaEditorDialog(this.getParent(), getModel(), getConfigFileName());
		setParas(formulaDialog);
	}
}
