/** * output package name */ package com.kingdee.eas.custom.bd.param.client; import org.apache.log4j.*; import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.border.*; import javax.swing.BorderFactory; import javax.swing.event.*; import javax.swing.KeyStroke; import com.kingdee.bos.ctrl.swing.*; import com.kingdee.bos.ctrl.kdf.table.*; import com.kingdee.bos.ctrl.kdf.data.event.*; import com.kingdee.bos.dao.*; import com.kingdee.bos.dao.query.*; import com.kingdee.bos.metadata.*; import com.kingdee.bos.metadata.entity.*; import com.kingdee.bos.ui.face.*; import com.kingdee.bos.ui.util.ResourceBundleHelper; import com.kingdee.bos.util.BOSUuid; import com.kingdee.bos.service.ServiceContext; import com.kingdee.jdbc.rowset.IRowSet; import com.kingdee.util.enums.EnumUtils; import com.kingdee.bos.ui.face.UIRuleUtil; import com.kingdee.bos.ctrl.swing.event.*; import com.kingdee.bos.ctrl.kdf.table.event.*; import com.kingdee.bos.ctrl.extendcontrols.*; import com.kingdee.bos.ctrl.kdf.util.render.*; import com.kingdee.bos.ui.face.IItemAction; import com.kingdee.eas.framework.batchHandler.RequestContext; import com.kingdee.bos.ui.util.IUIActionPostman; import com.kingdee.bos.appframework.client.servicebinding.ActionProxyFactory; import com.kingdee.bos.appframework.uistatemanage.ActionStateConst; import com.kingdee.bos.appframework.validator.ValidateHelper; import com.kingdee.bos.appframework.uip.UINavigator; /** * output class name */ public abstract class AbstractParamEditUI extends com.kingdee.eas.framework.client.EditUI { private static final Logger logger = CoreUIObject.getLogger(AbstractParamEditUI.class); protected KDLabelContainer contId; protected KDLabelContainer contCreator; protected KDLabelContainer contCreateTime; protected KDLabelContainer contLastUpdateUser; protected KDLabelContainer contLastUpdateTime; protected KDLabelContainer contCU; protected KDLabelContainer contBaseInfoId; protected KDCheckBox chkIsComUse; protected KDLabelContainer contIndex; protected KDLabelContainer contHrOrgUse; protected KDLabelContainer contState; protected KDLabelContainer contChangeType; protected KDTextField txtId; protected KDBizPromptBox prmtCreator; protected KDTimePicker pkCreateTime; protected KDBizPromptBox prmtLastUpdateUser; protected KDTimePicker pkLastUpdateTime; protected KDBizPromptBox prmtCU; protected KDTextField txtBaseInfoId; protected KDTextField txtIndex; protected KDBizPromptBox prmtHrOrgUse; protected KDComboBox comboState; protected KDComboBox comboChangeType; protected com.kingdee.eas.framework.CoreBaseInfo editData = null; protected com.kingdee.eas.custom.bd.param.ParamInfo entityBaseItemCustom = null; /** * output class constructor */ public AbstractParamEditUI() throws Exception { super(); this.defaultObjectName = "editData"; jbInit(); initUIP(); } /** * output jbInit method */ private void jbInit() throws Exception { this.resHelper = new ResourceBundleHelper(AbstractParamEditUI.class.getName()); this.setUITitle(resHelper.getString("this.title")); this.contId = new KDLabelContainer(); this.contCreator = new KDLabelContainer(); this.contCreateTime = new KDLabelContainer(); this.contLastUpdateUser = new KDLabelContainer(); this.contLastUpdateTime = new KDLabelContainer(); this.contCU = new KDLabelContainer(); this.contBaseInfoId = new KDLabelContainer(); this.chkIsComUse = new KDCheckBox(); this.contIndex = new KDLabelContainer(); this.contHrOrgUse = new KDLabelContainer(); this.contState = new KDLabelContainer(); this.contChangeType = new KDLabelContainer(); this.txtId = new KDTextField(); this.prmtCreator = new KDBizPromptBox(); this.pkCreateTime = new KDTimePicker(); this.prmtLastUpdateUser = new KDBizPromptBox(); this.pkLastUpdateTime = new KDTimePicker(); this.prmtCU = new KDBizPromptBox(); this.txtBaseInfoId = new KDTextField(); this.txtIndex = new KDTextField(); this.prmtHrOrgUse = new KDBizPromptBox(); this.comboState = new KDComboBox(); this.comboChangeType = new KDComboBox(); this.contId.setName("contId"); this.contCreator.setName("contCreator"); this.contCreateTime.setName("contCreateTime"); this.contLastUpdateUser.setName("contLastUpdateUser"); this.contLastUpdateTime.setName("contLastUpdateTime"); this.contCU.setName("contCU"); this.contBaseInfoId.setName("contBaseInfoId"); this.chkIsComUse.setName("chkIsComUse"); this.contIndex.setName("contIndex"); this.contHrOrgUse.setName("contHrOrgUse"); this.contState.setName("contState"); this.contChangeType.setName("contChangeType"); this.txtId.setName("txtId"); this.prmtCreator.setName("prmtCreator"); this.pkCreateTime.setName("pkCreateTime"); this.prmtLastUpdateUser.setName("prmtLastUpdateUser"); this.pkLastUpdateTime.setName("pkLastUpdateTime"); this.prmtCU.setName("prmtCU"); this.txtBaseInfoId.setName("txtBaseInfoId"); this.txtIndex.setName("txtIndex"); this.prmtHrOrgUse.setName("prmtHrOrgUse"); this.comboState.setName("comboState"); this.comboChangeType.setName("comboChangeType"); // CoreUI this.btnPageSetup.setVisible(false); this.btnCloud.setVisible(false); this.btnXunTong.setVisible(false); this.kDSeparatorCloud.setVisible(false); this.menuItemPageSetup.setVisible(false); this.menuItemCloudFeed.setVisible(false); this.menuItemCloudScreen.setEnabled(false); this.menuItemCloudScreen.setVisible(false); this.menuItemCloudShare.setVisible(false); this.kdSeparatorFWFile1.setVisible(false); this.kDSeparator2.setVisible(false); this.menuItemPrint.setVisible(false); this.menuItemPrintPreview.setVisible(false); this.kDSeparator4.setVisible(false); this.kDSeparator4.setEnabled(false); this.rMenuItemSubmit.setVisible(false); this.rMenuItemSubmit.setEnabled(false); this.rMenuItemSubmitAndAddNew.setVisible(false); this.rMenuItemSubmitAndAddNew.setEnabled(false); this.rMenuItemSubmitAndPrint.setVisible(false); this.rMenuItemSubmitAndPrint.setEnabled(false); this.btnReset.setEnabled(false); this.btnReset.setVisible(false); this.menuItemReset.setEnabled(false); this.menuItemReset.setVisible(false); // contId this.contId.setBoundLabelText(resHelper.getString("contId.boundLabelText")); this.contId.setBoundLabelLength(100); this.contId.setBoundLabelUnderline(true); // contCreator this.contCreator.setBoundLabelText(resHelper.getString("contCreator.boundLabelText")); this.contCreator.setBoundLabelLength(100); this.contCreator.setBoundLabelUnderline(true); // contCreateTime this.contCreateTime.setBoundLabelText(resHelper.getString("contCreateTime.boundLabelText")); this.contCreateTime.setBoundLabelLength(100); this.contCreateTime.setBoundLabelUnderline(true); // contLastUpdateUser this.contLastUpdateUser.setBoundLabelText(resHelper.getString("contLastUpdateUser.boundLabelText")); this.contLastUpdateUser.setBoundLabelLength(100); this.contLastUpdateUser.setBoundLabelUnderline(true); // contLastUpdateTime this.contLastUpdateTime.setBoundLabelText(resHelper.getString("contLastUpdateTime.boundLabelText")); this.contLastUpdateTime.setBoundLabelLength(100); this.contLastUpdateTime.setBoundLabelUnderline(true); // contCU this.contCU.setBoundLabelText(resHelper.getString("contCU.boundLabelText")); this.contCU.setBoundLabelLength(100); this.contCU.setBoundLabelUnderline(true); // contBaseInfoId this.contBaseInfoId.setBoundLabelText(resHelper.getString("contBaseInfoId.boundLabelText")); this.contBaseInfoId.setBoundLabelLength(100); this.contBaseInfoId.setBoundLabelUnderline(true); // chkIsComUse this.chkIsComUse.setText(resHelper.getString("chkIsComUse.text")); // contIndex this.contIndex.setBoundLabelText(resHelper.getString("contIndex.boundLabelText")); this.contIndex.setBoundLabelLength(100); this.contIndex.setBoundLabelUnderline(true); // contHrOrgUse this.contHrOrgUse.setBoundLabelText(resHelper.getString("contHrOrgUse.boundLabelText")); this.contHrOrgUse.setBoundLabelLength(100); this.contHrOrgUse.setBoundLabelUnderline(true); // contState this.contState.setBoundLabelText(resHelper.getString("contState.boundLabelText")); this.contState.setBoundLabelLength(100); this.contState.setBoundLabelUnderline(true); // contChangeType this.contChangeType.setBoundLabelText(resHelper.getString("contChangeType.boundLabelText")); this.contChangeType.setBoundLabelLength(100); this.contChangeType.setBoundLabelUnderline(true); // txtId this.txtId.setMaxLength(44); // prmtCreator // pkCreateTime // prmtLastUpdateUser // pkLastUpdateTime // prmtCU // txtBaseInfoId this.txtBaseInfoId.setMaxLength(44); // txtIndex this.txtIndex.setMaxLength(44); // prmtHrOrgUse // comboState this.comboState.addItems(EnumUtils.getEnumList("com.kingdee.shr.base.syssetting.DisatributeState").toArray()); // comboChangeType this.comboChangeType.addItems(EnumUtils.getEnumList("com.kingdee.shr.base.syssetting.BaseDataChangeType").toArray()); //Register control's property binding registerBindings(); registerUIState(); } public KDToolBar[] getUIMultiToolBar(){ java.util.List list = new ArrayList(); KDToolBar[] bars = super.getUIMultiToolBar(); if (bars != null) { list.addAll(Arrays.asList(bars)); } return (KDToolBar[])list.toArray(new KDToolBar[list.size()]); } /** * output initUIContentLayout method */ public void initUIContentLayout() { this.setBounds(new Rectangle(10, 10, 1013, 629)); this.setLayout(null); contId.setBounds(new Rectangle(10, 10, 270, 19)); this.add(contId, null); contCreator.setBounds(new Rectangle(300, 10, 270, 19)); this.add(contCreator, null); contCreateTime.setBounds(new Rectangle(10, 40, 270, 19)); this.add(contCreateTime, null); contLastUpdateUser.setBounds(new Rectangle(300, 40, 270, 19)); this.add(contLastUpdateUser, null); contLastUpdateTime.setBounds(new Rectangle(10, 70, 270, 19)); this.add(contLastUpdateTime, null); contCU.setBounds(new Rectangle(300, 70, 270, 19)); this.add(contCU, null); contBaseInfoId.setBounds(new Rectangle(10, 100, 270, 19)); this.add(contBaseInfoId, null); chkIsComUse.setBounds(new Rectangle(300, 100, 140, 19)); this.add(chkIsComUse, null); contIndex.setBounds(new Rectangle(10, 130, 270, 19)); this.add(contIndex, null); contHrOrgUse.setBounds(new Rectangle(300, 130, 270, 19)); this.add(contHrOrgUse, null); contState.setBounds(new Rectangle(10, 160, 270, 19)); this.add(contState, null); contChangeType.setBounds(new Rectangle(300, 160, 270, 19)); this.add(contChangeType, null); //contId contId.setBoundEditor(txtId); //contCreator contCreator.setBoundEditor(prmtCreator); //contCreateTime contCreateTime.setBoundEditor(pkCreateTime); //contLastUpdateUser contLastUpdateUser.setBoundEditor(prmtLastUpdateUser); //contLastUpdateTime contLastUpdateTime.setBoundEditor(pkLastUpdateTime); //contCU contCU.setBoundEditor(prmtCU); //contBaseInfoId contBaseInfoId.setBoundEditor(txtBaseInfoId); //contIndex contIndex.setBoundEditor(txtIndex); //contHrOrgUse contHrOrgUse.setBoundEditor(prmtHrOrgUse); //contState contState.setBoundEditor(comboState); //contChangeType contChangeType.setBoundEditor(comboChangeType); } /** * output initUIMenuBarLayout method */ public void initUIMenuBarLayout() { this.menuBar.add(menuFile); this.menuBar.add(menuEdit); this.menuBar.add(MenuService); this.menuBar.add(menuView); this.menuBar.add(menuBiz); this.menuBar.add(menuTool); this.menuBar.add(menuHelp); //menuFile menuFile.add(menuItemAddNew); menuFile.add(kDSeparator1); menuFile.add(menuItemCloudFeed); menuFile.add(menuItemSave); menuFile.add(menuItemCloudScreen); menuFile.add(menuItemSubmit); menuFile.add(menuItemCloudShare); menuFile.add(menuSubmitOption); menuFile.add(kdSeparatorFWFile1); menuFile.add(rMenuItemSubmit); menuFile.add(rMenuItemSubmitAndAddNew); menuFile.add(rMenuItemSubmitAndPrint); menuFile.add(separatorFile1); menuFile.add(MenuItemAttachment); menuFile.add(kDSeparator2); menuFile.add(menuItemPageSetup); menuFile.add(menuItemPrint); menuFile.add(menuItemPrintPreview); menuFile.add(kDSeparator3); menuFile.add(menuItemExitCurrent); //menuSubmitOption menuSubmitOption.add(chkMenuItemSubmitAndAddNew); menuSubmitOption.add(chkMenuItemSubmitAndPrint); //menuEdit menuEdit.add(menuItemCopy); menuEdit.add(menuItemEdit); menuEdit.add(menuItemRemove); menuEdit.add(kDSeparator4); menuEdit.add(menuItemReset); //MenuService MenuService.add(MenuItemKnowStore); MenuService.add(MenuItemAnwser); MenuService.add(SepratorService); MenuService.add(MenuItemRemoteAssist); //menuView menuView.add(menuItemFirst); menuView.add(menuItemPre); menuView.add(menuItemNext); menuView.add(menuItemLast); //menuBiz menuBiz.add(menuItemCancelCancel); menuBiz.add(menuItemCancel); //menuTool menuTool.add(menuItemMsgFormat); menuTool.add(menuItemSendMessage); menuTool.add(menuItemCalculator); menuTool.add(menuItemToolBarCustom); //menuHelp menuHelp.add(menuItemHelp); menuHelp.add(kDSeparator12); menuHelp.add(menuItemRegPro); menuHelp.add(menuItemPersonalSite); menuHelp.add(helpseparatorDiv); menuHelp.add(menuitemProductval); menuHelp.add(kDSeparatorProduct); menuHelp.add(menuItemAbout); } /** * output initUIToolBarLayout method */ public void initUIToolBarLayout() { this.toolBar.add(btnAddNew); this.toolBar.add(btnCloud); this.toolBar.add(btnEdit); this.toolBar.add(btnXunTong); this.toolBar.add(btnReset); this.toolBar.add(kDSeparatorCloud); this.toolBar.add(btnSave); this.toolBar.add(btnSubmit); this.toolBar.add(btnCopy); this.toolBar.add(btnRemove); this.toolBar.add(btnAttachment); this.toolBar.add(separatorFW1); this.toolBar.add(btnPageSetup); this.toolBar.add(btnPrint); this.toolBar.add(btnPrintPreview); this.toolBar.add(separatorFW2); this.toolBar.add(btnFirst); this.toolBar.add(btnPre); this.toolBar.add(btnNext); this.toolBar.add(btnLast); this.toolBar.add(separatorFW3); this.toolBar.add(btnCancelCancel); this.toolBar.add(btnCancel); } //Regiester control's property binding. private void registerBindings(){ dataBinder.registerBinding("isComUse", boolean.class, this.chkIsComUse, "selected"); dataBinder.registerBinding("id", BOSUuid.class, this.txtId, "text"); dataBinder.registerBinding("creator", com.kingdee.eas.base.permission.UserInfo.class, this.prmtCreator, "data"); dataBinder.registerBinding("createTime", java.sql.Timestamp.class, this.pkCreateTime, "value"); dataBinder.registerBinding("lastUpdateUser", com.kingdee.eas.base.permission.UserInfo.class, this.prmtLastUpdateUser, "data"); dataBinder.registerBinding("lastUpdateTime", java.sql.Timestamp.class, this.pkLastUpdateTime, "value"); dataBinder.registerBinding("CU", com.kingdee.eas.basedata.org.CtrlUnitInfo.class, this.prmtCU, "data"); dataBinder.registerBinding("baseInfoId", String.class, this.txtBaseInfoId, "text"); dataBinder.registerBinding("index", String.class, this.txtIndex, "text"); dataBinder.registerBinding("hrOrgUse", com.kingdee.eas.basedata.org.HROrgUnitInfo.class, this.prmtHrOrgUse, "data"); dataBinder.registerBinding("state", com.kingdee.shr.base.syssetting.DisatributeState.class, this.comboState, "selectedItem"); dataBinder.registerBinding("changeType", com.kingdee.shr.base.syssetting.BaseDataChangeType.class, this.comboChangeType, "selectedItem"); } //Regiester UI State private void registerUIState(){ } public String getUIHandlerClassName() { return "com.kingdee.eas.custom.bd.param.app.ParamEditUIHandler"; } public IUIActionPostman prepareInit() { IUIActionPostman clientHanlder = super.prepareInit(); if (clientHanlder != null) { RequestContext request = new RequestContext(); request.setClassName(getUIHandlerClassName()); clientHanlder.setRequestContext(request); } return clientHanlder; } public boolean isPrepareInit() { return false; } protected void initUIP() { super.initUIP(); } /** * output setDataObject method */ public void setDataObject(IObjectValue dataObject) { IObjectValue ov = dataObject; super.setDataObject(ov); this.editData = (com.kingdee.eas.framework.CoreBaseInfo)ov; } /** * output setDataObject method */ public void setDataObject(String key, IObjectValue dataObject) { super.setDataObject(key, dataObject); } protected com.kingdee.eas.basedata.org.OrgType getMainBizOrgType() { return com.kingdee.eas.basedata.org.OrgType.getEnum("HRO"); } /** * output loadFields method */ public void loadFields() { dataBinder.loadFields(); } protected void setOrgF7(KDBizPromptBox f7,com.kingdee.eas.basedata.org.OrgType orgType) throws Exception { com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer oufip = new com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer(orgType); oufip.getModel().setIsCUFilter(true); f7.setFilterInfoProducer(oufip); } /** * output storeFields method */ public void storeFields() { dataBinder.storeFields(); } /** * ????????งต?? */ protected void registerValidator() { getValidateHelper().setCustomValidator( getValidator() ); getValidateHelper().registerBindProperty("isComUse", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("id", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("creator", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("createTime", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("lastUpdateUser", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("lastUpdateTime", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("CU", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("baseInfoId", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("index", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("hrOrgUse", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("state", ValidateHelper.ON_SAVE); getValidateHelper().registerBindProperty("changeType", ValidateHelper.ON_SAVE); } /** * output setOprtState method */ public void setOprtState(String oprtType) { super.setOprtState(oprtType); if (STATUS_ADDNEW.equals(this.oprtState)) { } else if (STATUS_EDIT.equals(this.oprtState)) { } else if (STATUS_VIEW.equals(this.oprtState)) { } } /** * output getSelectors method */ public SelectorItemCollection getSelectors() { SelectorItemCollection sic = new SelectorItemCollection(); String selectorAll = System.getProperty("selector.all"); if(StringUtils.isEmpty(selectorAll)){ selectorAll = "true"; } sic.add(new SelectorItemInfo("isComUse")); sic.add(new SelectorItemInfo("id")); sic.add(new SelectorItemInfo("creator")); sic.add(new SelectorItemInfo("createTime")); sic.add(new SelectorItemInfo("lastUpdateUser")); sic.add(new SelectorItemInfo("lastUpdateTime")); sic.add(new SelectorItemInfo("CU")); sic.add(new SelectorItemInfo("baseInfoId")); sic.add(new SelectorItemInfo("index")); sic.add(new SelectorItemInfo("hrOrgUse")); sic.add(new SelectorItemInfo("state")); sic.add(new SelectorItemInfo("changeType")); return sic; } /** * output getMetaDataPK method */ public IMetaDataPK getMetaDataPK() { return new MetaDataPK("com.kingdee.eas.custom.bd.param.client", "ParamEditUI"); } /** * output getEditUIName method */ protected String getEditUIName() { return ParamEditUI.class.getName(); } /** * output getBizInterface method */ protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception { return com.kingdee.eas.custom.bd.param.ParamFactory.getRemoteInstance(); } /** * output createNewData method */ protected IObjectValue createNewData() { com.kingdee.eas.custom.bd.param.ParamInfo objectValue = new com.kingdee.eas.custom.bd.param.ParamInfo(); objectValue.setCreator((com.kingdee.eas.base.permission.UserInfo)(com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentUser())); return objectValue; } /** * output getDetailTable method */ protected KDTable getDetailTable() { return null; } /** * output applyDefaultValue method */ protected void applyDefaultValue(IObjectValue vo) { } protected void setFieldsNull(AbstractObjectValue arg0) { super.setFieldsNull(arg0); arg0.put("number",null); } }