com.objectplanet.chart.ext
Class GaugeChart

java.lang.Object
  extended byjava.awt.Component
      extended bycom.objectplanet.chart.ext.GaugeChart
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class GaugeChart
extends java.awt.Component

Author:
Philipp Kolibaba.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int GRADIENT_PAINT_DIAGONAL1
          Gradient paint from top left to bottom right
static int GRADIENT_PAINT_DIAGONAL2
          Gradient paint from bottom left to top right
static int GRADIENT_PAINT_HORIZONTAL
          Horizontal gradient paint
static int GRADIENT_PAINT_VERTICAL
          Vertical gradient paint
static int POINTER_STYLE_ARROW
          Used to display pointer as an arrow
static int POINTER_STYLE_LINE
          Used to display pointer as a line
static int POINTER_STYLE_TRIANGLE
          Used to display pointer as a triangle
static int RANGE_LABEL_INSIDE
          Range labels display inside the gauge.
static int RANGE_LABEL_OUTSIDE
          Range labels display outside the gauge.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GaugeChart()
          Creates a gauge chart.
 
Method Summary
 void addItemListener(java.awt.event.ItemListener l)
          Adds an item listener to the chart.
 void autoRepaint()
          Calls repaint() if the automaticRepaintOn is turned on.
 java.awt.Image createImage(int width, int height)
          Creates an offscreen image.
 java.lang.String formatRangeNumber(int index, double value)
          Formats a floating number to the number of decimals given for the specified range.
 java.awt.Color getBackground2()
          Gets the secondary background of the chart component.
 java.awt.Color getBorderColor(int index)
          Gets color of the specified border.
 int getBorderWidth(int index)
          Gets width of the specified border.
 java.awt.Color getChartBackground()
          Gets the color of the chart background itself.
 java.awt.Color getChartBackground2()
          Gets the secondary background of the chart grid itself.
 java.awt.Color getChartForeground()
          Gets the color of the chart foreground itself.
 int getEndAngle()
          Gets the end angle of the gauge.
 java.awt.Font getFont(java.lang.String label)
          Gets the font for the specified label.
 java.lang.String getLabel(java.lang.String name)
          Gets the specified label from the chart.
 double getLowerRange()
          Gets the lower value of the range.
 java.awt.Dimension getMinimumSize()
          This method returns the minimum size of the chart.
 double getPointer(int index)
          Gets value of the pointer with specified index.
 java.awt.Color getPointerColor(int index)
          Gets color of the pointer with specified index.
 double getPointerStyle(int index)
          Gets style of the pointer with specified index.
 java.awt.Dimension getPreferredSize()
          This method is called by the awt, and returns the preferred size of the chart.
 double getRange()
          Gets the upper value of the range.
 java.awt.Color getRangeColor(int range)
          Returns color of the given range.
 int getRangeDecimalCount(int index)
          Gets the number of decimals used in the range values.
 java.awt.Color getRangeHighlight()
          Gets the range highlight color.
 java.awt.Color getRangeLabelColor(int range)
          Returns color of the range labels.
 int getRangeLabelStyle()
          Gets style of the range labels.
 java.awt.Color getSectorColor(int index)
          Gets color of the sector with specified index.
 double[] getSectorHighlight(int index)
          Gets the start and the end values of the specified sector.
 int getStartAngle()
          Gets the start angle of the gauge.
 java.lang.String getTitle()
          Gets the chart title.
static java.lang.String getVersion()
          Returns the current version of the charts.
 boolean isRangeLabelsOn(int range)
          Returns true if the range labels are turned on, false otherwise.
 boolean isTitleOn()
          Checks if the title is turned on.
 void paint(java.awt.Graphics g)
          This method is overridden to paint the chart using double buffering.
protected  void processEvent(java.awt.AWTEvent event)
          Handles the chart events.
 void removeBorder(int index)
          Removes border with the specified index.
 void removeExternalGraphics()
          Removes external graphics context if there is one.
 void removeItemListener(java.awt.event.ItemListener l)
          Removes the specified item listener from the chart.
 void removePointer(int index)
          Removes pointer with the specified index.
 void render(java.awt.Graphics g)
          Renders the bar chart according to the current chart attributes and which charts features are turned on or off.
 void render(java.awt.Graphics g, boolean offscreenOn)
          Renders the gauge chart according to the current gauge attributes and which charts features are turned on or off.
