1 package com.opensymphony.workflow.designer; 2 3 import java.awt.*; 4 5 import javax.swing.*; 6 7 import org.jgraph.graph.DefaultGraphCell; 8 import org.jgraph.graph.GraphConstants; 9 10 13 public class WorkflowCell extends DefaultGraphCell 14 { 15 public static final Rectangle defaultBounds = new Rectangle(10, 10, 100, 30); 16 protected int id; 17 protected String name; 18 19 22 public WorkflowCell(Object cellName) 23 { 24 super(cellName); 25 GraphConstants.setBounds(attributes, (Rectangle)defaultBounds.clone()); 26 GraphConstants.setOpaque(attributes, true); 27 GraphConstants.setBackground(attributes, Color.blue.darker()); 28 GraphConstants.setForeground(attributes, Color.white); 29 GraphConstants.setBorder(attributes, BorderFactory.createRaisedBevelBorder()); 30 GraphConstants.setEditable(attributes, false); 31 GraphConstants.setVerticalAlignment(attributes, SwingConstants.TOP); 32 } 34 35 39 public int getId() 40 { 41 return id; 42 } 43 44 48 public String getName() 49 { 50 return name; 51 } 52 53 } 54 | Popular Tags |