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);
|
}
|
}
|