protected  void renderOffScreen(java.awt.Graphics g)
          A subclass should override this method to paint on top of the chart before it is painted to the AWT component.
 void setBackground(java.awt.Color color)
          Sets the chart component background color, outside the gauge.
 void setBackground2(java.awt.Color color)
          Sets the secondary chart component background color, outside the chart grid.
 void setBorder(int index, int width)
          Sets a border with the specified width (0-based).
 void setBorderColor(int index, java.awt.Color color)
          Sets color for the specified border.
 void setChartBackground(java.awt.Color color)
          Sets the background color of the chart itself.
 void setChartBackground2(java.awt.Color color)
          Sets the secondary background color of the chart itself.
 void setChartForeground(java.awt.Color color)
          Sets the foreground color of the chart itself.
 void setEndAngle(int angle)
          Sets the end angle of the gauge.
 void setExternalGraphics(java.awt.Graphics g, java.awt.Image image)
          Sets an external graphics context to paint with.
 void setFont(java.lang.String label, java.awt.Font font)
          Sets the font for the specified label.
 void setForeground(java.awt.Color color)
          Sets the color of the labels.
 void setLabel(java.lang.String name, java.lang.String label)
          Sets the specified label in the chart.
 void setLowerRange(double value)
          Sets the lower value of the range.
 void setPointer(int index, double value)
          Sets a pointer with the specified index (0-based).
 void setPointerColor(int index, java.awt.Color color)
          Sets color for a pointer with the specified index (0-based).
 void setPointerStyle(int index, int style)
          Sets style for the pointer with specified index (0-based).
 void setPreferredSize(int width, int height)
          Sets the preferred size of the chart.
 void setRange(double value)
          Sets the upper value of the range.
 void setRangeColor(int range, java.awt.Color color)
          Sets color of the range.
 void setRangeDecimalCount(int index, int count)
          Sets the number of decimals to use in the range label values.
 void setRangeHighlight(java.awt.Color color)
          Sets the range highlight color
 void setRangeLabelColor(int range, java.awt.Color color)
          Sets color of the range labels.
 void setRangeLabelsOn(int range, boolean on)
          Turns labels of the given range on or off.
 void setRangeLabelStyle(int style)
          Sets style of the range labels.
 void setSectorColor(int index, java.awt.Color color)
          Sets color for a specified highlight sector.
 void setSectorHighlight(int index, double start, double end)
          Sets a highlighted sector with the specified start and end values in the gauge's range.
 void setStartAngle(int angle)
          Sets the start angle of the gauge.
 void setTitle(java.lang.String title)
          Sets the chart title.
 void setTitleOn(boolean on)
          Turns on or off the chart title.
 void update(java.awt.Graphics g)
          This method is overridden to avoid flicker when the chart is repainted.
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRADIENT_PAINT_DIAGONAL1

public static final int GRADIENT_PAINT_DIAGONAL1
Gradient paint from top left to bottom right

See Also:
Constant Field Values

GRADIENT_PAINT_DIAGONAL2

public static final int GRADIENT_PAINT_DIAGONAL2
Gradient paint from bottom left to top right

See Also:
Constant Field Values

GRADIENT_PAINT_HORIZONTAL

public static final int GRADIENT_PAINT_HORIZONTAL
Horizontal gradient paint

See Also:
Constant Field Values

GRADIENT_PAINT_VERTICAL

public static final int GRADIENT_PAINT_VERTICAL
Vertical gradient paint

See Also:
Constant Field Values

POINTER_STYLE_ARROW

public static final int POINTER_STYLE_ARROW
Used to display pointer as an arrow

See Also:
Constant Field Values

POINTER_STYLE_LINE

public static final int POINTER_STYLE_LINE
Used to display pointer as a line

See Also:
Constant Field Values

POINTER_STYLE_TRIANGLE

public static final int POINTER_STYLE_TRIANGLE
Used to display pointer as a triangle

See Also:
Constant Field Values

RANGE_LABEL_INSIDE

public static final int RANGE_LABEL_INSIDE
Range labels display inside the gauge.

See Also:
Constant Field Values

RANGE_LABEL_OUTSIDE

public static final int RANGE_LABEL_OUTSIDE
Range labels display outside the gauge.

See Also:
Constant Field Values
Constructor Detail

