KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > swingclient > workflowadmin > monitoring > actions > WorkflowObjectProperties


1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions;
2
3 import java.awt.event.*;
4
5 import javax.swing.*;
6
7
8 import org.enhydra.shark.api.client.wfmodel.*;
9 import org.enhydra.shark.swingclient.*;
10 import org.enhydra.shark.swingclient.workflowadmin.*;
11 import org.enhydra.shark.swingclient.workflowadmin.monitoring.*;
12
13 /**
14  * Shows the properties of workflow package or workflow process, depending
15  * of what tree node is selected.
16  *
17  * @author Sasa Bojanic
18  * @version 1.0
19  */

20 public class WorkflowObjectProperties extends ActionBase {
21
22    public WorkflowObjectProperties (ProcessMonitor pm) {
23       super(pm);
24    }
25
26    public void actionPerformed(ActionEvent e) {
27       ProcessMonitor pm=(ProcessMonitor)actionPanel;
28       SharkAdmin workflowAdmin=pm.getWorkflowAdmin();
29
30       Object JavaDoc userObject=pm.getSelectedUserObject();
31
32       if (userObject instanceof org.enhydra.jawe.xml.elements.Package) {
33          org.enhydra.jawe.xml.elements.Package pkg=
34                (org.enhydra.jawe.xml.elements.Package)userObject;
35          org.enhydra.jawe.xml.XMLElementDialog xed=
36                new org.enhydra.jawe.xml.XMLElementDialog(workflowAdmin.getFrame(),
37                org.enhydra.jawe.ResourceManager.getLanguageDependentString("PackageKey")+" '"+
38                pkg.get("Id").toString()+"' - "+
39                org.enhydra.jawe.ResourceManager.getLanguageDependentString("PropertiesKey"));
40          xed.editXMLElement(pkg.getPanel(),true,false);
41       }
42       if (userObject instanceof WfProcess) {
43          org.enhydra.jawe.xml.elements.WorkflowProcess wp=
44                (org.enhydra.jawe.xml.elements.WorkflowProcess)
45                pm.getProcessViewer().getCurrentGraph().getPropertyObject();
46          org.enhydra.jawe.xml.XMLElementDialog xed=
47                new org.enhydra.jawe.xml.XMLElementDialog(workflowAdmin.getFrame(),
48                org.enhydra.jawe.ResourceManager.getLanguageDependentString("ProcessKey")+" '"+
49                wp.get("Name").toString()+"' - "+
50                org.enhydra.jawe.ResourceManager.getLanguageDependentString("PropertiesKey"));
51          xed.editXMLElement(wp.getPanel(),true,false);
52       }
53    }
54 }
55
Popular Tags