第一范文网 - 专业文章范例文档资料分享平台

NC单据开发初学手册V1.0

来源:用户分享 时间:2025/5/16 3:33:30 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

具体常用的监听和作用如下表 监听接口名称 BillBodyMenuListener void 监听相关的实现方法 onMenuItemClick(ActionEvent 作用 处理右键菜单功能 对象 BillCardPanel 方法 addBodyMenuListener(BillBodyMenuListener l) BillEditListener void afterEdit(BillEditEvent billeditevent) 处理数据项的编辑后事件 对象 BillCardPanel 方法 (表体)非指定页签 void addEditListener(BillEditListener el) (表体)指定页签 void addEditListener(String BillEditListener 添加监听的方法 actionevent) tableCode, el) (表头或表尾) void addBillEditListenerHeadTail(BillEditListener billEditListener) BillEditListener void bodyRowChange(BillEditEvent 处理表选择的行变化事件 对象 BillCardPanel 方法 (表体)非指定页签 void addEditListener(BillEditListener el) (表体)指定页签 void addEditListener(String BillEditListener billeditevent) tableCode, - 36 -

el) BillEditListener2 boolean billeditevent) beforeEdit(BillEditEvent 处理表体的编辑前事件 对象 BillCardPanel 方法 addBodyEditListener2(BillEditListener2 el) IBillRelaSortListener List getRelaSortObject() 实现对List集合的对象进行排序的功能 IBillRelaSortListener2 Object[] getRelaSortObjectArray() 实现对数组对象进行排序的功能 对象 BillModel 方法 void addSortRelaObjectListener2(IBillRelaSortListener2 l) BillTableMouseListener void mouse_doubleclick(BillMouseEnent 鼠标双击billmouseenent) 事件监听 对象 BillCardPanel 方法 void addBodyMouseListener(BillTableMouseListener ml) BillCardBeforeEditListener boolean billitemevent) beforeEdit(BillItemEvent 编辑表头数据项的编辑前监听 对象 BillCardPanel 方法 void setBillBeforeEditListenerHeadTail(BillCardBeforeEditListener l) BillTabbedPaneTabChangeListener void afterTabChanged(BillTabbedPaneTabChangeEvent billtabbedpanetabchangeevent) - 37 -

多页签的情况下切换页签后对象 BillCardPanel 方法 void addSortRelaObjectListener(IBillRelaSortListener l)

的监听 void addTabbedPaneTabChangeListener(BillTabbedPaneTabChangeListener l, int pos) IBillModelSortPrepareListener int getSortTypeByBillItemKey(String s) 获得具体数据项的排序形式监听 对象 BillModel 方法 void setSortPrepareListener(IBillModelSortPrepareListener sortPrepareListener) BillTotalListener UFDouble calcurateTotal(String s) 合计对应字段的监听处理 对象 BillModel 方法 void addTotalListener(BillTotalListener btl) BillSortListener void afterSort(String s) 针对对象 BillModel 方法 void addSortListener(BillSortListener bsl) BillActionListener boolean onEditAction(int i) 对象 方法

BillModel的排序后事件 8.4.2.2 面板控制类(CardPanelCtrl / ListPanelCtrl)

这个类的作用是针对卡片界面,注册添加监听,初始卡片界面数据,检查卡片数据等针对卡片界面的控制方法

- 38 -

我们以卡片界面为例。列表界面的请参照nc.ui.zjs.train.ListPanel 第一步、在UI包中新建CardPanelCtrl类

第二步、编写构造方法,构造参数中包含UI类和面板类 private CardPanel m_CardPanel;

public CardPanelCtrl(

ClientUI clientUI, CardPanel cardPanel) { m_ClientUI = clientUI; m_CardPanel = cardPanel;

editCtrl = new EditCtrl(m_ClientUI); init(); }

private EditCtrl editCtrl; private ClientUI m_ClientUI;

第三步、编写初始化方法init(),注册添加监听

// 鼠标双键事件listener

m_CardPanel.getCard().addBillEditListenerHeadTail(editCtrl); m_CardPanel.getCard().addBodyMenuListener(editCtrl); m_CardPanel.getCard().addEditListener(editCtrl);

m_CardPanel.getCard().addBodyEditListener2(editCtrl);// beforeEdit()加监听 m_CardPanel.getCard().setBillBeforeEditListenerHeadTail(editCtrl);// 加表头监听

m_CardPanel.getCard().getBillTable().addSortListener();

m_CardPanel.getCard().getBillModel().setSortPrepareListener(editCtrl); private void init() {

m_CardPanel.getCard().setVisible(true); m_CardPanel.getCard().setEnabled(false);

- 39 -

搜索更多关于: NC单据开发初学手册V1.0 的文档
NC单据开发初学手册V1.0.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c9psn34uocv6b8ve014cp_11.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top