KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > actions > Participants


1 /*
2  * Authors:
3  * Stefanovic Nenad chupo@iis.ns.ac.yu
4  * Bojanic Sasa sasaboy@neobee.net
5  * Puskas Vladimir vpuskas@eunet.yu
6  * Pilipovic Goran zboniek@uns.ac.yu
7  *
8  */

9
10 package org.enhydra.jawe.actions;
11
12 import org.enhydra.jawe.*;
13 import org.enhydra.jawe.misc.*;
14 import org.enhydra.jawe.xml.*;
15 import org.enhydra.jawe.xml.elements.*;
16 import org.enhydra.jawe.xml.panels.*;
17
18 import java.awt.event.ActionEvent JavaDoc;
19 import javax.swing.*;
20
21 /**
22 * Class that realizes <B>participants</B> action.
23 */

24 public class Participants extends ActionBase {
25
26    public Participants (AbstractEditor editor) {
27       super(editor);
28    }
29
30    public void actionPerformed(ActionEvent JavaDoc e) {
31       XMLPanel p;
32       XMLElementDialog d;
33
34       if (editor instanceof ProcessEditor) {
35
36          org.enhydra.jawe.xml.elements.WorkflowProcess wp=
37                (org.enhydra.jawe.xml.elements.WorkflowProcess)
38                editor.getGraph().getPropertyObject();
39          XMLPanel p1=wp.getPanel(4);
40          org.enhydra.jawe.xml.elements.Participants pOwner=
41                (org.enhydra.jawe.xml.elements.Participants)p1.getOwner();
42          ShowHideButtonsPanel shbp=new ShowHideButtonsPanel(
43                pOwner,editor.getGraph().getWorkflowManager(),false);
44          p=new XMLGroupPanel(pOwner,new XMLPanel[]{
45                   p1,shbp},"",XMLPanel.BOX_LAYOUT,
46                   true,false);
47
48          d=new XMLElementDialog((JDialog)editor.getWindow(),
49                ResourceManager.getLanguageDependentString("ProcessKey")+" '"+
50                wp.toString()+"' - "+
51                ResourceManager.getLanguageDependentString("ParticipantsKey"));
52       } else {
53          PackageEditor pe=(PackageEditor)editor;
54          if (!pe.isInitialized()) {
55             pe.enterPackageID();
56          }
57          p=pe.getXMLPackage().getPanel(6);
58
59          d=new XMLElementDialog((JFrame)pe.getWindow(),
60             ResourceManager.getLanguageDependentString("PackageKey")+" '"+
61             pe.getXMLPackage().get("Id").toString()+"' - "+
62             ResourceManager.getLanguageDependentString("ParticipantsKey"));
63       }
64       d.editXMLElement(p,false,false);
65
66    }
67 }
68
Popular Tags