KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > csdl > jblanket > app > MethodCategoryColor


1 package csdl.jblanket.app;
2
3 import java.awt.Color JavaDoc;
4
5 /**
6  * Provides the colors used for the different method categories.
7  * Colors are provided as follows:
8  * <ul>
9  * <li><code>TESTED/UNTESTED</code> - <font color="black">black</font> - methods that are
10  * tested or untested
11  * <li><code>INCLUDE</code> - <font color="black">black</font> - method is included in coverage
12  * <li><code>CONSTRUCTOR</code> - <font color="yellow">yellow</font> - method is a constructor
13  * <li><code>ONE_LINE</code> - <font color="orange">orange</font> - method contains one-line
14  * <li><code>EXCLUDED_INDIVIDUAL</code> - <font color="red">red</font> - method is individually
15  * excluded
16  * </ul>
17  * <p>
18  * The color of TESTED or UNTESTED methods can be over-ridden by the other category colors.
19  *
20  * @author Joy M. Agustin
21  * @version $Id: MethodCategoryColor.java,v 1.1 2004/11/07 00:32:41 timshadel Exp $
22  */

23 public class MethodCategoryColor {
24   /** Color associated with this method category */
25   private Color JavaDoc color;
26   
27   /** Color for the constructors */
28   public static final MethodCategoryColor CONSTRUCTOR = new MethodCategoryColor(Color.blue);
29   /** Color for the one-line methods */
30   public static final MethodCategoryColor ONE_LINE =
31       new MethodCategoryColor(new Color JavaDoc(122, 22, 160));
32   /** Color for the individual methods excluded by the user */
33   public static final MethodCategoryColor EXCLUDED_INDIVIDUAL =
34       new MethodCategoryColor(Color.red);
35   
36   /** Color for the tested methods */
37   public static final MethodCategoryColor TESTED = new MethodCategoryColor(Color.black);
38   /** Color for the untested methods */
39   public static final MethodCategoryColor UNTESTED = new MethodCategoryColor(Color.black);
40
41   /**
42    * Constructs a new MethodCategoryColor object.
43    *
44    * @param color the color associated with this object.
45    */

46   private MethodCategoryColor(Color JavaDoc color) {
47     this.color = color;
48   }
49   
50   /**
51    * Gets the color of this MethodCategoryColor object.
52    *
53    * @return the color of this MethodCategoryColor object.
54    */

55   public Color JavaDoc getColor() {
56     return this.color;
57   }
58 }
Popular Tags