public class JDFCMYKColor extends JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparatorJDFBaseDataTypes.EnumFitsValueEPSILON, 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(java.lang.String s)
constructs a CMYK color with the given String
|
JDFCMYKColor(java.util.Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
static JDFCMYKColor |
createCMYKColor(java.lang.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(java.lang.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, getDouble, getDoubleList, getDoubleVector, getIntArray, getString, getString, hashCode, intAt, isValidString, matches, max, min, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, setString, setX, shift, sort, subtract, toString, unify, volumeadd, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic JDFCMYKColor()
@Deprecated
public JDFCMYKColor(java.util.Vector v)
throws java.util.zip.DataFormatException
v - - the given vectorjava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic JDFCMYKColor(java.lang.String s)
throws java.util.zip.DataFormatException
s - - the given Stringjava.util.zip.DataFormatException - - if the String has not a valid formatpublic JDFCMYKColor(JDFNumList nl) throws java.util.zip.DataFormatException
nl - - the given number listjava.util.zip.DataFormatException - - 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(java.lang.String s)
s - the string to parsepublic boolean isValid()
throws java.util.zip.DataFormatException
isValid in class JDFNumListjava.util.zip.DataFormatException - - 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(java.lang.String name)
name -