package u8c.ic.safetystock.panel; import nc.ui.hr.frame.FrameUI; import nc.ui.hr.frame.MainPanel; import nc.ui.hr.frame.TopPanel; import nc.ui.hr.frame.action.CancelAction; import nc.ui.hr.frame.action.RefreshAction; import nc.ui.hr.frame.action.ReturnFromCardToListAction; import nc.ui.hr.frame.button.AbstractBtnReg; import nc.ui.hr.frame.button.BtnStateReg; import nc.ui.pub.bill.BillCardPanel; import u8c.ic.safetystock.action.SafetystockAddAction; import u8c.ic.safetystock.action.SafetystockDeleteAction; import u8c.ic.safetystock.action.SafetystockEditAction; import u8c.ic.safetystock.action.SafetystockImportAction; import u8c.ic.safetystock.action.SafetystockQueryAction; import u8c.ic.safetystock.action.SafetystockSaveAction; import u8c.ic.safetystock.button.SafetystockBtnStateReg; import u8c.ic.safetystock.datamodel.SafetystockDataModel; public class SafetystockTestUI extends FrameUI{ protected void initialize(){ super.initialize(); } @Override protected void initButtons() { // 初始化按钮 getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_ADD); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_EDIT); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_DELETE); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_QUERY); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_REFRESH); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_SAVE); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_CANCEL); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_RETURN); getBtnManager().addButtonByID(AbstractBtnReg.SYSBTN_IMPORT); // 配置按钮动作类 getBtnManager().regCmd(AbstractBtnReg.SYSBTN_ADD, new SafetystockAddAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_EDIT, new SafetystockEditAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_DELETE, new SafetystockDeleteAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_QUERY, new SafetystockQueryAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_REFRESH, new RefreshAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_SAVE, new SafetystockSaveAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_CANCEL, new CancelAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_RETURN, new ReturnFromCardToListAction(this)); getBtnManager().regCmd(AbstractBtnReg.SYSBTN_IMPORT, new SafetystockImportAction(this)); // 按钮排序 getBtnManager().adjustButtonOrder(new int[] { AbstractBtnReg.SYSBTN_ADD, AbstractBtnReg.SYSBTN_EDIT, AbstractBtnReg.SYSBTN_DELETE, AbstractBtnReg.SYSBTN_QUERY, AbstractBtnReg.SYSBTN_REFRESH, AbstractBtnReg.SYSBTN_SAVE, AbstractBtnReg.SYSBTN_CANCEL, AbstractBtnReg.SYSBTN_RETURN, AbstractBtnReg.SYSBTN_IMPORT}); } @Override protected MainPanel createMainPanel() { // 主界面 SafetystockDataModel model = (SafetystockDataModel) getDataModel(); return new SafetystockMainPenel(this, model.getBillTempletCode(), model.getBillTempletBusiType()); } @Override protected TopPanel createTopPanel() { //顶部面板 return new SafetystockTopPanel(this); } @Override protected BtnStateReg createButtonStateRegister() { // 按钮状态注册类 return new SafetystockBtnStateReg(getDataModel().getState()); } @Override protected SafetystockDataModel createDataModel() { // 配数据模型类 return new SafetystockDataModel(); } @Override public boolean needLeftPanel() { return false; } @Override public boolean needTopPanel() { return false; } @Override public String getQueryNodeKey() { // 在【功能节点默认模板设置】中查询模板的节点标识 return "40H205"; } @Override public String getModuleCode() { // 节点编码 return "40H205"; } public BillCardPanel getBillCardPanel() { this.getBtnManager().setButtonEnabled(AbstractBtnReg.SYSBTN_RETURN, true); return ((SafetystockMainPenel) (this.getMainPanel())).getBillCardPanel(); } }