KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > editor > StartFunctionEditor


1 package com.opensymphony.workflow.designer.editor;
2
3 import com.opensymphony.workflow.designer.InitialActionCell;
4 import com.opensymphony.workflow.designer.ResourceManager;
5 import com.opensymphony.workflow.designer.dialogs.DialogUtils;
6 import com.opensymphony.workflow.loader.AbstractDescriptor;
7 import com.opensymphony.workflow.loader.ConfigFunctionDescriptor;
8
9 /**
10  * @author jackflit
11  * Date: 2003-11-24
12  */

13 public class StartFunctionEditor extends FunctionEditor
14 {
15   public StartFunctionEditor(InitialActionCell cell)
16   {
17     super(cell);
18   }
19
20   protected InitialActionCell getCell()
21   {
22     return (InitialActionCell)cell;
23   }
24
25   protected AbstractDescriptor getParent()
26   {
27     return getCell().getActionDescriptor();
28   }
29
30     protected ConfigFunctionDescriptor getFunction()
31     {
32         ConfigFunctionDescriptor template = (ConfigFunctionDescriptor)DialogUtils.getUserSelection(getModel().getPalette().getPreFunctions(),
33           ResourceManager.getString("function.select"),
34           ResourceManager.getString("function.select"), null);
35         if(template!=null)
36           return new ConfigFunctionDescriptor(template);
37         return null;
38     }
39 }
40
Popular Tags