public class JDFRGBColor 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 |
|---|
JDFRGBColor()
constructs a RGB color with all values set to 0.0 Double
|
JDFRGBColor(double[] rgbArray) |
JDFRGBColor(double r,
double g,
double b)
constructs a new RGB color with the given double values
|
JDFRGBColor(JDFNumList nl)
constructs a RGB color with all values set via a JDFNumberList
|
JDFRGBColor(String s)
constructs a RGB color with all values set via a String
|
JDFRGBColor(Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
static JDFRGBColor |
createRGBColor(String s)
factory for JDFXYPair that silently returns null in case of illegal strings
|
double |
getB()
getBlue - returns the blue color
|
JDFCMYKColor |
getCMYK() |
static double[] |
getCMYKArray(double r,
double g,
double b) |
static double[] |
getCMYKArray(int r,
int g,
int b) |
double |
getG()
getG - returns the green color
|
String |
getHTMLColor()
get the html color representation of this color in the format 0xrrggbb;
|
double |
getR()
getR - returns the red color
|
boolean |
isValid()
isValid - true if the size of the vector is 3 and all instances are Double types
|
void |
setB(double blue)
setBlue - sets the blue color
|
void |
setG(double green)
setGreen - sets the green color
|
void |
setR(double red)
setR - sets the red 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 JDFRGBColor()
@Deprecated public JDFRGBColor(Vector v) throws DataFormatException
v - Vector of DoubleDataFormatException - - if the Vector has not a valid formatpublic JDFRGBColor(String s) throws DataFormatException
s - the given StringDataFormatException - - if the String has not a valid formatpublic JDFRGBColor(JDFNumList nl) throws DataFormatException
nl - the given number listDataFormatException - - if the String has not a valid formatpublic JDFRGBColor(double r,
double g,
double b)
r - the color redg - the color greenb - the color bluepublic JDFRGBColor(double[] rgbArray)
rgbArray - 0-1 r,g,bpublic static JDFRGBColor createRGBColor(String s)
s - the string to parsepublic boolean isValid()
throws DataFormatException
isValid in class JDFNumListDataFormatException - - if the Vector has not a valid formatpublic double getR()
public void setR(double red)
red - the red colorpublic double getG()
public void setG(double green)
green - the green colorpublic double getB()
public void setB(double blue)
blue - the blue colorpublic String getHTMLColor()
public JDFCMYKColor getCMYK()
public static double[] getCMYKArray(double r,
double g,
double b)
r - g - b - public static double[] getCMYKArray(int r,
int g,
int b)
r - g - b - Copyright © 2013. All Rights Reserved.