|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.css.engine.value.AbstractValue
org.apache.batik.css.engine.value.svg12.DeviceColor
public class DeviceColor
This class represents an device-specific color value.
| Field Summary | |
|---|---|
protected float[] |
colors
The colors. |
protected int |
count
The color count. |
static String |
DEVICE_CMYK_COLOR_FUNCTION
|
static String |
DEVICE_GRAY_COLOR_FUNCTION
|
static String |
DEVICE_NCHANNEL_COLOR_FUNCTION
|
static String |
DEVICE_RGB_COLOR_FUNCTION
|
protected boolean |
nChannel
|
| Constructor Summary | |
|---|---|
DeviceColor(boolean nChannel)
Creates a new DeviceColor. |
|
| Method Summary | |
|---|---|
void |
append(float c)
Appends a color to the list. |
float |
getColor(int i)
Returns the color at the given index. |
String |
getCssText()
A string representation of the current value. |
short |
getCssValueType()
Implements Value.getCssValueType(). |
int |
getNumberOfColors()
Returns the number of colors. |
boolean |
isNChannel()
Indicates whether this color uses an N-Channel color space. |
String |
toString()
|
| Methods inherited from class org.apache.batik.css.engine.value.AbstractValue |
|---|
createDOMException, getBlue, getBottom, getFloatValue, getGreen, getIdentifier, getLeft, getLength, getListStyle, getPrimitiveType, getRed, getRight, getSeparator, getStringValue, getTop, item |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEVICE_GRAY_COLOR_FUNCTION
public static final String DEVICE_RGB_COLOR_FUNCTION
public static final String DEVICE_CMYK_COLOR_FUNCTION
public static final String DEVICE_NCHANNEL_COLOR_FUNCTION
protected boolean nChannel
protected int count
protected float[] colors
| Constructor Detail |
|---|
public DeviceColor(boolean nChannel)
nChannel - true for a device-nchannel() color, false for Gray, RGB and CMYK| Method Detail |
|---|
public short getCssValueType()
Value.getCssValueType().
getCssValueType in interface ValuegetCssValueType in class AbstractValuepublic boolean isNChannel()
public int getNumberOfColors()
throws DOMException
DOMException
public float getColor(int i)
throws DOMException
DOMExceptionpublic String getCssText()
public void append(float c)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||