首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

代码复建初探

2012-09-19 
代码重构初探提问人:你看看那段代码,如果让你优化,你会怎么做???@Overrideprotected void setTotalUIState

代码重构初探

提问人:你看看那段代码,如果让你优化,你会怎么做?

?

?

@Overrideprotected void setTotalUIState(int intOpType) throws Exception {super.setTotalUIState(intOpType);if (!isSelfMake()) {// 如果不为自制单据setButtonsEnabled(IBillButton.CopyLine);setButtonsEnabled(IBillButton.PasteLine);updateButtons();// 更新当前按钮栏上的所有按钮}}private void setButtonsEnabled(int billButton) {ButtonObject btnObj = null;// 按钮对象btnObj = getButtonManager().getButton(billButton);if (btnObj != null) {btnObj.setEnabled(false);}}
?

?

热点排行