public class ColorData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_RGB |
static int |
TYPE_RGBF |
static int |
TYPE_RGBFT |
static int |
TYPE_RGBT |
Constructor and Description |
---|
ColorData()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static ColorData |
fromSerializedString(java.lang.String str)
Creates a new
ColorData from the spezified serialized String. |
double |
getFilter() |
double |
getFloatBlue() |
double |
getFloatGreen() |
double |
getFloatRed() |
int |
getIntBlue() |
int |
getIntGreen() |
int |
getIntRed() |
double |
getPosition() |
PovClipseToken |
getPovClipseToken() |
java.lang.String |
getStringType() |
double |
getTransmit() |
int |
getType() |
boolean |
hasFilter() |
boolean |
hasTransmit() |
boolean |
isSameValue() |
void |
setBlue(double blue)
Sets the initial blue color component.
|
void |
setBlue(int blue)
Sets the initial blue color component.
|
void |
setFilter(double filter) |
void |
setGreen(double green) |
void |
setGreen(int green)
Sets the initial green color component.
|
void |
setPosition(double d) |
void |
setPovClipseToken(PovClipseToken povToken)
If this ColorData was created from a token, this was it.
|
void |
setRed(double red) |
void |
setRed(int red)
Sets the initial red color component.
|
void |
setSameValue(double value)
Sets all parts to the given value:
red
green
blue
filter if the type indicates a filter value
transmit if the type indicates a transmit value
|
void |
setTransmit(double trans) |
void |
setType(int type)
Sets the color type to
TYPE_RGBFT |
void |
setTypeRgb()
Sets the color type to
TYPE_RGB |
void |
setTypeRgbf()
Sets the color type to
TYPE_RGBF |
void |
setTypeRgbft()
Sets the color type to
TYPE_RGBFT |
void |
setTypeRgbt()
Sets the color type to
TYPE_RGBT |
void |
setVector(RValue rvalue) |
Color |
toColor(Device device)
Gets a
Color object representing the red, green and blue values but ignoring
the filter and transmit values. |
java.lang.String |
toSerializationString() |
java.lang.String |
toString() |
public static final int TYPE_RGB
public static final int TYPE_RGBF
public static final int TYPE_RGBT
public static final int TYPE_RGBFT
public Color toColor(Device device)
Color
object representing the red, green and blue values but ignoring
the filter and transmit values.device
- The Device to be used.Color
object.public double getFloatBlue()
public int getIntBlue()
public void setBlue(double blue)
blue
- The blue color component in the range of 0.0 to 1.0public void setBlue(int blue)
blue
- The blue color component in the range of 0 to 255public double getFilter()
public void setFilter(double filter)
filter
- The filter valuepublic double getFloatGreen()
public int getIntGreen()
public void setGreen(double green)
green
- The green component in the range from 0.0 to 1.0public void setGreen(int green)
blue
- The green color component in the range of 0 to 255public double getFloatRed()
public int getIntRed()
public void setRed(double red)
red
- The red component in the range from 0.0 to 1.0public void setRed(int red)
blue
- The red color component in the range of 0 to 255public double getTransmit()
public void setTransmit(double trans)
transmit
- The tranmit value without having a specific range. All values are possible.public java.lang.String getStringType()
rgb
rgbf
rgbt
rgbft
public int getType()
TYPE_
constants representing the color type.public void setTypeRgb()
TYPE_RGB
public void setTypeRgbt()
TYPE_RGBT
public void setTypeRgbf()
TYPE_RGBF
public void setTypeRgbft()
TYPE_RGBFT
public void setType(int type)
TYPE_RGBFT
public PovClipseToken getPovClipseToken()
public void setPovClipseToken(PovClipseToken povToken)
povToken
- the povToken to setpublic void setVector(RValue rvalue)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public double getPosition()
color_map
this is the map position
between 0.0 and 1.0public void setPosition(double d)
d
- The position within a color_map
.public boolean hasFilter()
true
if the color contains a filter
value,
false
otherwise.public boolean hasTransmit()
true
if the color contains a transmit
value,
false
otherwise.public void setSameValue(double value)
red
green
blue
filter
if the type
indicates a filter
valuetransmit
if the type
indicates a transmit
valuevalue
- The value to be set.public boolean isSameValue()
true
if all color parts have the very same value,
taking the filter
and transmit
values into account
if indicated by the color type.public java.lang.String toSerializationString()
public static ColorData fromSerializedString(java.lang.String str)
ColorData
from the spezified serialized String.str
- The serializuation String to be processed.ColorData
represented by the given String.java.lang.IllegalArgumentException
- If the String can not be parsed.