GaugeChart

public GaugeChart()
Creates a gauge chart.

Method Detail

addItemListener

public void addItemListener(java.awt.event.ItemListener l)
Adds an item listener to the chart. Any listener registered will be notified when a series is selected or deselected. The event sent will be the ItemEvent event. Use the ItemEvent.getStateChange() to see if the event was a selection or deselection. Use the ItemEvent.getItem()to get the series index selected or deselected.

Parameters:
l - The item listener to add.
See Also:
removeItemListener(java.awt.event.ItemListener)

autoRepaint

public void autoRepaint()
Calls repaint() if the automaticRepaintOn is turned on.


createImage

public java.awt.Image createImage(int width,
                                  int height)
Creates an offscreen image.

Parameters:
width - The width of the image in pixels.
height - The height of the image in pixels.

formatRangeNumber

public java.lang.String formatRangeNumber(int index,
                                          double value)
Formats a floating number to the number of decimals given for the specified range. The formatted number will have the integer part paired in three and three.

Parameters:
index - The range index.
value - The value to format.
Returns:
A string with the formatted number.

getBackground2

public java.awt.Color getBackground2()
Gets the secondary background of the chart component.


getBorderColor

public java.awt.Color getBorderColor(int index)
Gets color of the specified border.

Parameters:
index - The index of the border (0-based).
Returns:
Color of the specified border or default color if no color is set for this border.

getBorderWidth

public int getBorderWidth(int index)
Gets width of the specified border.

Parameters:
index - The index of the border (0-based).
Returns:
Width of the specified border.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

getChartBackground

public java.awt.Color getChartBackground()
Gets the color of the chart background itself.


getChartBackground2

public java.awt.Color getChartBackground2()
Gets the secondary background of the chart grid itself.


getChartForeground

public java.awt.Color getChartForeground()
Gets the color of the chart foreground itself.


getEndAngle

public int getEndAngle()
Gets the end angle of the gauge.

Returns:
The end angle.

getFont

public java.awt.Font getFont(java.lang.String label)
Gets the font for the specified label. If no specific font is specified for this label, it returns the font returned by getFont().

Parameters:
label - The name of the label.
Returns:
The font (never null).

getLabel

public java.lang.String getLabel(java.lang.String name)
Gets the specified label from the chart.

Parameters:
name - The name of the label.
Returns:
The label, or null if not found.
See Also:
setLabel(java.lang.String, java.lang.String)

getLowerRange

public double getLowerRange()
Gets the lower value of the range.


getMinimumSize

public java.awt.Dimension getMinimumSize()
This method returns the minimum size of the chart. The default chart size is 100 by 70 pixels.


getPointer

public double getPointer(int index)
Gets value of the pointer with specified index.

Parameters:
index - The index of the pointer (0-based).
Returns:
Value of the specified pointer.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

getPointerColor

public java.awt.Color getPointerColor(int index)
Gets color of the pointer with specified index.

Parameters:
index - The index of the pointer (0-based).
Returns:
Color value of the specified pointer.

getPointerStyle

public double getPointerStyle(int index)
Gets style of the pointer with specified index.

Parameters:
index - The index of the pointer (0-based).
Returns:
Style value of the specified pointer. (POINTER_TYPE_LINE == 0, POINTER_TYPE_TRIANGLE == 1, POINTER_TYPE_ARROW == 2).
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

getPreferredSize

public java.awt.Dimension getPreferredSize()
This method is called by the awt, and returns the preferred size of the chart. The default size of the chart is 300 by 200 pixels.


getRange

public double getRange()
Gets the upper value of the range.


getRangeColor

public java.awt.Color getRangeColor(int range)
Returns color of the given range.

Parameters:
range - Index of the range.
Returns:
Color of the range.

getRangeDecimalCount

public int getRangeDecimalCount(int index)
Gets the number of decimals used in the range values.

Parameters:
index - The index of the range.

getRangeHighlight

public java.awt.Color getRangeHighlight()
Gets the range highlight color.


getRangeLabelColor

public java.awt.Color getRangeLabelColor(int range)
Returns color of the range labels.

Parameters:
range - Index of the range.
Returns:
Color of the range labels.

getRangeLabelStyle

public int getRangeLabelStyle()
Gets style of the range labels.

