public class JDFCMYKColor extends JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparator
JDFBaseDataTypes.EnumFitsValue
capacityIncrement, elementCount, elementData
modCount
EPSILON, 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, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, setString, sort, subtract, toString, unify, volume
add, 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, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
public 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 JDFNumList
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(String name)
name
- Copyright © 2018. All rights reserved.