KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > graph > BlockActivityEditor


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

10
11 package org.enhydra.jawe.graph;
12 import org.enhydra.jawe.*;
13 import org.enhydra.jawe.xml.*;
14 import org.enhydra.jawe.xml.elements.*;
15 import org.jgraph.JGraph;
16 import org.jgraph.graph.*;
17 import org.jgraph.event.*;
18
19 import java.awt.*;
20 import java.awt.event.*;
21 import java.beans.*;
22 import java.net.URL JavaDoc;
23 import java.util.*;
24
25 import javax.swing.*;
26 import javax.swing.undo.*;
27 import javax.swing.event.*;
28 import javax.swing.tree.*;
29
30
31 import java.awt.*;
32 import javax.swing.*;
33
34 /**
35 * BlockActivityEditor class creates block activity toolbars
36 * and menubar as given in property file, and BlockActivityGraph
37 * instance which is used to create block activity.
38 */

39 public class BlockActivityEditor extends ProcessEditor {
40
41    private String JavaDoc blockActivityTitle;
42
43    public BlockActivityEditor(Window dialogOrFrame,WorkflowProcess wp,
44    BlockActivity ba,AbstractEditor parentEditor) {
45       super(dialogOrFrame,wp,parentEditor);
46       ((BlockActivityGraph)graph).setMyBlockActivity(ba);
47    }
48
49    /**
50    * Create an editor to represent the given document.
51    */

52    protected AbstractGraph createGraph() {
53       JaWEGraphModel model = new JaWEGraphModel();
54       graph=new BlockActivityGraph(model,this);
55       return graph;
56    }
57
58    /**
59    * Shows a window.
60    */

61    public void showWindow (Window parentWindow,String JavaDoc name) {
62       blockActivityTitle=name;
63       super.showWindow(parentWindow,name);
64    }
65
66    /**
67    * Gets a title.
68    */

69    public String JavaDoc getTitle () {
70       return blockActivityTitle;
71    }
72
73    /**
74    * Returns string of toolbars for load.
75    */

76    public String JavaDoc toolbarToLoad () {
77       return "blockActivityToolbars";
78    }
79
80    /**
81    * Returns string of menubar for load.
82    */

83    public String JavaDoc menubarToLoad () {
84       return "blockActivityMenubar";
85    }
86
87 }
88
89 /* End of BlockActivityEditor.java */
90
Popular Tags