KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > image > ColorModel


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: ColorModel.java,v $
11    Revision 1.3 2004/04/29 12:49:26 bobintetley
12    Additional JOptionePane constants, missing JTree methods and improved awt.Image support
13
14    Revision 1.2 2004/04/21 10:44:31 bobintetley
15    Code cleanup and native build script fix
16
17
18 */

19 package swingwt.awt.image;
20
21 import swingwt.awt.Transparency;
22
23 /**
24  * @author Robin Rawson-Tetley
25  */

26 public class ColorModel implements Transparency {
27     
28     public ColorModel() {}
29     public ColorModel(int bits) {}
30     
31     public static ColorModel getRGBdefault() {
32     return new ColorModel();
33     }
34     public boolean hasAlpha() {
35         return false;
36     }
37     public boolean isAlphaPremultiplied() {
38         return false;
39     }
40     public int getTransferType() {
41         return 0;
42     }
43     public int getPixelSize() {
44     return 4;
45     }
46     public int getComponentSize(int componentIdx) {
47         return 0;
48     }
49     public int[] getComponentSize() {
50         return null;
51     }
52     public int getTransparency() {
53         return OPAQUE;
54     }
55     public int getNumComponents() {
56         return 0;
57     }
58     public int getNumColorComponents() {
59         return 0;
60     }
61     public int getRed(int pixel) {
62         return 0;
63     }
64     public int getGreen(int pixel) {
65         return 0;
66     }
67     public int getBlue(int pixel) {
68         return 0;
69     }
70     public int getAlpha(int pixel) {
71         return 0;
72     }
73     public int getRGB(int pixel) {
74     return (getAlpha(pixel) << 24) | (getRed(pixel) << 16) | (getGreen(pixel) << 8) | (getBlue(pixel) << 0);
75     }
76     public int getRed(Object JavaDoc inData) {
77         return 0;
78     }
79     public int getGreen(Object JavaDoc inData) {
80         return 0;
81     }
82     public int getBlue(Object JavaDoc inData) {
83         return 0;
84     }
85     public int getAlpha(Object JavaDoc inData) {
86         return 0;
87     }
88     public int getRGB(Object JavaDoc inData) {
89         return (getAlpha(inData) << 24) | (getRed(inData) << 16) | (getGreen(inData) << 8) | (getBlue(inData) << 0);
90     }
91     public Object JavaDoc getDataElements(int rgb, Object JavaDoc pixel) {
92         throw new UnsupportedOperationException JavaDoc("");
93     }
94     public int[] getComponents(int pixel, int[] components, int offset) {
95         throw new UnsupportedOperationException JavaDoc("");
96     }
97     public int[] getComponents(Object JavaDoc pixel, int[] components, int offset) {
98         throw new UnsupportedOperationException JavaDoc("");
99     }
100     public int[] getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset) {
101         return null;
102     }
103     public float[] getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset) {
104         return null;
105     }
106     public int getDataElement(int[] components, int offset) {
107         throw new UnsupportedOperationException JavaDoc("");
108     }
109     public Object JavaDoc getDataElements(int[] components, int offset, Object JavaDoc obj) {
110         throw new UnsupportedOperationException JavaDoc("");
111     }
112     public int getDataElement(float[] normComponents, int normOffset) {
113         return 0;
114     }
115     public Object JavaDoc getDataElements(float[] normComponents, int normOffset, Object JavaDoc obj) {
116         return null;
117     }
118     public float[] getNormalizedComponents(Object JavaDoc pixel, float[] normComponents, int normOffset) {
119          return null;
120     }
121     public ColorModel coerceData (WritableRaster raster, boolean isAlphaPremultiplied) {
122         throw new UnsupportedOperationException JavaDoc("");
123     }
124     public boolean isCompatibleRaster(Raster raster) {
125         throw new UnsupportedOperationException JavaDoc("");
126     }
127     public WritableRaster createCompatibleWritableRaster(int w, int h) {
128         throw new UnsupportedOperationException JavaDoc("");
129     }
130     public WritableRaster getAlphaRaster(WritableRaster raster) {
131         return null;
132     }
133 }
Popular Tags