KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > swingclient > actions > Disconnect


1 package org.enhydra.shark.swingclient.actions;
2
3 import java.awt.event.*;
4
5
6 import org.enhydra.shark.swingclient.*;
7
8 /**
9  * Class that realizes <B>disconnect</B> action.
10  *
11  * @author Sasa Bojanic
12  * @version 1.0
13  */

14 public class Disconnect extends ActionBase {
15
16    public Disconnect (SharkClient workflowClient) {
17       super(workflowClient);
18    }
19
20    public void actionPerformed(ActionEvent e) {
21       SharkClient workflowClient=(SharkClient)actionPanel;
22       try {
23          workflowClient.getService().disconnect();
24          workflowClient.getExecAmin().disconnect();
25          workflowClient.setService(null);
26          workflowClient.setUsername(null);
27          workflowClient.clearComponents();
28       } catch (Exception JavaDoc ex) {
29          //System.out.println("Haven't been connected");
30
}
31    }
32 }
33
34
Popular Tags