Returns:
Style of the range labels (INSIDE = 0 | OUTSIDE =1).

getSectorColor

public java.awt.Color getSectorColor(int index)
Gets color of the sector with specified index.

Parameters:
index - The index of the highlighted sector (0-based).
Returns:
Color of the specified sector or default sector color if no color is set for this sector.

getSectorHighlight

public double[] getSectorHighlight(int index)
Gets the start and the end values of the specified sector.

Parameters:
index - The index of the highlighted sector (0-based).
Returns:
Array of two values where the first is start value and the second is end value.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

getStartAngle

public int getStartAngle()
Gets the start angle of the gauge.

Returns:
The start angle.

getTitle

public java.lang.String getTitle()
Gets the chart title.

See Also:
setTitle(java.lang.String)

getVersion

public static java.lang.String getVersion()
Returns the current version of the charts.


isRangeLabelsOn

public boolean isRangeLabelsOn(int range)
Returns true if the range labels are turned on, false otherwise.

Parameters:
range - Index of the range.
Returns:
True if the range labels are turned on, false otherwise.

isTitleOn

public boolean isTitleOn()
Checks if the title is turned on.

Returns:
True if on, false if off.

paint

public final void paint(java.awt.Graphics g)
This method is overridden to paint the chart using double buffering. This is done to avoid flickering.


processEvent

protected void processEvent(java.awt.AWTEvent event)
Handles the chart events.

Parameters:
event - The event to process.

removeBorder

public void removeBorder(int index)
Removes border with the specified index.

Parameters:
index - The index of the border (0-based).
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

removeExternalGraphics

public void removeExternalGraphics()
Removes external graphics context if there is one.

See Also:
setExternalGraphics(java.awt.Graphics, java.awt.Image)

removeItemListener

public void removeItemListener(java.awt.event.ItemListener l)
Removes the specified item listener from the chart.

Parameters:
l - The item listener to remove.
See Also:
addItemListener(java.awt.event.ItemListener)

removePointer

public void removePointer(int index)
Removes pointer with the specified index.

Parameters:
index - The index of the pointer (0-based).
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

render

public void render(java.awt.Graphics g)
Renders the bar chart according to the current chart attributes and which charts features are turned on or off.


render

public final void render(java.awt.Graphics g,
                         boolean offscreenOn)
Renders the gauge chart according to the current gauge attributes and which charts features are turned on or off.


renderOffScreen

protected void renderOffScreen(java.awt.Graphics g)
A subclass should override this method to paint on top of the chart before it is painted to the AWT component. This is done to avoid flicker of graphics painted by these subclasses.

Parameters:
g - The graphics context used to paint with.

setBackground

public void setBackground(java.awt.Color color)
Sets the chart component background color, outside the gauge.

Parameters:
color - The color to use.

setBackground2

public void setBackground2(java.awt.Color color)
Sets the secondary chart component background color, outside the chart grid. the secondary background can be used in order to display gradient background. Use the setChartBackground() method to set the chart grid color.

Parameters:
color - The color to use.
See Also:
setChartBackground(java.awt.Color)

setBorder

public void setBorder(int index,
                      int width)
Sets a border with the specified width (0-based).

Parameters:
index - The index of the border.
width - The width of the border

setBorderColor

public void setBorderColor(int index,
                           java.awt.Color color)
Sets color for the specified border.

Parameters:
index - The index of the border.
color - The color of the border.

setChartBackground

public void setChartBackground(java.awt.Color color)
Sets the background color of the chart itself. Use setBackground() to set the background color outside the gauge itself.

Parameters:
color - The color to use.

setChartBackground2

public void setChartBackground2(java.awt.Color color)
Sets the secondary background color of the chart itself. The secondary background can be used in order to display gradient chart grid background.

Parameters:
color - The color to use.

setChartForeground

public void setChartForeground(java.awt.Color color)
Sets the foreground color of the chart itself. Use setForeground() to set the color of the title, value labels, and other text.

Parameters:
color - The color to use.

setEndAngle

public void setEndAngle(int angle)
Sets the end angle of the gauge. The 0 angle corresponds to the lowest point of the gauge, 90 to the leftmost, 180 - uppermost, 270 - rightmost.

Parameters:
angle - The end angle.

setExternalGraphics

public void setExternalGraphics(java.awt.Graphics g,
                                java.awt.Image image)
