01: /**
02: * Miroslav Popov, Oct 3, 2005
03: * miroslav.popov@gmail.com
04: */package org.enhydra.jawe.base.controller;
05:
06: import java.awt.Color;
07:
08: import javax.swing.ImageIcon;
09:
10: /**
11: * @author Miroslav Popov
12: *
13: */
14: public class JaWEType {
15:
16: protected Class type;
17: protected String typeId;
18: protected String displayName;
19: protected ImageIcon typeIcon;
20: protected Color color;
21:
22: public JaWEType(Class classType, String typeId) {
23: this .type = classType;
24: this .typeId = typeId;
25: }
26:
27: public JaWEType(Class classType, String typeId, String displayName,
28: ImageIcon icon, Color color) {
29: this .type = classType;
30: this .typeId = typeId;
31: this .displayName = displayName;
32: this .typeIcon = icon;
33: this .color = color;
34: }
35:
36: public JaWEType(JaWEType old) {
37: this .type = old.type;
38: this .typeId = old.typeId;
39: this .displayName = old.displayName;
40: this .typeIcon = old.typeIcon;
41: this .color = old.color;
42: }
43:
44: public Class getClassType() {
45: return type;
46: }
47:
48: public String getTypeId() {
49: return typeId;
50: }
51:
52: public String getDisplayName() {
53: return displayName;
54: }
55:
56: public ImageIcon getIcon() {
57: return typeIcon;
58: }
59:
60: public Color getColor() {
61: return new Color(color.getRed(), color.getGreen(), color
62: .getBlue());
63: }
64:
65: public void setColor(Color color) {
66: this .color = color;
67: }
68:
69: public void setDisplayName(String displayName) {
70: this .displayName = displayName;
71: }
72:
73: public void setIcon(ImageIcon icon) {
74: this.typeIcon = icon;
75: }
76:
77: }
|