com.jidesoft.gauge
Class DialConicalPaint
java.lang.Object
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.
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 measuredangles
- the angles (in degrees) that specify colorscolors
- the colors at the specified angles
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