田源
2024-03-07 4b4083fd73dc27ece42f4835483565eef0e4f608
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
package com.vci.client.omd.attribpool.ui;
 
import java.util.HashMap;
 
import javax.swing.JPanel;
 
import com.vci.corba.omd.atm.AttribItem;
 
public class VTDataTypePanel extends JPanel{
 
    /**
     * 
     */
    private static final long serialVersionUID = 8298822921380082062L;
    
    public static final String DEFVALUE = "defValue";
    public static final String DIMENSION = "dimension";
    public static final String LENGTH = "length";
    public static final String RAGE = "rage";
    public static final String ALLOWNULL = "allowNull";
    public static final String ISFIXLEN = "isFixLen";
    public static final String OTHER = "other";
    public static final String ACCURACY = "accuracy";
    public static final String BTM = "btm";
    public static final String ENUMNAME = "enumName";
    public static final String LINKTYPENAME = "linkTypeName";
    public static final String VERSION = "version";
    
    /**
     * 获取VTDataType的详细信息
     * @return
     */
    public HashMap<String, String> getDetailInfo(){
        return null;
    }
 
    /**
     * 根据当前状态(查看,创建,修改), 设置相关组件的显示情况
     * @param flag:0:显示; 1: 创建; 2: 修改
     */
    public void updataUIStatus(AttribItem abItem,int flag){
        
    }
    
    /**
     * 获取other中指定项目的值
     * @return
     */
    public String getOtherValueByType(String other, String type){
        String[] otherArray = other.split(";");
        for(int i = 0; i < otherArray.length; i++){
            String otherValue = otherArray[i];
            if(otherValue.contains(type)){
                return otherValue.substring(otherValue.indexOf("=") + 2, otherValue.length());
            }
        }
        return null;
        
    }
}