Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.graphics.color
Class PDDeviceN

    java.lang.Object
      org.pdfbox.pdmodel.graphics.color.PDColorSpace
          org.pdfbox.pdmodel.graphics.color.PDDeviceN

All Implemented Interfaces:
  COSObjectable

public class PDDeviceN
extends PDColorSpace

This class represents a DeviceN color space.

Version:
  $Revision: 1.2 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Field Summary
`static String` | `NAME` The name of this color space.

Constructor Summary
`PDDeviceN()` Constructor.
`PDDeviceN(COSArray separation)` Constructor.

Method Summary
`ColorModel` | `createColorModel(int bpc)` Create a Java color model for this colorspace.
`ColorSpace` | `createColorSpace()` Create a Java colorspace for this colorspace.
`PDColorSpace` | `getAlternateColorSpace()` This will get the alternate color space for this separation.
`PDDeviceNAttributes` | `getAttributes()` This will get the attributes that are associated with the deviceN color space.
`List` | `getColorantNames()` This will get the colorant names.
`String` | `getName()` This will return the name of the color space.
`int` | `getNumberOfComponents()` This will get the number of components that this color space is made up of.
`COSBase` | `getTintTransform()` This will get the tint transform function.
`void` | `setAlternateColorSpace(PDColorSpace cs)` This will set the alternate color space.
`void` | `setAttributes(PDDeviceNAttributes attributes)` This will set the color space attributes.
`void` | `setColorantNames(List names)` This will set the list of colorants.
`void` | `setTintTransform(COSBase tint)` This will set the tint transform function.

Methods inherited from class org.pdfbox.pdmodel.graphics.color.PDColorSpace
`getCOSObject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final String NAME

  The name of this color space.

  See Also:
    Constant Field Values

Constructor Detail

### PDDeviceN

    public PDDeviceN()

  Constructor.

### PDDeviceN

    public PDDeviceN(COSArray separation)

  Constructor.

Parameters:
  `separation` - The array containing all separation information.

Method Detail

### getName

    public String getName()

  This will return the name of the color space. For a PDSeparation object this will always return "Separation"

  Specified by:
    `getName` in class `PDColorSpace`
  Returns:
    The name of the color space.

### getNumberOfComponents

    public int getNumberOfComponents()
                              throws IOException

  This will get the number of components that this color space is made up of.

  Specified by:
    `getNumberOfComponents` in class `PDColorSpace`
  Returns:
    The number of components in this color space.
  Throws:
    `IOException` - If there is an error getting the number of color components.

### createColorSpace

    public ColorSpace createColorSpace()
                                throws IOException

  Create a Java colorspace for this colorspace.

  Specified by:
    `createColorSpace` in class `PDColorSpace`
  Returns:
    A color space that can be used for Java AWT operations.
  Throws:
    `IOException` - If there is an error creating the color space.

### createColorModel

    public ColorModel createColorModel(int bpc)
                                throws IOException

  Create a Java color model for this colorspace.

  Specified by:
    `createColorModel` in class `PDColorSpace`
  Parameters:
    `bpc` - The number of bits per component.
  Returns:
    A color model that can be used for Java AWT operations.
  Throws:
    `IOException` - If there is an error creating the color model.

### getColorantNames

    public List getColorantNames()

  This will get the colorant names. A list of string objects.

  Returns:
    A list of colorants

### setColorantNames

    public void setColorantNames(List names)

  This will set the list of colorants.

  Parameters:
    `names` - The list of colorant names.

### getAlternateColorSpace

    public PDColorSpace getAlternateColorSpace()
                                        throws IOException

  This will get the alternate color space for this separation.

  Returns:
    The alternate color space.
  Throws:
    `IOException` - If there is an error getting the alternate color space.

### setAlternateColorSpace

    public void setAlternateColorSpace(PDColorSpace cs)

  This will set the alternate color space.

  Parameters:
    `cs` - The alternate color space.

### getTintTransform

    public COSBase getTintTransform()

  This will get the tint transform function. At this time the PDModel does not support functions so we will just return the COSBase object. This method will change in the future to be a PDModel object.

  Returns:
    The tint transform function.

### setTintTransform

    public void setTintTransform(COSBase tint)

  This will set the tint transform function. At this time the PDModel does not support functions so we will just return the COSBase object. This method will change in the future to be a PDModel object.

  Parameters:
    `tint` - The tint transform function.

### getAttributes

    public PDDeviceNAttributes getAttributes()

  This will get the attributes that are associated with the deviceN color space.

  Returns:
    The DeviceN attributes.

### setAttributes

    public void setAttributes(PDDeviceNAttributes attributes)

  This will set the color space attributes. If null is passed in then all attribute will be removed.

  Parameters:
    `attributes` - The color space attributes.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD