< prev index next >
src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java
Print this page
*** 26,46 ****
package com.sun.imageio.plugins.common;
import java.awt.color.ColorSpace;
/**
! * A dummy <code>ColorSpace</code> to enable <code>ColorModel</code>
* for image data which do not have an innate color representation.
*/
@SuppressWarnings("serial") // JDK-implementation class
public class BogusColorSpace extends ColorSpace {
/**
* Return the type given the number of components.
*
* @param numComponents The number of components in the
! * <code>ColorSpace</code>.
! * @exception IllegalArgumentException if <code>numComponents</code>
* is less than 1.
*/
private static int getType(int numComponents) {
if(numComponents < 1) {
throw new IllegalArgumentException("numComponents < 1!");
--- 26,46 ----
package com.sun.imageio.plugins.common;
import java.awt.color.ColorSpace;
/**
! * A dummy {@code ColorSpace} to enable {@code ColorModel}
* for image data which do not have an innate color representation.
*/
@SuppressWarnings("serial") // JDK-implementation class
public class BogusColorSpace extends ColorSpace {
/**
* Return the type given the number of components.
*
* @param numComponents The number of components in the
! * {@code ColorSpace}.
! * @exception IllegalArgumentException if {@code numComponents}
* is less than 1.
*/
private static int getType(int numComponents) {
if(numComponents < 1) {
throw new IllegalArgumentException("numComponents < 1!");
*** 60,74 ****
return type;
}
/**
! * Constructs a bogus <code>ColorSpace</code>.
*
* @param numComponents The number of components in the
! * <code>ColorSpace</code>.
! * @exception IllegalArgumentException if <code>numComponents</code>
* is less than 1.
*/
public BogusColorSpace(int numComponents) {
super(getType(numComponents), numComponents);
}
--- 60,74 ----
return type;
}
/**
! * Constructs a bogus {@code ColorSpace}.
*
* @param numComponents The number of components in the
! * {@code ColorSpace}.
! * @exception IllegalArgumentException if {@code numComponents}
* is less than 1.
*/
public BogusColorSpace(int numComponents) {
super(getType(numComponents), numComponents);
}
< prev index next >