ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter2/IscreamColour.java
Revision: 1.2
Committed: Sat Feb 3 17:26:07 2001 UTC (24 years, 10 months ago) by pjm2
Branch: MAIN
Changes since 1.1: +0 -0 lines
Log Message:
Fixed the runnaway memory problem.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2
3 //---IMPORTS---
4
5
6 /**
7 * IscreamColour - Used to provide static colour methods.
8 *
9 * @author $Author: pjm2 $
10 * @version $Id: IscreamColour.java,v 1.10 2001/01/11 19:03:04 pjm2 Exp $
11 */
12 public class IscreamColour {
13
14 //---FINAL ATTRIBUTES---
15
16 /**
17 * The current CVS revision of this class
18 */
19 public final String REVISION = "$Revision: 1.10 $";
20
21 // black
22 public static final int BLACK = 0;
23
24 // white
25 public static final int WHITE = 16777215;
26
27 // web-safe i-scream blue ;)
28 public static final int ISCREAM_BLUE = 13421823;
29
30
31 //---STATIC METHODS---
32
33 /**
34 * Static function used to return an RGBA integer.
35 *
36 * @return the RGB value in RGBA integer format.
37 */
38 public static int rgb(int r, int g, int b){
39 int rgb = r*256*256 + g*256 + b;
40 return (rgb & 0xff00ff00) | ((rgb & 0xff0000) >> 16) | ((rgb & 0xff) << 16);
41 }
42
43
44 //---CONSTRUCTORS---
45
46 //---PUBLIC METHODS---
47
48 /**
49 * Overrides the {@link java.lang.Object#toString() Object.toString()}
50 * method to provide clean logging (every class should have this).
51 *
52 * @return the name of this class and its CVS revision
53 */
54 public String toString(){
55 return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")";
56 }
57
58 //---PRIVATE METHODS---
59
60 //---ACCESSOR/MUTATOR METHODS---
61
62 //---ATTRIBUTES---
63
64 //---STATIC ATTRIBUTES---
65
66 }