KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.opensymphony.workflow.designer.editor;
2
3 import com.opensymphony.workflow.designer.JoinCell;
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.ConfigConditionDescriptor;
8 import com.opensymphony.workflow.loader.ConditionDescriptor;
9
10 /**
11  * @author baab
12  */

13 public class JoinConditionEditor extends ConditionEditor
14 {
15   public JoinConditionEditor(JoinCell cell)
16   {
17     super(cell);
18   }
19
20   protected AbstractDescriptor getParent()
21   {
22     return getCell().getJoinDescriptor();
23   }
24
25   protected ConfigConditionDescriptor getCondition()
26   {
27       ConfigConditionDescriptor template = (ConfigConditionDescriptor)DialogUtils.getUserSelection(getModel().getPalette().getJoinConditions(),
28         ResourceManager.getString("condition.select.join"),
29         ResourceManager.getString("condition.select"), null);
30       if(template!=null)
31         return new ConfigConditionDescriptor(template);
32       return null;
33   }
34
35     protected ConfigConditionDescriptor getConfigDescriptor(ConditionDescriptor cond)
36     {
37         return getModel().getPalette().getJoinCondition(cond.getName());
38     }
39
40   protected JoinCell getCell()
41   {
42     return (JoinCell)cell;
43   }
44
45 }
46
Popular Tags