eas之编辑界面中分录默认携带的标题栏

this.kdtEntrys_detailPanel.setTitle("物件内容");  
KDContainer kdtEntrys_Container = (KDContainer) ((KDPanel) this.kdtEntrys_detailPanel.getComponent(0)).getComponent(0);  
((KDPanel) this.kdtEntrys_detailPanel.getComponent(0)).remove(0);  
((KDPanel) this.kdtEntrys_detailPanel.getComponent(0)).add(kdtEntrys_Container, new KDLayout.Constraints(0, 5, 983, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT));  
age:  
        this.kdtEntry_detailPanel.setTitle("分支机构");  
        this.kdtEntry.getStyleAttributes().setLocked(true);  
        this.kdtEntry.getSelectManager().setSelectMode(2);  
        if (((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(0) instanceof KDContainer) {  
            KDContainer kdtEntrys_Container = (KDContainer) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(0);  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).remove(0);  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).add(kdtEntrys_Container, new KDLayout.Constraints(0, 5, 749, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT));  
        }  
        if (((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(0) instanceof KDWorkButton && ((KDWorkButton) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(0)).getName().equals("btnAddnewLine")) {  
            KDWorkButton btnAddnewLine = ((KDWorkButton) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(0));  
            btnAddnewLine.setIcon(null);  
            btnAddnewLine.setText("新增分支机构");  
            btnAddnewLine.setToolTipText("新增分支机构");  
            btnAddnewLine.removeActionListener(btnAddnewLine.getActionListeners() [0]);  
            btnAddnewLine.addActionListener(new ActionListener() {  
                public void actionPerformed(ActionEvent e) {  
                    try {  
                        BranchAddNew(e);  
                    } catch (Exception e1) {  
                        e1.printStackTrace();  
                    }  
                }  
            });  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).remove(0);  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).add(btnAddnewLine, new KDLayout.Constraints(399, 5, 110, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_RIGHT), 0);  
        }  
        if (((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(1) instanceof KDWorkButton && ((KDWorkButton) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(1)).getName().equals("btnInsertLine")) {  
            KDWorkButton btnInsertLine = ((KDWorkButton) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(1));  
            btnInsertLine.setIcon(null);  
            btnInsertLine.setText("修改分支机构");  
            btnInsertLine.setToolTipText("修改分支机构");  
            btnInsertLine.removeActionListener(btnInsertLine.getActionListeners() [0]);  
            btnInsertLine.addActionListener(new ActionListener() {  
                public void actionPerformed(ActionEvent e) {  
                    try {  
                        BranchEdit(e);  
                    } catch (Exception e1) {  
                        e1.printStackTrace();  
                    }  
                }  
            });  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).remove(1);  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).add(btnInsertLine, new KDLayout.Constraints(514, 5, 110, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_RIGHT), 1);  
        }  
        if (((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(2) instanceof KDWorkButton && ((KDWorkButton) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(2)).getName().equals("btnRemoveLines")) {  
            KDWorkButton btnRemoveLines = ((KDWorkButton) ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).getComponent(2));  
            btnRemoveLines.setIcon(null);  
            btnRemoveLines.setText("删除分支机构");  
            btnRemoveLines.setToolTipText("删除分支机构");  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).remove(2);  
            ((KDPanel) this.kdtEntry_detailPanel.getComponent(0)).add(btnRemoveLines, new KDLayout.Constraints(629, 5, 110, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_RIGHT), 2);  
        } 
posted @ 2019-06-02 17:59  一条有梦想的海洋咸鱼  阅读(506)  评论(0编辑  收藏  举报