JIDE 3.5.15

com.jidesoft.gauge
Class DefaultNeedleRenderer

java.lang.Object
  extended by 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.


Constructor Summary
DefaultNeedleRenderer()
           
 
Method Summary
 ShadowRenderer getShadowRenderer()
           
 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
 void setShadowRenderer(ShadowRenderer shadowRenderer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNeedleRenderer

public DefaultNeedleRenderer()
Method Detail

getShadowRenderer

public ShadowRenderer getShadowRenderer()

setShadowRenderer

public void setShadowRenderer(ShadowRenderer shadowRenderer)

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 paint
x - the x coordinate of the centre of the dial
y - the y coordinate of the centre of the dial
angle - the angle at which to draw the pointer in degrees
radius - the radius of the dial
m - the Meter component onto which the needle will be painted
style - the needle style, which provides preferred styling details. A renderer should respect these preferences but on occasions may have good reason to override them.

JIDE 3.5.15