A Gradient based painter used for painting "multi-stop" gradients. These are
gradients that imploys more than 2 colors, where each color is defined along
with a float value between 0 and 1 indicating at what point along the gradient
the new color is used.
As with BasicGradienPainter and mentioned in AbstractGradientPainter, the values
given to the startPoint and endPoint of the LinearGradientPainter are crucial. They
represent what distance from the origin the gradient should begin and end at,
depending on the size of the component. That is, they must be specified as values between
0 and 1, where 0 means "all the way on the left/top" and 1 means "all the way on the
right/bottom".
NOTE: LinearGradientPainter relies on LinearGradientPaint, which is
included in the optional jar MultipleGradientPaint.jar. Be sure to have this
jar on your classpath if you use this class
author: rbair |