|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<Object>
org.cip4.jdflib.datatypes.JDFNumList
org.cip4.jdflib.datatypes.JDFRGBColor
public class JDFRGBColor
This class is a representation of a RGB color (JDFRGBColor). It is a blank separated list of double values consisting of R the red color, G the green color and B the blue color value.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes |
|---|
JDFBaseDataTypes.EnumFitsValue |
| Field Summary |
|---|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Fields inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes |
|---|
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION |
| Constructor Summary | |
|---|---|
JDFRGBColor()
constructs a RGB color with all values set to 0.0 Double |
|
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 |
|
| Method Summary | |
|---|---|
static JDFRGBColor |
createRGBColor(String s)
factory for JDFXYPair that silently returns null in case of illegal strings |
double |
getB()
getBlue - returns the blue color |
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 |
| Methods inherited from class org.cip4.jdflib.datatypes.JDFNumList |
|---|
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, unify |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Constructor Detail |
|---|
public JDFRGBColor()
@Deprecated
public JDFRGBColor(Vector v)
throws DataFormatException
v - Vector of Double
DataFormatException - - if the Vector has not a valid format
public JDFRGBColor(String s)
throws DataFormatException
s - the given String
DataFormatException - - if the String has not a valid format
public JDFRGBColor(JDFNumList nl)
throws DataFormatException
nl - the given number list
DataFormatException - - if the String has not a valid format
public JDFRGBColor(double r,
double g,
double b)
r - the color redg - the color greenb - the color blue| Method Detail |
|---|
public static JDFRGBColor createRGBColor(String s)
s - the string to parse
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||