public class PointerIndicatorRenderer extends AbstractIndicatorRenderer<Bullet>
labelColor, labelFont, labelVisible
Constructor and Description |
---|
PointerIndicatorRenderer() |
PointerIndicatorRenderer(PointerIndicatorPlacement placement) |
Modifier and Type | Method and Description |
---|---|
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
|
generateLabel, getLabelColor, getLabeler, getLabelFont, getLabelText, getShadowRenderer, isLabelVisible, paintIndicator, setLabelColor, setLabeler, setLabelFont, setLabelText, setLabelVisible, setShadowRenderer
public PointerIndicatorRenderer()
public PointerIndicatorRenderer(PointerIndicatorPlacement placement)
public double getPointerBreadth()
public void setPointerBreadth(double pointerBreadth)
pointerBreadth
- the breadth of the pointer as a proportion of the breadth of the bulletpublic double getPointerLength()
public void setPointerLength(double pointerLength)
pointerLength
- the length of the pointer (default value is 0.15)public BulletAxisPlacement getAxisPlacement()
getPointerPlacement()
public void setAxisPlacement(BulletAxisPlacement axisPlacement)
axisPlacement
- where to place the pointersetPointerPlacement(PointerIndicatorPlacement)
public PointerIndicatorPlacement getPointerPlacement()
public void setPointerPlacement(PointerIndicatorPlacement pointerPlacement)
pointerPlacement
- where to place the pointerpublic PointerLabelPlacement getLabelPlacement()
public void setLabelPlacement(PointerLabelPlacement labelPlacement)
protected Shape calculateShape(Bullet bullet, Double value)
AbstractIndicatorRenderer
calculateShape
in class AbstractIndicatorRenderer<Bullet>
bullet
- the gauge, such as an instance of Bulletvalue
- the value to be represented by the indicatorprotected Shape calculateShape(Orientation orientation, double pixelValue, double[] positions)
protected void drawIndicator(Graphics2D g, Bullet bullet, Shape shape, IndicatorStyle style)
drawIndicator
in class AbstractIndicatorRenderer<Bullet>
protected void drawIndicator(Graphics2D g, double bulletPixelBreadth, Shape shape, IndicatorStyle style)
public void paintLabel(Graphics2D g2d, Bullet bullet, Double value, IndicatorStyle style)
paintLabel
in class AbstractIndicatorRenderer<Bullet>
public Shape paintLegendItem(Graphics g, Bullet bullet, IndicatorStyle style, int w, int h)
IndicatorRenderer
g
- the Graphics context onto which we paintbullet
- the Gauge component (e.g. a Bullet)style
- the specified IndicatorStyle that may influence the paintingw
- the width of the legend item to be paintedh
- the height of the legend item to be painted