JIDE 3.5.15

com.jidesoft.gauge
Class BulletIntervalMarker

java.lang.Object
  extended by com.jidesoft.gauge.BulletIntervalMarker
All Implemented Interfaces:
Drawable

public class BulletIntervalMarker
extends Object
implements Drawable

A marker class for a coloured region along a Bullet. Note that the recommended approach is to use varying intensities of a single hue for marking the interval ranges, to make them easily discernible by those who are colour blind and to keep the number of colours on a dashboard display to a minimum.


Constructor Summary
BulletIntervalMarker(Bullet bullet, double from, double to)
          Constructs a BulletIntervalMarker for the specified Bullet, using COLOR.GRAY as the fill Color and ranging between the given from and to values.
BulletIntervalMarker(Bullet bullet, Paint fill, double from, double to)
          Constructs a BulletIntervalMarker for the specified Bullet, using the supplied fill value for the Color and ranging between the given from and to values.
 
Method Summary
 void draw(Graphics g)
          The method of the Drawable interface.
 double getBreadthProportion()
          Returns the value that determines how much of the breadth of the bullet is covered by this marker
 Paint getFill()
          Returns the current Color (or other paint) for the body of the interval
 void setBreadthProportion(double breadthProportion)
          Specify how much of the breadth of the bullet should be taken up by this marker.
 void setFill(Paint fill)
          Specify the Color (or other Paint fill) to use for filling the body of the interval
 void setInterval(double from, double to)
          You can call this method to change the interval for the intervalMarker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulletIntervalMarker

public BulletIntervalMarker(Bullet bullet,
                            double from,
                            double to)
Constructs a BulletIntervalMarker for the specified Bullet, using COLOR.GRAY as the fill Color and ranging between the given from and to values.

Parameters:
bullet - the bullet to which this marker will be applied
from - the start of the marker region
to - the end of the marker region

BulletIntervalMarker

public BulletIntervalMarker(Bullet bullet,
                            Paint fill,
                            double from,
                            double to)
Constructs a BulletIntervalMarker for the specified Bullet, using the supplied fill value for the Color and ranging between the given from and to values.

Parameters:
bullet - the bullet to which this marker will be applied
fill - the Color/Paint to use for filling in the body of the marker
from - the start of the marker region
to - the end of the marker region
Method Detail

setInterval

public void setInterval(double from,
                        double to)
You can call this method to change the interval for the intervalMarker

Parameters:
from - the start of the interval
to - the end of the interval

getBreadthProportion

public double getBreadthProportion()
Returns the value that determines how much of the breadth of the bullet is covered by this marker

Returns:
a value between 0 and 1

setBreadthProportion

public void setBreadthProportion(double breadthProportion)
Specify how much of the breadth of the bullet should be taken up by this marker. By default this is 1.

Parameters:
breadthProportion - a value between 0 and 1 (inclusive)

getFill

public Paint getFill()
Returns the current Color (or other paint) for the body of the interval

Returns:
the Paint for the body of the interval marker

setFill

public void setFill(Paint fill)
Specify the Color (or other Paint fill) to use for filling the body of the interval

Parameters:
fill - the fill Color (or Paint) for the indicated range along the primary axis

draw

public void draw(Graphics g)
The method of the Drawable interface.

Specified by:
draw in interface Drawable
Parameters:
g - the Graphics context

JIDE 3.5.15