JIDE 3.5.15

com.jidesoft.gauge
Class PointerIndicatorRenderer

java.lang.Object
  extended by com.jidesoft.gauge.AbstractIndicatorRenderer<Bullet>
      extended by com.jidesoft.gauge.PointerIndicatorRenderer
All Implemented Interfaces:
IndicatorRenderer<Bullet>

public class PointerIndicatorRenderer
extends AbstractIndicatorRenderer<Bullet>


Field Summary
 
Fields inherited from class com.jidesoft.gauge.AbstractIndicatorRenderer
labelColor, labelFont
 
Constructor Summary
PointerIndicatorRenderer()
           
PointerIndicatorRenderer(PointerIndicatorPlacement placement)
           
 
Method Summary
protected  Shape calculateShape(Bullet bullet, Double value)
          Calculates the shape of the indicator.
protected  Shape calculateShape(Orientation orientation, double pixelValue, double[] positions)
           
protected  void drawIndicator(Graphics2D g, Bullet bullet, Shape shape, IndicatorStyle style)
           
protected  void drawIndicator(Graphics2D g, double bulletPixelBreadth, Shape shape, IndicatorStyle style)
           
 BulletAxisPlacement getAxisPlacement()
          Deprecated. in favour of more flexible property getPointerPlacement()
 PointerLabelPlacement getLabelPlacement()
           
 double getPointerBreadth()
          Returns the breadth of the pointer as a proportion of the breadth of the bullet
 double getPointerLength()
          Returns the length of the pointer as a proportion of the breadth of the bullet
 PointerIndicatorPlacement getPointerPlacement()
          Returns the placement position of the pointer within the Bullet
 void paintLabel(Graphics2D g2d, Bullet bullet, Double value, IndicatorStyle style)
           
 Shape paintLegendItem(Graphics g, Bullet bullet, IndicatorStyle style, int w, int h)
          Paints a LegendItem onto the supplied Graphics context using the other supplied parameters to help size and style the LegendItem appropriately.
 void setAxisPlacement(BulletAxisPlacement axisPlacement)
          Deprecated. in favour of setPointerPlacement()
 void setLabelPlacement(PointerLabelPlacement labelPlacement)
           
 void setPointerBreadth(double pointerBreadth)
          Sets the breadth of the pointer as a proportion of the breadth of the bullet
 void setPointerLength(double pointerLength)
          Sets the length of the pointer as a proportion of the breadth of the bullet
 void setPointerPlacement(PointerIndicatorPlacement pointerPlacement)
          Specify the placement position of the pointer within the Bullet
 
Methods inherited from class com.jidesoft.gauge.AbstractIndicatorRenderer
generateLabel, getLabelColor, getLabeler, getLabelFont, getLabelText, getShadowRenderer, paintIndicator, setLabelColor, setLabeler, setLabelFont, setLabelText, setShadowRenderer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointerIndicatorRenderer

public PointerIndicatorRenderer()

PointerIndicatorRenderer

public PointerIndicatorRenderer(PointerIndicatorPlacement placement)
Method Detail

getPointerBreadth

public double getPointerBreadth()
Returns the breadth of the pointer as a proportion of the breadth of the bullet

Returns:
the breadth of the pointer as a proportion of the breadth of the bullet

setPointerBreadth

public void setPointerBreadth(double pointerBreadth)
Sets the breadth of the pointer as a proportion of the breadth of the bullet

Parameters:
pointerBreadth - the breadth of the pointer as a proportion of the breadth of the bullet

getPointerLength

public double getPointerLength()
Returns the length of the pointer as a proportion of the breadth of the bullet

Returns:
the length of the pointer as a proportion of the breadth of the bullet

setPointerLength

public void setPointerLength(double pointerLength)
Sets the length of the pointer as a proportion of the breadth of the bullet

Parameters:
pointerLength - the length of the pointer (default value is 0.15)

getAxisPlacement

public BulletAxisPlacement getAxisPlacement()
Deprecated. in favour of more flexible property getPointerPlacement()

Returns the placement of the pointer

Returns:
the placement of the pointer
See Also:
getPointerPlacement()

setAxisPlacement

public void setAxisPlacement(BulletAxisPlacement axisPlacement)
Deprecated. in favour of setPointerPlacement()

Specify the placement of the pointer

Parameters:
axisPlacement - where to place the pointer
See Also:
setPointerPlacement(PointerIndicatorPlacement)

getPointerPlacement

public PointerIndicatorPlacement getPointerPlacement()
Returns the placement position of the pointer within the Bullet

Returns:
the placement of the pointer within the Bullet

setPointerPlacement

public void setPointerPlacement(PointerIndicatorPlacement pointerPlacement)
Specify the placement position of the pointer within the Bullet

Parameters:
pointerPlacement - where to place the pointer

getLabelPlacement

public PointerLabelPlacement getLabelPlacement()

setLabelPlacement

public void setLabelPlacement(PointerLabelPlacement labelPlacement)

calculateShape

protected Shape calculateShape(Bullet bullet,
                               Double value)
Description copied from class: AbstractIndicatorRenderer
Calculates the shape of the indicator. This is needed so that we can create a BufferedImage of the right size when generating shadows

Specified by:
calculateShape in class AbstractIndicatorRenderer<Bullet>
Parameters:
bullet - the gauge, such as an instance of Bullet
value - the value to be represented by the indicator

calculateShape

protected Shape calculateShape(Orientation orientation,
                               double pixelValue,
                               double[] positions)

drawIndicator

protected void drawIndicator(Graphics2D g,
                             Bullet bullet,
                             Shape shape,
                             IndicatorStyle style)
Specified by:
drawIndicator in class AbstractIndicatorRenderer<Bullet>

drawIndicator

protected void drawIndicator(Graphics2D g,
                             double bulletPixelBreadth,
                             Shape shape,
                             IndicatorStyle style)

paintLabel

public void paintLabel(Graphics2D g2d,
                       Bullet bullet,
                       Double value,
                       IndicatorStyle style)
Specified by:
paintLabel in class AbstractIndicatorRenderer<Bullet>

paintLegendItem

public Shape paintLegendItem(Graphics g,
                             Bullet bullet,
                             IndicatorStyle style,
                             int w,
                             int h)
Description copied from interface: IndicatorRenderer
Paints a LegendItem onto the supplied Graphics context using the other supplied parameters to help size and style the LegendItem appropriately.

Parameters:
g - the Graphics context onto which we paint
bullet - the Gauge component (e.g. a Bullet)
style - the specified IndicatorStyle that may influence the painting
w - the width of the legend item to be painted
h - the height of the legend item to be painted
Returns:
the Shape of the painted item (can be null)

JIDE 3.5.15