dangsn
2024-12-26 4e9ff2ce6a830bb2340d7c8612c72eea0c5a553e
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
package com.vci.client.workflow;
 
import java.awt.Dimension;
import java.awt.Toolkit;
 
import javax.swing.JFrame;
import javax.swing.JPanel;
 
import com.vci.client.common.providers.ServiceProvider;
import com.vci.client.ui.exception.VCIException;
import com.vci.client.workflow.template.ProcessCustomPanel;
import com.vci.corba.workflow.WorkflowServicePrx;
 
public class WorkFlowClient {
 
//    private static WorkflowServicePrx workFlowServiceService;
    private static WorkFlowClient workFlowClient = null;
    
    private static WorkFlowClient getInstance(){
        if(workFlowClient == null){
            workFlowClient = new WorkFlowClient();
        }
        return workFlowClient;
    }
    
    public void destory() throws VCIException {
        // TODO Auto-generated method stub
        
    }
 
    public void init() throws VCIException {
//        if(workFlowServiceService != null){
//            return;
//        }
//        try {
//
//            workFlowServiceService = ServiceProvider.getWFService();
//        } catch (Exception e) {
//            throw new VCIException("", new String[0]);
//        }
        
    }
 
    public JPanel start() throws VCIException {
        // TODO Auto-generated method stub
        return null;
    }
 
    
//    public static WorkflowServicePrx getService(){
//        if(workFlowServiceService == null){
//            try {
//                WorkFlowClient.getInstance().init();
//            } catch (VCIException e) {
//                e.printStackTrace();
//            }
//        }
//        return workFlowServiceService;
//    }
    /**
     * @param args
     */
    public static void main(String[] args) {
        //WorkFlowClient.getInstance().init();
        try {
            ServiceProvider.getWFService();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setTitle("页面自定义");
        frame.setBounds(d.width/4, d.height/4, d.width/2, d.height/2);
        
        ProcessCustomPanel processCustomPanel = null;
        
        try {
            processCustomPanel = (ProcessCustomPanel) WorkFlowClient.getInstance().start();
        } catch (VCIException e) {
            e.printStackTrace();
        }
        frame.add(processCustomPanel);
        frame.setVisible(true);
    }
}