public class ColorPoint1D extends java.lang.Object implements java.lang.Comparable<ColorPoint1D>
Constructor and Description |
---|
ColorPoint1D(java.awt.Color pColor,
double dPosition)
Creates a color point object with the specified color and position.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ColorPoint1D pOtherPoint)
Implementation of the comparable interface to sort color points according to their position.
|
java.awt.Color |
getColor()
Returns the color of the color point.
|
double |
getPosition()
Returns the position of the color point.
|
void |
setColor(java.awt.Color pColor)
Sets the color of the color point.
|
void |
setPosition(double dPosition)
Sets the position of the color point.
|
public ColorPoint1D(java.awt.Color pColor, double dPosition)
pColor
- The color of the color point.dPosition
- The position of the color point as double value.public void setColor(java.awt.Color pColor)
pColor
- The color of the color point.public void setPosition(double dPosition)
dPosition
- The position of the color point as double value.public java.awt.Color getColor()
public double getPosition()
public int compareTo(ColorPoint1D pOtherPoint)
compareTo
in interface java.lang.Comparable<ColorPoint1D>
pOtherPoint
- The other color point which is needed for the comparison.