01: /**
02: *
03: */package org.drools.reteoo;
04:
05: import org.eclipse.draw2d.ColorConstants;
06: import org.eclipse.swt.graphics.Color;
07:
08: /**
09: * Wraps {@link EvalConditionNode} and adds visual extras like color information
10: *
11: */
12: public class EvalConditionNodeVertex extends BaseVertex {
13:
14: private static final String NODE_NAME = "EvalConditionNode";
15: private final EvalConditionNode node;
16:
17: /**
18: * Constructor
19: *
20: * @param node node to be wrapped
21: */
22: public EvalConditionNodeVertex(final EvalConditionNode node) {
23: super ();
24: this .node = node;
25: }
26:
27: /* (non-Javadoc)
28: * @see org.drools.reteoo.BaseNodeVertex#getHtml()
29: */
30: public String getHtml() {
31: return NODE_NAME + " : " + this .node.getId();
32: }
33:
34: /* (non-Javadoc)
35: * @see org.drools.eclipse.editors.rete.model.BaseVertex#toString()
36: */
37: public String toString() {
38: return NODE_NAME;
39: }
40:
41: /**
42: * Node ID
43: *
44: * @return node id
45: */
46: public int getId() {
47: return node.getId();
48: }
49:
50: /* (non-Javadoc)
51: * @see org.drools.reteoo.BaseNodeVertex#getFillColor()
52: */
53: public Color getFillColor() {
54: return ColorConstants.white;
55: }
56: }
|