KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > corbaclient > workflowadmin > actions > ViewBlock


1 package org.enhydra.shark.corbaclient.workflowadmin.actions;
2
3 import java.awt.*;
4 import java.awt.event.*;
5
6 import javax.swing.*;
7
8 import org.enhydra.jawe.graph.*;
9 import org.enhydra.shark.corbaclient.*;
10 import org.enhydra.shark.corbaclient.workflowadmin.*;
11
12 /**
13  * Shows the graph of block activity.
14  */

15 public class ViewBlock extends ActionBase {
16
17    public ViewBlock (ProcessViewer pv) {
18       super(pv);
19    }
20
21    public void actionPerformed(ActionEvent e) {
22       ProcessViewer pv=(ProcessViewer)actionPanel;
23        try {
24          Object JavaDoc sel=pv.getCurrentGraph().getSelectionCell();
25          if (sel instanceof BlockActivity) {
26             BlockActivity ba=(BlockActivity)sel;
27             BlockActivityViewer bav=new BlockActivityViewer(pv.getWindow(),ba,pv.getCurrentPackage(),
28                pv.getCurrentProcessDef(),pv.getCurrentProcess());
29             bav.showDialog();
30          }
31       } catch (Exception JavaDoc ex){}
32   }
33 }
34
Popular Tags