01: package com.opensymphony.workflow.designer;
02:
03: import java.awt.*;
04:
05: import com.opensymphony.workflow.loader.JoinDescriptor;
06: import com.opensymphony.workflow.loader.ResultDescriptor;
07:
08: import org.jgraph.graph.GraphConstants;
09:
10: public class JoinCell extends WorkflowCell implements ResultAware {
11: private JoinDescriptor descriptor;
12:
13: public JoinCell(JoinDescriptor userObject) {
14: super (userObject);
15: descriptor = userObject;
16: id = descriptor.getId();
17: GraphConstants.setBackground(attributes, Color.gray);
18: }
19:
20: public JoinDescriptor getJoinDescriptor() {
21: return descriptor;
22: }
23:
24: public String toString() {
25: return "Join id " + descriptor.getId();
26: }
27:
28: public boolean removeResult(ResultDescriptor result) {
29: if (descriptor.getResult() == result) {
30: descriptor.setResult(null);
31: return true;
32: }
33: return false;
34: }
35: }
|