JIDE 3.5.15

com.jidesoft.gauge
Class DialConicalPaint

java.lang.Object
  extended by com.jidesoft.gauge.DialConicalPaint
All Implemented Interfaces:
Paint, Transparency

public class DialConicalPaint
extends Object
implements Paint

A Paint for a Dial that allows you to specify which color(s) should appear at which angles, using the pivot point of the dial as the centre of the radius when computing the angles. Angles in between the specified angles are filled with a color derived as a linear gradient paint of the angle. Angles are specified in degrees between 0 and 360, or between -180 and 180 if you prefer.


Field Summary
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
DialConicalPaint(Dial dial, float[] angles, Color[] colors)
          Construct a DialConicalPaint using the pivot point of the supplied Dial as the centre from which to measure angles.
 
Method Summary
 PaintContext createContext(ColorModel colorModel, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
           
 int getTransparency()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialConicalPaint

public DialConicalPaint(Dial dial,
                        float[] angles,
                        Color[] colors)
Construct a DialConicalPaint using the pivot point of the supplied Dial as the centre from which to measure angles.

Parameters:
dial - the dial from which the angles are measured
angles - the angles (in degrees) that specify colors
colors - the colors at the specified angles
Method Detail

createContext

public PaintContext createContext(ColorModel colorModel,
                                  Rectangle deviceBounds,
                                  Rectangle2D userBounds,
                                  AffineTransform transform,
                                  RenderingHints hints)
Specified by:
createContext in interface Paint

getTransparency

public int getTransparency()
Specified by:
getTransparency in interface Transparency

JIDE 3.5.15