ludc
2024-09-14 36c2449aec5b51e5ed4e5c6841154b746060e09a
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
package com.vci.client.omd.attribpool.ui;
 
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.util.HashMap;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
 
import com.vci.corba.omd.atm.AttribItem;
 
public class VTImagePanel extends VTDataTypePanel{
 
    /**
     * 
     */
    private static final long serialVersionUID = -1578164370822754813L;
    private HashMap<String, String> detailInfoMap = null;
    
    public VTImagePanel(){
        initUI();
        addListener();
    }
    
    private void initUI(){
        
        this.setLayout(new GridBagLayout());
        JPanel leftPanel = new JPanel();
        JPanel rightPanel = new JPanel();
        
        GridBagConstraints gb = new GridBagConstraints();
        gb.gridx = 0;
        gb.gridy = 0;
        gb.weightx = 1.0;
        gb.weighty = 1.0;
        gb.fill = GridBagConstraints.BOTH;
        
        this.add(leftPanel, gb);
        gb.gridx = 1;
        this.add(rightPanel, gb);
        leftPanel.setPreferredSize(new Dimension(this.getSize().width/2, 
                this.getSize().height));
        rightPanel.setPreferredSize(new Dimension(this.getSize().width/2, 
                this.getSize().height));
        
        //设置左边panel的控件
        leftPanel.setBorder(BorderFactory.createTitledBorder("VTImage"));
        leftPanel.setLayout(new BorderLayout());
        JPanel leftPanel1 = new JPanel();
        JPanel leftPanel2 = new JPanel();
        
        JScrollPane spLP1 = new JScrollPane();
        spLP1.setBorder(null);
        spLP1.setViewportView(leftPanel1);
        JScrollPane spLP2 = new JScrollPane();
        spLP2.setBorder(null);
        spLP2.setViewportView(leftPanel2);
        
        leftPanel.add(spLP1, BorderLayout.NORTH);
        leftPanel.add(spLP2, BorderLayout.CENTER);
        
        
        leftPanel2.setLayout(new GridBagLayout());
        
        //设置右边panel的控件
        rightPanel.setBorder(BorderFactory.createTitledBorder("值域"));
        rightPanel.setLayout(new GridBagLayout());
        
        JPanel rightPanel1 = new JPanel();
        JPanel rightPanel2 = new JPanel();
        JPanel rightPanel3 = new JPanel();
        
        GridBagConstraints gRight = new GridBagConstraints();
        gRight.gridx = 0;
        gRight.gridy = 0;
        gRight.weightx = 1.0;
        gRight.weighty = 1.0;
        gRight.fill = GridBagConstraints.BOTH;
        
        JScrollPane spRP1 = new JScrollPane();
        spRP1.setBorder(null);
        spRP1.setViewportView(rightPanel1);
        JScrollPane spRP2 = new JScrollPane();
        spRP2.setBorder(null);
        spRP2.setViewportView(rightPanel2);
        JScrollPane spRP3 = new JScrollPane();
        spRP3.setBorder(null);
        spRP3.setViewportView(rightPanel3);
        
        rightPanel.add(spRP1, gRight);
        gRight.gridy = 1;
        rightPanel.add(spRP2, gRight);
        gRight.gridy = 2;
        rightPanel.add(spRP3, gRight);
        rightPanel3.setLayout(new GridBagLayout());
    }
    
    public void addListener(){
    }
    
    /**
     * 获取VTDataType的详细信息
     * @return
     */
    public HashMap<String, String> getDetailInfo(){
        detailInfoMap = new HashMap<String, String>();
        
        
        return detailInfoMap;
    }
    
    /**
     * 根据当前状态(查看,创建,修改), 设置相关组件的显示情况
     * @param flag
     */
    public void updataUIStatus(AttribItem abItem, int flag){
        
    }
}