田源
2025-01-09 8a166a60cfd1a2e593ffa103d10c0dc224fc8628
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
package com.vci.client.uif.actions.client;
 
import com.vci.client.uif.actions.client.ClipboardData.ClipboardOperation;
 
/**
 * 剪切板 存储复制的业务对象和link对象
 * ClientBusinessObjectClipboard中只存储ClipboardData数据
 * ClipboardData中记录复制数据、操作类型等信息
 * @author VCI-STGK006
 *
 */
public class ClientBusinessObjectClipboard {
    
    /**
     * 剪切板对象
     */
    private static ClientBusinessObjectClipboard cboc= new ClientBusinessObjectClipboard();
    
    /**
     * 操作的类型  
     * 复制和剪切
     */
    @Deprecated
    private ClipboardOperation operation = null;
    
    /**
     * 复制的数据对象
     */
    @Deprecated
    private Object[] objs = null;
    
    /**
     * 复制数据信息
     */
    private ClipboardData cd = null;
    
    /**
     * 构造器
     */
    private ClientBusinessObjectClipboard(){
        
    }
    
    /**
     * 获得业务对象剪切板实例
     * @return
     */
    public static ClientBusinessObjectClipboard getInstance(){
        return cboc;
    }
    
    /**
     * 返回剪切板中业务对象数据
     * @return
     */
    @Deprecated
    public Object[] getDates(){
        return this.objs;
    }
    
    /**
     * 得到操作类型
     * @return
     */
    public ClipboardOperation getOperation(){
        return this.operation;
    }
    
    /**
     * 设置剪切板业务对象数据
     * @param cobs
     */
    @Deprecated
    public void setContents(ClipboardOperation operation, Object[] objs) throws Exception{
        //没有复制数据
        if(objs == null || objs.length < 1){
            return;
        }
        //清空剪切板
        clearClipboard();
        this.operation = operation;
        if(objs == null || objs.length < 1)
            return;
        if(objs instanceof com.vci.client.bof.ClientBusinessObject[]){
        } else if(objs instanceof com.vci.client.bof.ClientLinkObject[]){
        } else {
        }
        this.objs = objs;
    }
    
    /**
     * 设置复制数据信息
     * @param cd
     */
    public void setContents(ClipboardData cd){
        clearClipboard();
        this.cd = cd;
    }
    
    /**
     * 返回复制数据信息
     * @return
     */
    public ClipboardData getdata(){
        return this.cd;
    }
 
    /**
     * 清空剪切板
     */
    public void clearClipboard(){
        this.operation = null;
        this.objs = null;
        this.cd = null;
    }
}