|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.ColorBlender
public class ColorBlender
Provides access to the ColorBlender object.
This Class allows you to easily obtain a gradient of colors between two selected color hues. By specifying a number of steps, developers may effortlessly create an even gradient of Color objects. Below is an example of how the ColorBlender object may be used to configure even gradient colors for series in a bar chart:
Sample Code:
ColorBlender cb = new ColorBlender(Color1,Color2,);
for (int i=0; i<NumberOfSeries; i++)
chart1.getSeries().get(i).setColor(cb.nextColor());
Constructor Summary | |
---|---|
ColorBlender(Color fromColor,
Color toColor,
int steps)
|
Method Summary | |
---|---|
Color |
nextColor()
Gets the next available gradient color from the blend. |
void |
startBlending()
Resets the blender. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorBlender(Color fromColor, Color toColor, int steps)
Method Detail |
---|
public Color nextColor()
Gets the next available gradient color from the blend.
NextColor is used to get the next available gradient color of the blender.
Below, the color of each series has been changed to different variations of blue using the property ColorBlender's NextColor property:
startBlending()
public void startBlending()
Resets the blender.
StartBlending can be used to reset the blender. This is useful if you need a few gradient values and then need to return to the original color of the blender.
nextColor()
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |