com.jidesoft.gauge
Class DefaultNeedleRenderer
java.lang.Object
com.jidesoft.gauge.DefaultNeedleRenderer
- All Implemented Interfaces:
- NeedleRenderer
public class DefaultNeedleRenderer
- extends Object
- implements NeedleRenderer
The usual renderer for a needle. By recognising a NeedleStyle, this class is already quite configurable, so you
should not normally need to define a custom renderer.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultNeedleRenderer
public DefaultNeedleRenderer()
paintNeedle
public Shape paintNeedle(Graphics2D g2d,
AbstractGauge m,
Double value,
double x,
double y,
double angle,
double radius,
NeedleStyle style)
- Paints the pointer in the centre of the display
- Specified by:
paintNeedle in interface NeedleRenderer
- Parameters:
g2d - the graphics context into which we should paintx - the x coordinate of the centre of the dialy - the y coordinate of the centre of the dialangle - the angle at which to draw the pointer in degreesradius - the radius of the dialm - the Meter component onto which the needle will be paintedstyle - the needle style, which provides preferred styling details. A renderer should respect these
preferences but on occasions may have good reason to override them.