JIDE 3.5.15

com.jidesoft.gauge
Class DialLabel

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

public class DialLabel
extends Object
implements Drawable

A Drawable class that can be used to add text to a Dial.

See Also:
Dial.addDrawable(com.jidesoft.chart.Drawable)

Constructor Summary
DialLabel(Dial dial, double radius, double angle, String label)
          Create a textual label to add to a dial
 
Method Summary
 void draw(Graphics g)
          The method of the Drawable interface that paints the label
 double getAngle()
          Returns the angle at which the label will be positioned
 Color getColor()
          Returns the color of the text of the label
 Font getFont()
          Returns the font being used for the label
 String getLabel()
          Returns the text of the label
 double getRadius()
          Returns the radius at which the label will be positioned
 void setAngle(double angle)
          Specify the angle at which the label will be positioned
 void setColor(Color color)
          Specify the color of the text of the label
 void setFont(Font font)
          Specify the font used for the label
 void setLabel(String label)
          Specify the text of the label
 void setRadius(double radius)
          Specify the radius at which the label will be positioned
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialLabel

public DialLabel(Dial dial,
                 double radius,
                 double angle,
                 String label)
Create a textual label to add to a dial

Parameters:
dial - the dial to which the label will be added
radius - the radius at which the label will be placed, as a proportion of the radius of the dial
angle - the angle at which the label will be placed, in degrees
label - the text of the label
Method Detail

getColor

public Color getColor()
Returns the color of the text of the label

Returns:
the color of the text of the label

setColor

public void setColor(Color color)
Specify the color of the text of the label

Parameters:
color - the color of the text of the label

getFont

public Font getFont()
Returns the font being used for the label

Returns:
the font used for the label

setFont

public void setFont(Font font)
Specify the font used for the label

Parameters:
font - the font used for the label

getLabel

public String getLabel()
Returns the text of the label

Returns:
the text of the label

setLabel

public void setLabel(String label)
Specify the text of the label

Parameters:
label - the text of the label

getAngle

public double getAngle()
Returns the angle at which the label will be positioned

Returns:
the angle at which the label will be positioned

setAngle

public void setAngle(double angle)
Specify the angle at which the label will be positioned

Parameters:
angle - the angle at which the label will be positioned

getRadius

public double getRadius()
Returns the radius at which the label will be positioned

Returns:
the radius at which the label will be positioned

setRadius

public void setRadius(double radius)
Specify the radius at which the label will be positioned

Parameters:
radius - the radius at which the label will be positioned

draw

public void draw(Graphics g)
The method of the Drawable interface that paints the label

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

JIDE 3.5.15