src/java.desktop/share/classes/java/awt/image/DirectColorModel.java
Print this page
@@ -264,41 +264,41 @@
* Returns the mask indicating which bits in an <code>int</code> pixel
* representation contain the red color component.
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the red color sample.
*/
- final public int getRedMask() {
+ public final int getRedMask() {
return maskArray[0];
}
/**
* Returns the mask indicating which bits in an <code>int</code> pixel
* representation contain the green color component.
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the green color sample.
*/
- final public int getGreenMask() {
+ public final int getGreenMask() {
return maskArray[1];
}
/**
* Returns the mask indicating which bits in an <code>int</code> pixel
* representation contain the blue color component.
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the blue color sample.
*/
- final public int getBlueMask() {
+ public final int getBlueMask() {
return maskArray[2];
}
/**
* Returns the mask indicating which bits in an <code>int</code> pixel
* representation contain the alpha component.
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the alpha sample.
*/
- final public int getAlphaMask() {
+ public final int getAlphaMask() {
if (supportsAlpha) {
return maskArray[3];
} else {
return 0;
}
@@ -363,11 +363,11 @@
* is 0.
* @param pixel the specified pixel
* @return the red color component for the specified pixel, from
* 0 to 255 in the sRGB <code>ColorSpace</code>.
*/
- final public int getRed(int pixel) {
+ public final int getRed(int pixel) {
if (is_sRGB) {
return getsRGBComponentFromsRGB(pixel, 0);
} else if (is_LinearRGB) {
return getsRGBComponentFromLinearRGB(pixel, 0);
}
@@ -386,11 +386,11 @@
* is 0.
* @param pixel the specified pixel
* @return the green color component for the specified pixel, from
* 0 to 255 in the sRGB <code>ColorSpace</code>.
*/
- final public int getGreen(int pixel) {
+ public final int getGreen(int pixel) {
if (is_sRGB) {
return getsRGBComponentFromsRGB(pixel, 1);
} else if (is_LinearRGB) {
return getsRGBComponentFromLinearRGB(pixel, 1);
}
@@ -409,11 +409,11 @@
* is 0.
* @param pixel the specified pixel
* @return the blue color component for the specified pixel, from
* 0 to 255 in the sRGB <code>ColorSpace</code>.
*/
- final public int getBlue(int pixel) {
+ public final int getBlue(int pixel) {
if (is_sRGB) {
return getsRGBComponentFromsRGB(pixel, 2);
} else if (is_LinearRGB) {
return getsRGBComponentFromLinearRGB(pixel, 2);
}
@@ -426,11 +426,11 @@
* from 0 to 255. The pixel value is specified as an <code>int</code>.
* @param pixel the specified pixel
* @return the value of the alpha component of <code>pixel</code>
* from 0 to 255.
*/
- final public int getAlpha(int pixel) {
+ public final int getAlpha(int pixel) {
if (!supportsAlpha) return 255;
int a = ((pixel & maskArray[3]) >>> maskOffsets[3]);
if (scaleFactors[3] != 1.0f) {
a = (int)(a * scaleFactors[3] + 0.5f);
}
@@ -448,11 +448,11 @@
* @param pixel the specified pixel
* @return the RGB value of the color/alpha components of the specified
* pixel.
* @see ColorModel#getRGBdefault
*/
- final public int getRGB(int pixel) {
+ public final int getRGB(int pixel) {
if (is_sRGB || is_LinearRGB) {
return (getAlpha(pixel) << 24)
| (getRed(pixel) << 16)
| (getGreen(pixel) << 8)
| (getBlue(pixel) << 0);
@@ -921,11 +921,11 @@
* @param offset the offset into the <code>components</code> array at
* which to start storing the color and alpha components
* @return an array containing the color and alpha components of the
* specified pixel starting at the specified offset.
*/
- final public int[] getComponents(int pixel, int[] components, int offset) {
+ public final int[] getComponents(int pixel, int[] components, int offset) {
if (components == null) {
components = new int[offset+numComponents];
}
for (int i=0; i < numComponents; i++) {
@@ -972,11 +972,11 @@
* color and alpha components, starting at <code>offset</code>
* @exception UnsupportedOperationException if this
* <code>transferType</code> is not supported by this
* color model
*/
- final public int[] getComponents(Object pixel, int[] components,
+ public final int[] getComponents(Object pixel, int[] components,
int offset) {
int intpixel=0;
switch (transferType) {
case DataBuffer.TYPE_BYTE:
byte bdata[] = (byte[])pixel;
@@ -1008,11 +1008,11 @@
* @throws IllegalArgumentException if <code>w</code> or <code>h</code>
* is less than or equal to zero
* @see WritableRaster
* @see SampleModel
*/
- final public WritableRaster createCompatibleWritableRaster (int w,
+ public final WritableRaster createCompatibleWritableRaster (int w,
int h) {
if ((w <= 0) || (h <= 0)) {
throw new IllegalArgumentException("Width (" + w + ") and height (" + h +
") cannot be <= 0");
}
@@ -1171,11 +1171,11 @@
* coerced data.
* @exception UnsupportedOperationException if this
* <code>transferType</code> is not supported by this
* color model
*/
- final public ColorModel coerceData (WritableRaster raster,
+ public final ColorModel coerceData (WritableRaster raster,
boolean isAlphaPremultiplied)
{
if (!supportsAlpha ||
this.isAlphaPremultiplied() == isAlphaPremultiplied) {
return this;