1 package org.catacomb.util;
2
3
4 import org.catacomb.report.E;
5
6 import java.awt.Color;
7
8
9 public class ColorDef {
10
11 public String name;
12
13 public String value;
14
15 Color cvalue;
16
17
18
19
20 public String getName() {
21 return name;
22 }
23
24
25 public Color getColor() {
26 if (cvalue == null) {
27 try {
28 int ic = Integer.decode(value).intValue();
29 cvalue = new Color(ic);
30
31 } catch (NumberFormatException ex) {
32 E.error(" - ColorDef cant decode color string " + value);
33 cvalue = Color.red;
34 }
35 }
36 return cvalue;
37 }
38
39 }