ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
package com.vci.client.portal.UI.v3.comptdesign.choosedialog;
//package plm.portal.v3.uicompt;
//
//import java.awt.BorderLayout;
//import java.awt.Component;
//import java.awt.Dialog;
//import java.awt.GridBagConstraints;
//import java.awt.GridBagLayout;
//import java.awt.Insets;
//import java.awt.event.ActionEvent;
//import java.awt.event.ActionListener;
//
//import plm.corba.portal.PortalVI;
//import plm.portal.utility.Tool;
//
//import com.vci.base.ui.swing.VCISwingUtil;
//import com.vci.base.ui.swing.components.VCIJButton;
//import com.vci.base.ui.swing.components.VCIJDialog;
//import com.vci.base.ui.swing.components.VCIJLabel;
//import com.vci.base.ui.swing.components.VCIJPanel;
//import com.vci.base.ui.swing.components.VCIJTextField;
//import com.vci.base.ui.swing.components.table.AbstractVCIJTableDataProvider;
//import com.vci.base.ui.swing.components.table.VCIJTableDataProvider;
//import com.vci.base.ui.swing.components.table.VCIJTableNode;
//import com.vci.base.ui.swing.components.table.VCIJTablePanel;
//
//public class PortalVIChooseDialog extends VCIJDialog {
//
//    /**
//     * 
//     */
//    private static final long serialVersionUID = -3907934612332578043L;    
//    private Dialog ownedDialog = null;
//    private String title = "";
//    private int width = 400;
//    private int height = 400;
//    private Component relativeToCompt = null;
//    
//    private String btmName = "";
//    
//    
//    private VCIJLabel lblName = new VCIJLabel("名称");
//    private VCIJTextField txtName = new VCIJTextField("");
//    private VCIJLabel lblCode = new VCIJLabel("UI上下文");
//    private VCIJTextField txtCode = new VCIJTextField("");
//    private VCIJButton btnSearch = VCISwingUtil.createVCIJButton("search", "查询", "查询", "search.gif", new ActionListener() {
//        @Override
//        public void actionPerformed(ActionEvent e) {
//            search_actionPerformed(e);
//        }
//    });
//    private VCIJTableDataProvider<PortalVI> dataProvider = null;
//    private VCIJTablePanel<PortalVI> tablePanel = null;
//    private VCIJButton btnOk = VCISwingUtil.createVCIJButton("ok", "确定", "确定", "accept.png", new ActionListener() {
//        @Override
//        public void actionPerformed(ActionEvent e) {
//            ok_actionPerform(e);
//        }
//    });
//    private VCIJButton btnCancel = VCISwingUtil.createVCIJButton("cancel", "取消", "取消", "cancel.png", new ActionListener() {
//        @Override
//        public void actionPerformed(ActionEvent e) {
//            cancel_actionPerform(e);
//        }
//    });
//    
//    public PortalVIChooseDialog(){
//        
//    }
//    public void buildDialog(){
//        init();
//    }
//    
//    private void init(){
//        setLayout(new BorderLayout());
//        add(getNorthSearchPanel(), BorderLayout.NORTH);
//        add(getCenterContentPanel(), BorderLayout.CENTER);
//        add(getSouthButtonPanel(), BorderLayout.SOUTH);
//        setLocationAndSize();
//    }
//    private VCIJPanel getNorthSearchPanel(){
//        VCIJPanel pal = new VCIJPanel(new GridBagLayout());
//        pal.add(lblName, getGBC(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, 1));
//        pal.add(txtName, getGBC(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, 1));
//        pal.add(lblCode, getGBC(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, 1));
//        pal.add(txtCode, getGBC(3, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, 1));
//        pal.add(btnSearch, getGBC(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, 1));
//        return pal;
//    }
//
//    private VCIJPanel getCenterContentPanel(){
//        VCIJPanel pal = new VCIJPanel(new BorderLayout());
//        dataProvider =  new AbstractVCIJTableDataProvider<PortalVI>() {
//            @Override
//            public String[] getSpecialColumns() {
//                return new String[]{"名称",""};
//            }
//            @Override
//            public int getTotal() {
//                return super.total;
//            }
//            @Override
//            public VCIJTableNode<PortalVI> getNewRowNode(PortalVI dataObj) {
//                VCIJTableNode<PortalVI> dataNode = new VCIJTableNode<PortalVI>(dataObj);
//                String[] columns = getSpecialColumns();
//                int index = 0;
//                dataNode.setPropertyValue(columns[index++], dataObj.id);
//                dataNode.setPropertyValue(columns[index++], "");
//                return dataNode;
//            }
//            @Override
//            public PortalVI[] getDatas(int pageIndex, int pageSize) {
//                 PortalVI[] res = new PortalVI[0];
////                 try{
////                     res = Tool.getService().getPagePortalVIArrayByTypeName(typeName, startPage, endPage)
////                 }
//                return res;
//            }
//        };
//        return pal;
//    }
//
//    private VCIJPanel getSouthButtonPanel(){
//        VCIJPanel pal = new VCIJPanel();
//        pal.add(btnOk);
//        pal.add(btnCancel);
//        return pal;
//    }
//    private GridBagConstraints getGBC(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, int padxy) {
//        return new GridBagConstraints(gridx, gridy, gridwidth, gridheight, weightx, weighty, anchor, fill, new Insets(padxy, padxy, padxy, padxy), padxy, padxy);
//    }
//    private void setLocationAndSize(){
//        setTitle(getTitle());
//        setSize(getWidth(), getHeight());
//        setLocationRelativeTo(getRelativeToCompt());
//    }
//    private void search_actionPerformed(ActionEvent e){
//        
//    }
//    private void ok_actionPerform(ActionEvent e){
//        
//    }
//    private void cancel_actionPerform(ActionEvent e){
//        
//    }
//    
//    private void close(DialogResult dialogRes){
//        setDialogResult(dialogRes);
//        setVisible(false);
//        dispose();
//    }
//    
//    public Dialog getOwnedDialog() {
//        return ownedDialog;
//    }
//    public void setOwnedDialog(Dialog ownedDialog) {
//        this.ownedDialog = ownedDialog;
//    }
//    public String getTitle() {
//        return title;
//    }
//    public void setTitle(String title) {
//        this.title = title;
//    }
//    public int getWidth() {
//        return width;
//    }
//    public void setWidth(int width) {
//        this.width = width;
//    }
//    public int getHeight() {
//        return height;
//    }
//    public void setHeight(int height) {
//        this.height = height;
//    }
//    public Component getRelativeToCompt() {
//        return relativeToCompt;
//    }
//    public void setRelativeToCompt(Component relativeToCompt) {
//        this.relativeToCompt = relativeToCompt;
//    }
//    public String getBtmName() {
//        return btmName;
//    }
//    public void setBtmName(String btmName) {
//        this.btmName = btmName;
//    }
//}