Sets an external graphics context to paint with. The size of the image must at least as large as the largest chart that will be displayed.

Parameters:
g - The graphics context used for painting.
image - The image to which graphics context belongs. See here for an example.

setFont

public void setFont(java.lang.String label,
                    java.awt.Font font)
Sets the font for the specified label. To remove the font and use the default one, pass in the font as null.

Parameters:
label - "titleFont" or "rangeLabelFont".
font - The font to set for the label.

setForeground

public void setForeground(java.awt.Color color)
Sets the color of the labels.

Parameters:
color - The color to use.

setLabel

public void setLabel(java.lang.String name,
                     java.lang.String label)
Sets the specified label in the chart.

Parameters:
name - The name of the label.
label - The label to use, null for no label.

setLowerRange

public void setLowerRange(double value)
Sets the lower value of the range.

Parameters:
value - The range value to set.

setPointer

public void setPointer(int index,
                       double value)
Sets a pointer with the specified index (0-based).

Parameters:
index - The index of the pointer (0-based).
value - The value of the pointer.

setPointerColor

public void setPointerColor(int index,
                            java.awt.Color color)
Sets color for a pointer with the specified index (0-based).

Parameters:
index - The index of the pointer (0-based).
color - The color of the pointer.

setPointerStyle

public void setPointerStyle(int index,
                            int style)
Sets style for the pointer with specified index (0-based).

Parameters:
index - The index of the pointer (0-based).
style - The type of the pointer (POINTER_TYPE_LINE, POINTER_TYPE_TRIANGLE, POINTER_TYPE_ARROW).

setPreferredSize

public void setPreferredSize(int width,
                             int height)
Sets the preferred size of the chart. This is the size used with layout managers that do not stretch the component.

Parameters:
width - The preferred width.
height - The preferred height.

setRange

public void setRange(double value)
Sets the upper value of the range.

Parameters:
value - The range value to set.

setRangeColor

public void setRangeColor(int range,
                          java.awt.Color color)
Sets color of the range. By default the range is painted with chart foreground color.

Parameters:
range - Index of the range.
color - Color of the range.

setRangeDecimalCount

public void setRangeDecimalCount(int index,
                                 int count)
Sets the number of decimals to use in the range label values.

Parameters:
index - The index of the range (0 or 1).
count - The number of decimals to use.

setRangeHighlight

public void setRangeHighlight(java.awt.Color color)
Sets the range highlight color

Parameters:
color - The color highlight the range with

setRangeLabelColor

public void setRangeLabelColor(int range,
                               java.awt.Color color)
Sets color of the range labels. By default the range labels are painted with the same color as the range ticks.

Parameters:
range - Index of the range.
color - Color of the range labels.

setRangeLabelsOn

public void setRangeLabelsOn(int range,
                             boolean on)
Turns labels of the given range on or off.

Parameters:
range - Index of the range.
on - True if the reange labels should be turned on, false otherwise.

setRangeLabelStyle

public void setRangeLabelStyle(int style)
Sets style of the range labels.

Parameters:
style - The style of the range labels (INSIDE | OUTSIDE).

setSectorColor

public void setSectorColor(int index,
                           java.awt.Color color)
Sets color for a specified highlight sector.

Parameters:
index - The index of the sector.
color - The color of the sector.

setSectorHighlight

public void setSectorHighlight(int index,
                               double start,
                               double end)
Sets a highlighted sector with the specified start and end values in the gauge's range.

Parameters:
index - The index of the sector.
start - The start value of the sector.
end - The end value of the sector.

setStartAngle

public void setStartAngle(int angle)
Sets the start angle of the gauge. The 0 angle corresponds to the lowest point of the gauge, 90 to the leftmost, 180 - uppermost, 270 - rightmost.

Parameters:
angle - The start angle.

setTitle

public void setTitle(java.lang.String title)
Sets the chart title. The chart title is displayed at the chart's top.

Parameters:
title - The title to set.
See Also:
getTitle(), setTitleOn(boolean)

setTitleOn

public void setTitleOn(boolean on)
Turns on or off the chart title. The chart title is displayed at the top of the chart.

Parameters:
on - True for on, false for off.
See Also:
setTitle(java.lang.String)

update

public final void update(java.awt.Graphics g)
This method is overridden to avoid flicker when the chart is repainted.