public class JDFCMYKColor extends JDFNumList
JDFBaseDataTypes.EnumFitsValuecapacityIncrement, elementCount, elementDatamodCountEPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION| Constructor and Description |
|---|
JDFCMYKColor()
constructs a CMYK color with all values set to 0.0 Double
|
JDFCMYKColor(double[] cmykArray) |
JDFCMYKColor(double c,
double m,
double y,
double k)
constructs a new CMYK color with the given double values
|
JDFCMYKColor(JDFNumList nl)
constructs a CMYK color with a given JDFNumberList
|
JDFCMYKColor(String s)
constructs a CMYK color with the given String
|
JDFCMYKColor(Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
static JDFCMYKColor |
createCMYKColor(String s)
factory for JDFCMYKColor that silently returns null in case of illegal strings
|
double |
getC()
getC - returns the value C of the CMYK color
|
double |
getK()
getK - returns the value K of the CMYK color
|
double |
getM()
getM - returns the value M of the CMYK color
|
JDFRGBColor |
getRGB() |
static double[] |
getRGBArray(double c,
double m,
double y,
double k) |
double |
getY()
getY - returns the value Y of the CMYK color
|
boolean |
isValid()
isValid - the size of the vector must be 4 and all instances are Double types
|
void |
setC(double c)
setC - sets the value C of the CMYK color
|
void |
setK(double k)
setK - sets the value K of the CMYK color
|
void |
setM(double m)
setM - sets the value M of the CMYK color
|
void |
setNamedColor(String name)
set the cmyk value of this to a matching value
|
void |
setY(double y)
setY - sets the value Y of the CMYK color
|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDoubleList, getIntArray, getString, getString, hashCode, isValidString, matches, removeElementAt, replaceElementAt, scale, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, setString, subtract, toString, unifyadd, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSizepublic JDFCMYKColor()
@Deprecated public JDFCMYKColor(Vector v) throws DataFormatException
v - - the given vectorDataFormatException - - if the Vector has not a valid formatpublic JDFCMYKColor(String s) throws DataFormatException
s - - the given StringDataFormatException - - if the String has not a valid formatpublic JDFCMYKColor(JDFNumList nl) throws DataFormatException
nl - - the given number listDataFormatException - - if the String has not a valid formatpublic JDFCMYKColor(double c,
double m,
double y,
double k)
c - - the value cm - - the value my - - the value yk - - the value kpublic JDFCMYKColor(double[] cmykArray)
cmykArray - 4 doubles from 0 to 1 c,m,y,kpublic static JDFCMYKColor createCMYKColor(String s)
s - the string to parsepublic boolean isValid()
throws DataFormatException
isValid in class JDFNumListDataFormatException - - if the Vector has not a valid formatpublic double getC()
public void setC(double c)
c - the value C of the CMYK colorpublic double getM()
public void setM(double m)
m - the value M of the CMYK colorpublic double getY()
public void setY(double y)
y - the value Y of the CMYK colorpublic double getK()
public void setK(double k)
k - the value K of the CMYK colorpublic JDFRGBColor getRGB()
public static double[] getRGBArray(double c,
double m,
double y,
double k)
c - m - y - k - public void setNamedColor(String name)
name - Copyright © 2013. All Rights Reserved.