KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > JoinCell


1 package com.opensymphony.workflow.designer;
2
3 import java.awt.*;
4
5 import com.opensymphony.workflow.designer.proxy.JoinProxy;
6 import com.opensymphony.workflow.loader.JoinDescriptor;
7 import com.opensymphony.workflow.loader.ResultDescriptor;
8
9 import org.jgraph.graph.GraphConstants;
10
11 public class JoinCell extends WorkflowCell implements ResultAware
12 {
13   private JoinDescriptor descriptor;
14
15   public JoinCell(JoinDescriptor userObject)
16   {
17     super(new JoinProxy(userObject));
18     descriptor = userObject;
19     id = descriptor.getId();
20     GraphConstants.setBackground(attributes, Color.gray);
21   }
22
23   public JoinDescriptor getJoinDescriptor()
24   {
25     return descriptor;
26   }
27
28   public boolean removeResult(ResultDescriptor result)
29   {
30     if(descriptor.getResult() == result)
31     {
32       descriptor.setResult(null);
33       return true;
34     }
35     return false;
36   }
37 }
38
Popular Tags