com.objectplanet.chart.ext
Class PlotterChart

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.objectplanet.chart.GenericChart
                  extended by com.objectplanet.chart.ext.PlotterChart
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable

public class PlotterChart
extends GenericChart
implements java.awt.ItemSelectable

Author:
Bjorn J. Kvande., Philipp Kolibaba.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int BELOW
          Labels display below the chart grid.
static int BELOW_AND_FLOATING
          Labels display both below the grid and floating over a sample.
static int BOTTOM
          Bottom range on.
static int CENTER
          Labels display centered with sample.
static int FLOATING
          Floating labels display when mouse is over a sample.
static int HORIZONTAL
          Horizontal direction used for ranges, grid lines.
static int LEFT
          Left range on.
static int OVER
          Labels display over the sample.
static int PLOT_STYLE_CIRCLE
          Use a circle as a shape for the plots.
static int PLOT_STYLE_CIRCLE_FILLED
          Use a filled circle as a shape for the plots.
static int PLOT_STYLE_CIRCLE_OPAQUE
          Use an opaque circle as a shape for the plots.
static int PLOT_STYLE_DIAMOND
          Use a diamond as a shape for the plots.
static int PLOT_STYLE_DIAMOND_FILLED
          Use a filled diamond as a shape for the plots.
static int PLOT_STYLE_DIAMOND_OPAQUE
          Use an opaque diamond as a shape for the plots.
static int PLOT_STYLE_SQUARE
          Use a square as a shape for the plots.
static int PLOT_STYLE_SQUARE_FILLED
          Use a filled square as a shape for the plots.
static int PLOT_STYLE_SQUARE_OPAQUE
          Use an opaque square as a shape for the plots.
static int RIGHT
          Right range on.
static int SIDE
          Labels display to the side from the x-range line inside the chart grid.
static int TARGET_LINE_ID_AND_VALUE_LABEL
          Use both the ID and value label with the target lines; setTargetValueLine().
static int TARGET_LINE_ID_LABEL
          Use the ID label with the target lines; setTargetValueLine().
static int TARGET_LINE_NO_LABEL
          Use no label with the target lines; setTargetValueLine().
static int TARGET_LINE_VALUE_LABEL
          Use the value label with the target lines; setTargetValueLine().
static int TOP
          Top range on.
static int UNDER
          Labels display under the sample.
static int VERTICAL
          Vertical direction used for ranges, grid lines.
 
Fields inherited from class com.objectplanet.chart.GenericChart
chartType, DEFAULT_SAMPLE_COLORS, depth3dPoint, display3dOn, displayVersionOn, dragged_label, grid, gridRenderer, legend, legendRenderer, legendSelection, needChartCalculation, needGraphBounds, needRender, new_cursor, old_cursor, overlayCharts, renderer
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
PlotterChart()
          Creates a plotter chart.
PlotterChart(int seriesCount)
          Creates a plotter chart with give number of series.
 
Method Summary
 void addImage(java.lang.String name, java.awt.Image image)
          Adds an image to the chart.
 void addItemListener(java.awt.event.ItemListener l)
          Adds an item listener to the chart.
 void autoRepaint()
          Calls repaint() if the automaticRepaintOn is turned on.
protected  int checkSelection(java.awt.Point point)
          This method is called when the user releases the mouse and checks if the given point is inside a series.
protected  java.lang.String constructLabel(int series, int sample, int style, boolean paintSeriesOn, java.lang.String percentLabel)
          Constructs the combination of labels.
 java.awt.Image createImage_oldstyle(int width, int height)
          Uses Component.createImage() or Frame.createImage to create an offscreen image.
 java.awt.Image createImage(int width, int height)
          Creates an offscreen image.
 void displayFloatingLabel(int series, int sample)
          Displays the floating labels for the specified series and/or sample.
 java.lang.String formatNumber(double value, int decimals)
          Formats a floating number to the number of decimals given.
 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 getChartBackground()
          Gets the color of the chart background itself.
 java.awt.Color getChartForeground()
          Gets the color of the chart foreground itself.
 java.awt.Insets getGraphInsets()
          Gets the graph insets.
 java.lang.String getGridImage()
          Gets the image that is used as background for the grid.
 double getGridLine(int index)
          Gets grid lines positon value by its index.
 java.awt.Color getGridLineColor(int index)
          Gets grid line's color value by it's index.
 java.awt.Color[] getGridLineColors()
          Gets the vertical grid lines colors.
 double[] getGridLines()
          Gets the vertical grid lines positons.
protected  double getHighestValue(int rangeIndex)
          Gets the highest value in the chart larger than 0.
 java.awt.Image getImage(int width, int height)
          Returns the current chart as an image.
 java.awt.Image getImage(java.lang.String name)
          Gets the image with the specified name.
 java.lang.String getLabel(java.lang.String name)
          Gets the specified label from the chart.
 int getLabelAngle(java.lang.String name)
          Gets the angle of the specified label.
 java.awt.Color getLegendColor(int index)
          Gets legend entry's color value by it's index.
 java.lang.String[] getLegendLabels()
          Gets the legend labels.
 int getLineWidth(int series)
          Gets the current width of the line for the gived series.
 java.util.Locale getLocale()
          Gets the current locale used for numbers.
protected  double getLowestValue(int rangeIndex)
          Gets the lowest value in the chart.
 java.awt.Dimension getMinimumSize()
          This method returns the minimum size of the chart.
 java.lang.String getPlotImage(int series)
          Gets a sample highlight image name.
 java.lang.String getPlotLabel(int series, int index)
          Gets the plot label for the specified series and index.
 java.lang.String[] getPlotLabels(int series)
          Gets the plot labels for the specified series.
 int getPlotLabelStyle()
          Gets the current style of the plot labels.
 double[][] getPlots(int series)
          Gets the x|y plots array for the specified series.
 int getPlotSize(int series)
          Gets the plot size for the specified series.
 int getPlotSize(int series, int index)
          Gets the plot size for the specified series.
 int getPlotStyle(int series)
          Gets the plot style.
 java.awt.Dimension getPreferredSize()
          This method is called by the awt, and returns the preferred size of the chart.
 java.awt.Color getRangeColor(int side)
          Gets the color of the specified range.
 java.text.NumberFormat getRangeFormatter(int index)
          Get the number formatter of this range.
 int getSampleCount()
          Gets number of plots in the bigges series.
 int getSampleCount(int series)
          Gets the number of plots for the specified series.
 java.awt.Point getSamplePoint(int serie, int sample)
          Gets the coordinates of the specified sample.
 java.lang.Object[] getSelectedObjects()
          Gets the currently selected objects.
 int getSelectedSample()
          Gets the currently selected sample.
 int getSelectedSeries()
          Gets the currently selected series.
 java.awt.Color getSeriesColor(int series)
          Gets the color of the specified plot series.
 java.awt.Color[] getSeriesColors()
          Gets the array of colors used for the plots.
 int getSeriesCount()
          Gets the number of series.
 java.lang.String getSeriesLabel(int series)
          Gets the specified series label.
 java.awt.Color getSeriesLabelColor(int series)
          Gets the color of the label of the specified series.
 java.lang.String[] getSeriesLabels()
          Gets the series labels.
 int getSeriesLabelStyle()
          Gets the current style of the series labels.
static java.lang.String[] getStringValues(java.lang.String string, java.lang.String delimiter)
          Conterts a separated string to an array of string.
 int getTargetLabelsPosition()
          Gets the target labels position
 java.lang.String getThousandsDelimeter()
          Gets the current thousands delimiter used for formatted numbers.
 java.lang.String getTitle()
          Gets the chart title.
 int getValueLabelStyle()
          Gets the value label style.
static java.lang.String getVersion()
          Returns the current version of the charts.
 java.awt.Color getXAxisColor()
          Gets the color for the X axis
 double getXCurrentLowerRange()
          Gets the X-axis current lower range.
 double getXCurrentUpperRange()
          Gets the X-axis current upper range.
 double getXLowerRange()
          Gets the X-axis lower range.
 int getXMaxValueLineCount()
          Gets the current maxium number of the X value lines set.
 int getXRangeDecimalCount()
          Gets the number of decimals currently used in the X axis range labels.
 double getXRangeInterval()
          Gets the interval between the ticks on the X range.
 java.lang.String getXRangeLabel(double x)
          Gets an x-range label on the given position.
 java.awt.Color getXRangeLabelColor(double x)
          Gets color that is used to paint the corresponding x-range label.
 java.awt.Color[] getXRangeLabelColors()
          Gets the colors of x-range labels.
 boolean getXRangeLabelLineOn(double x)
          Checks if a grid line is displayed for the corresponding x-range label.
 boolean[] getXRangeLabelLinesOn()
          Gets an array of boolean values telling if the grid lines should be displayed for the corresponding x-range labels.
 java.lang.String[] getXRangeLabels()
          Gets the x-range labels.
 java.awt.Color getXRangeLabelsColor()
          Gets color that is used to paint the x-range labels.
 double[] getXRangeLabelsPos()
          Gets the positions of x-range labels
 int getXRangeLabelStyle()
          Gets the current style of the x-range labels.
 double getXUpperRange()
          Gets the X-axis upper range.
 int getXValueDecimalCount(int series)
          Gets the number of decimals used for the x values.
 java.awt.Color getXValueLinesColor()
          Gets the color of the x value lines.
 java.awt.Color getYAxisColor()
          Gets the color for the Y axis
 double getYCurrentLowerRange()
          Gets the Y-axis lower range.
 double getYCurrentUpperRange()
          Gets the Y-axis current upper range.
 double getYLowerRange()
          Gets the Y-axis lower range.
 int getYMaxValueLineCount()
          Gets the current maxium number of the Y value lines set.
 int getYRangeDecimalCount()
          Gets the number of decimals currently used in the Y axis range labels.
 double getYRangeInterval()
          Gets the interval between the ticks on the Y range.
 double getYUpperRange()
          Gets the Y-axis upper range.
 int getYValueDecimalCount(int series)
          Gets the number of decimals used for the y values.
 java.awt.Color getYValueLinesColor()
          Gets the color of the y value lines.
 boolean isAutoLabelSpacingOn()
          Gets the state of the automatic label spacing.
 boolean isAutomaticRepaintOn()
          Checks if the automatic repaint is on.
 boolean isConnectedLinesOn(int series)
          Checks if the lines beween plots are turned on.
 boolean isFloatingOnLegendOn()
          Checks if floating labels are displayed when the mouse moves over the actualLegend.
 boolean isGridAdjustmentOn(int edge)
          Checks if runtime grid adjustment is on.
 boolean isPlotLabelsOn()
          Checks if the plot labels are turned on.
 boolean isPlotSortingOn(int series)
          Checks if the plots were sorted when they were loaded.
 boolean isRangeAdjusterOn(int adjuster)
          Checks if the specified range adjuster is turned on.
 boolean isRangeOn(int side)
          Checks if the specified range is on.
 boolean isSampleLabelsOn()
          Checks if the plot labels are turned on.
 boolean isSelected(int series)
          Checks if a series is selected.
 boolean isSeriesEmpty(int index)
          Checks if the series contains any data.
 boolean isSeriesLabelsOn()
          Checks if the floating series labels is turned on.
 boolean isSeriesOn(int series)
          Checks if the series is on.
 boolean isTitleOn()
          Checks if the title is turned on.
 boolean isXAxisOn()
          Checks if the X axis is turned on.
 boolean isXValueLabelsOn()
          Checks if the x value labels are turned on for any series.
 boolean isXValueLabelsOn(int series)
          Checks if the x value labels are turned on for a specified series.
 boolean isXValueLinesOn()
          Checks if the x value lines are on.
 boolean isYAxisOn()
          Checks if the Y axis is turned on.
 boolean isYValueLabelsOn()
          Checks if the y value labels are turned on for any series.
 boolean isYValueLabelsOn(int series)
          Checks if the y value labels are turned on for a specified series.
 boolean isYValueLinesOn()
          Checks if the y value lines are on.
 boolean isZoomOn()
          Checks if zoom is turned on.
 java.awt.Image loadImage(java.lang.String name)
          Loads an image from the disk.
protected  void processEvent(java.awt.AWTEvent event)
          Handles the chart events.
 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 reset()
          Resets the chart data and features.
 void setAutoLabelSpacingOn(boolean on)
          Turns on or off automatic bar label spacing.
 void setAutomaticRepaintOn(boolean state)
          Turns on or off the automatic repaint.
 void setBackground(java.awt.Color color)
          Sets the chart component background color, outside the chart grid.
 void setChartBackground(java.awt.Color color)
          Sets the background color of the chart itself.
 void setChartForeground(java.awt.Color color)
          Sets the foreground color of the chart itself.
 void setConnectedLinesOn(int series, boolean on)
          Turns on or off lines between plots for the specified sereis.
 void setExternalGraphics(java.awt.Graphics g, java.awt.Image image)
          Sets an external graphics context to paint with.
 void setFloatingOnLegendOn(boolean on)
          Turn on or off floating labels when the mouse moves over the actualLegend.
 void setForeground(java.awt.Color color)
          Sets the color of the labels.
 void setGraphInsets(int top, int left, int bottom, int right)
          Sets the insets between the graph itself and the chart component edges.
 void setGridAdjustmentOn(int edge, boolean on)
          Turns on or of runtime grid adjustment.
 void setGridImage(java.lang.String name)
          Sets an image to be used as background for the chart grid.
 void setGridLine(int index, double value)
          Sets a single grid line value.
 void setGridLineColor(int index, java.awt.Color color)
          Sets a single grid line color.
 void setGridLineColors(java.awt.Color[] colors)
          Sets the color of each vertical grid line.
 void setGridLines(double[] grid)
          Sets the vertical grid lines positons.
 void setGridLinesColor(java.awt.Color color)
          Sets the vertical grid lines color.
 void setLabel(java.lang.String name, java.lang.String label)
          Sets the specified label in the chart.
 void setLabelAngle(java.lang.String name, int angle)
          Sets the angle of the specified label.
 void setLineWidth(int series, int width)
          Sets the width of the line for the specified series.
 void setLocale(java.util.Locale locale)
          Sets the locale used to format numbers.
 void setPlot(int series, double x, double y)
          Sets an individual plot for the specified series with given x|y.
 void setPlot(int series, double x, double y, int size)
          Sets an individual plot for the specified series with given x|y.
 void setPlotImage(int series, java.lang.String name)
          Sets an image to be used as a highlight for a specified series.
 void setPlotLabels(int series, java.lang.String[] labels)
          Sets the plots labels for each plot in serie.
 void setPlotLabelsOn(boolean on)
          Turns on the plot labels.
 void setPlotLabelStyle(int style)
          Sets the style of the plot labels.
 void setPlots(int series, double[][] plots)
          Sets the x|y plots for the specified series.
 void setPlots(int series, double[][] plots, int size)
          Sets the x|y plots for the specified series.
 void setPlots(int series, double[][] plots, int[] size)
          Sets the x|y plots for the specified series.
 void setPlotSize(int series, int size)
          Sets the plot size for the specified series.
 void setPlotSize(int series, int[] size)
          Sets the plots size for each plot in serie.
 void setPlotSortingOn(int series, boolean on)
          This method should be called before setting the plots in order to turn on/off the plots sorting.
 void setPlotStyle(int style)
          Sets the plot style for all the data series.
 void setPlotStyle(int series, int style)
          Sets the plot style for the specified data series.
 void setPreferredSize(int width, int height)
          Sets the preferred size of the chart.
 void setRangeAdjusterOn(int adjuster, boolean on)
          Turns on or off the range adjuster.
 void setRangeColor(int side, java.awt.Color color)
          Sets the color of the specified range.
 void setRangeFormatter(int index, java.text.NumberFormat formatter)
          Sets a number formatter for the specific range.
 void setRangeOn(int side, boolean on)
          Turns on or off the specified range.
 void setSelection(int series, int sample, boolean selected)
          Marks a series as selected or deselected.
 void setSelection(int series, int sample, boolean selected, boolean notify)
          Marks a series as selected or deselected.
 void setSelection(int series, int sample, boolean selected, boolean clear, boolean notify)
          Marks a series as selected or deselected.
 void setSeriesColor(int series, java.awt.Color color)
          Sets the color of the specified plot series.
 void setSeriesColors(java.awt.Color[] colors)
          Sets colors for the plot series.
 void setSeriesCount(int count)
          Sets the number of series.
 void setSeriesLabel(int series, java.lang.String label)
          Sets the specified series label.
 void setSeriesLabelColor(int series, java.awt.Color color)
          Sets the color of of the label for the specified series.
 void setSeriesLabels(java.lang.String[] labels)
          Sets the series labels.
 void setSeriesLabelsOn(boolean on)
          Turns on the floating series labels.
 void setSeriesLabelStyle(int style)
          Sets the style of the series labels.
 void setSeriesOn(boolean on)
          Turns the plot series on and off.
 void setSeriesOn(int series, boolean on)
          Turns the plot series on and off.
 void setTargetLabelsPosition(int position)
          Sets the target labels position.
 void setTargetValueLine(java.lang.String id, double value, java.awt.Color color, int style)
          Sets a target value line with the specified ID, value, and color.
 void setThousandsDelimiter(java.lang.String delimiter)
          Sets the delimiter for use in the display of numbers.
 void setTitle(java.lang.String title)
          Sets the chart title.
 void setTitleOn(boolean on)
          Turns on or off the chart title.
 void setValueLabelStyle(int style)
          Sets the style of the value labels.
 void setXAxisColor(java.awt.Color color)
          Sets the color for the X axis
 void setXAxisOn(boolean on)
          Turns on or off the X axis.
 void setXCurrentLowerRange(double range)
          Sets the X-axis current lower range.
 void setXCurrentUpperRange(double range)
          Sets the X-axis current upper range.
 void setXLowerRange(double range)
          Sets the X-axis lower range.
 void setXMaxValueLineCount(int count)
          Sets the maximum number of X value lines there should be in the chart.
 void setXRangeDecimalCount(int count)
          Sets the number of decimals for the X axis range labels.
 void setXRangeInterval(double interval)
          Sets interval between the ticks on the X range.
 void setXRangeLabel(double x, java.lang.String label)
          Sets a single custom label on the X range axis.
 void setXRangeLabelColor(double x, java.awt.Color color)
          Sets color for the label with specified position.
 void setXRangeLabelColors(double[] x, java.awt.Color[] colors)
          Sets colors for the x-range labels.
 void setXRangeLabelLineOn(double x, boolean lineOn)
          Sets a boolean value which tells if a grid line should be displayed for the labels with given position.
 void setXRangeLabelLinesOn(double[] x, boolean[] linesOn)
          Sets boolean values telling if the grid lines should be displayed for the corresponding x-range labels.
 void setXRangeLabels(double[] x, java.lang.String[] labels)
          Sets the custom labels for the X range axis.
 void setXRangeLabelsColor(java.awt.Color c)
          Sets color for all x-range labels.
 void setXRangeLabelStyle(int style)
          Sets the style of the x-range labels.
 void setXUpperRange(double range)
          Sets the X-axis upper range.
 void setXValueDecimalCount(int series, int count)
          Sets the number of decimals in the x values.
 void setXValueLabelsOn(boolean on)
          Turns on or off the x value labels.
 void setXValueLabelsOn(int series, boolean on)
          Turns on or off the x value labels for the specified series.
 void setXValueLinesColor(java.awt.Color color)
          Sets the color of the x value lines.
 void setXValueLinesOn(boolean on)
          Turns on or off or x value lines.
 void setYAxisColor(java.awt.Color color)
          Sets the color for the Y axis
 void setYAxisOn(boolean on)
          Turns on or off Y axis.
 void setYCurrentLowerRange(double range)
          Sets the Y-axis current lower range.
 void setYCurrentUpperRange(double range)
          Sets the Y-axis current upper range.
 void setYLowerRange(double range)
          Sets the Y-axis lower range.
 void setYMaxValueLineCount(int count)
          Sets the maximum number of Y value lines there should be in the chart.
 void setYRangeDecimalCount(int count)
          Sets the number of decimals for the Y axis range labels.
 void setYRangeInterval(double interval)
          Sets interval between the ticks on the Y range.
 void setYUpperRange(double range)
          Sets the Y-axis upper range.
 void setYValueDecimalCount(int series, int count)
          Sets the number of decimals in the y values.
 void setYValueLabelsOn(boolean on)
          Turns on or off the y value labels.
 void setYValueLabelsOn(int series, boolean on)
          Turns on or off the y value labels for the specified series.
 void setYValueLinesColor(java.awt.Color color)
          Sets the color of the y value lines.
 void setYValueLinesOn(boolean on)
          Turns on or off or y value lines.
 void setZoomOn(boolean on)
          Turns zoom on or off.
 java.lang.String toString()
          Returns the title of the chart.
 
Methods inherited from class com.objectplanet.chart.GenericChart
addOverlayChart, checkDataIntegrity, clearAngledLabelCache, forceRepaint, getAlternateChartBackground, getBackground2, getChartBackground2, getFont, getGraphBounds, getGridImage, getLabelAtPoint, getLabelBounds, getLabelColor, getLabelPosition, getLegendColors, getLegendColumns, getLegendImage, getLegendPosition, getOverlayChart, getOverlayInsets, getSize, getTotalGraphBounds, handleCustomLabels, hasDataChangedSince, is3DModeOn, isAntialiasingOn, isGridOutline3DOn, isLegendOn, isLegendReverseOn, isMultiSeriesOn, isOverlayChartOn, isPrintAsBitmap, isSampleHighlightOn, isServletModeOn, paint, print, removeOverlayChart, render, render, renderOffScreen, set3DModeOn, setAlternateChartBackground, setAntialiasingOn, setBackground2, setChartBackground2, setFont, setGridOutline3DOn, setLabel, setLabel, setLabel, setLabel, setLabelAngleCacheSize, setLabelColor, setLabelPosition, setLabelPosition, setLabelURL, setLegendColor, setLegendColors, setLegendColumns, setLegendImage, setLegendLabels, setLegendOn, setLegendPosition, setLegendReverseOn, setMultiSeriesOn, setNeedChartCalculation, setOverlayChart, setOverlayChartOn, setOverlayInsets, setPrintAsBitmap, setServletModeOn, update
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BELOW

public static final int BELOW
Labels display below the chart grid.

See Also:
Constant Field Values

BELOW_AND_FLOATING

public static final int BELOW_AND_FLOATING
Labels display both below the grid and floating over a sample.

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Bottom range on.

See Also:
Constant Field Values

CENTER

public static final int CENTER
Labels display centered with sample.

See Also:
Constant Field Values

FLOATING

public static final int FLOATING
Floating labels display when mouse is over a sample.

See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
Horizontal direction used for ranges, grid lines.

See Also:
Constant Field Values

LEFT

public static final int LEFT
Left range on.

See Also:
Constant Field Values

OVER

public static final int OVER
Labels display over the sample.

See Also:
Constant Field Values

PLOT_STYLE_CIRCLE

public static final int PLOT_STYLE_CIRCLE
Use a circle as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_CIRCLE_FILLED

public static final int PLOT_STYLE_CIRCLE_FILLED
Use a filled circle as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_CIRCLE_OPAQUE

public static final int PLOT_STYLE_CIRCLE_OPAQUE
Use an opaque circle as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_DIAMOND

public static final int PLOT_STYLE_DIAMOND
Use a diamond as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_DIAMOND_FILLED

public static final int PLOT_STYLE_DIAMOND_FILLED
Use a filled diamond as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_DIAMOND_OPAQUE

public static final int PLOT_STYLE_DIAMOND_OPAQUE
Use an opaque diamond as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_SQUARE

public static final int PLOT_STYLE_SQUARE
Use a square as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_SQUARE_FILLED

public static final int PLOT_STYLE_SQUARE_FILLED
Use a filled square as a shape for the plots.

See Also:
Constant Field Values

PLOT_STYLE_SQUARE_OPAQUE

public static final int PLOT_STYLE_SQUARE_OPAQUE
Use an opaque square as a shape for the plots.

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Right range on.

See Also:
Constant Field Values

SIDE

public static final int SIDE
Labels display to the side from the x-range line inside the chart grid.

See Also:
Constant Field Values

TARGET_LINE_ID_AND_VALUE_LABEL

public static final int TARGET_LINE_ID_AND_VALUE_LABEL
Use both the ID and value label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TARGET_LINE_ID_LABEL

public static final int TARGET_LINE_ID_LABEL
Use the ID label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TARGET_LINE_NO_LABEL

public static final int TARGET_LINE_NO_LABEL
Use no label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TARGET_LINE_VALUE_LABEL

public static final int TARGET_LINE_VALUE_LABEL
Use the value label with the target lines; setTargetValueLine().

See Also:
Constant Field Values

TOP

public static final int TOP
Top range on.

See Also:
Constant Field Values

UNDER

public static final int UNDER
Labels display under the sample.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Vertical direction used for ranges, grid lines.

See Also:
Constant Field Values
Constructor Detail

PlotterChart

public PlotterChart()
Creates a plotter chart.


PlotterChart

public PlotterChart(int seriesCount)
Creates a plotter chart with give number of series.

Parameters:
seriesCount - The number of series for the chart.
Method Detail

addImage

public void addImage(java.lang.String name,
                     java.awt.Image image)
Adds an image to the chart.

Overrides:
addImage in class GenericChart
Parameters:
name - The unique name of the image
image - The image to add, use null to remove the image.

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.

Specified by:
addItemListener in interface java.awt.ItemSelectable
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.

Overrides:
autoRepaint in class GenericChart

checkSelection

protected int checkSelection(java.awt.Point point)
This method is called when the user releases the mouse and checks if the given point is inside a series. The default behaviour is to check for selection on the legend if the legend is turned on. If any subclass wants to add selection behaviour, override this and call super.checkSelection().

Parameters:
point - The point to check for.
Returns:
The series selected, or -1 if none was selected.

constructLabel

protected java.lang.String constructLabel(int series,
                                          int sample,
                                          int style,
                                          boolean paintSeriesOn,
                                          java.lang.String percentLabel)
Constructs the combination of labels.

Specified by:
constructLabel in class GenericChart
Parameters:
series - The series index.
sample - The sample index.
style - The style of the label: INSIDE, OUTSIDE, FLOATING or POINTING.
paintSeriesOn - True if the series label should be on.
percentLabel - A percent label for pie chart.
Returns:
The constructed label.

createImage_oldstyle

public java.awt.Image createImage_oldstyle(int width,
                                           int height)
Uses Component.createImage() or Frame.createImage to create an offscreen image.

Overrides:
createImage_oldstyle in class GenericChart
Parameters:
width - The width of the image in pixels.
height - The height of the image in pixels.

createImage

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

Overrides:
createImage in class GenericChart
Parameters:
width - The width of the image in pixels.
height - The height of the image in pixels.

displayFloatingLabel

public void displayFloatingLabel(int series,
                                 int sample)
Displays the floating labels for the specified series and/or sample.

Parameters:
series - The series index, -1 for no floating labels.
sample - The sample index, -1 for all the samples in a series.

formatNumber

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

Overrides:
formatNumber in class GenericChart
Parameters:
value - The value to format.
decimals - The number of decimals to use.
Returns:
A string with the formatted number.

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.

getChartBackground

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

Overrides:
getChartBackground in class GenericChart

getChartForeground

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

Overrides:
getChartForeground in class GenericChart

getGraphInsets

public java.awt.Insets getGraphInsets()
Gets the graph insets.

Overrides:
getGraphInsets in class GenericChart
See Also:
setGraphInsets(int, int, int, int)

getGridImage

public java.lang.String getGridImage()
Gets the image that is used as background for the grid.

Returns:
The name of the image, or null if there is no grid image.

getGridLine

public double getGridLine(int index)
Gets grid lines positon value by its index.

Parameters:
index - The index of the line to get value from.
Returns:
A grid line position value.

getGridLineColor

public java.awt.Color getGridLineColor(int index)
Gets grid line's color value by it's index.

Parameters:
index - The index of the line to get color from.
Returns:
Grid line color of the given line.

getGridLineColors

public java.awt.Color[] getGridLineColors()
Gets the vertical grid lines colors.

Returns:
The array with grid lines colors.

getGridLines

public double[] getGridLines()
Gets the vertical grid lines positons.

Returns:
The array with grid lines position values, or null if not set.

getHighestValue

protected double getHighestValue(int rangeIndex)
Gets the highest value in the chart larger than 0. It also takes into account any overlay charts with grids (bar and line).

Specified by:
getHighestValue in class GenericChart
Parameters:
rangeIndex - The index of the range (0 or 1).
Returns:
The highest value or 0 if none are larger than 0.

getImage

public java.awt.Image getImage(int width,
                               int height)
Returns the current chart as an image.

Overrides:
getImage in class GenericChart
Parameters:
width - The width of the chart in pixels.
height - The height of the chart in pixels.
Returns:
The chart as an image object.

getImage

public java.awt.Image getImage(java.lang.String name)
Gets the image with the specified name.

Overrides:
getImage in class GenericChart
Parameters:
name - The name of the image.
Returns:
The image, or null if no image was found.

getLabel

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

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

getLabelAngle

public int getLabelAngle(java.lang.String name)
Gets the angle of the specified label.

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

getLegendColor

public java.awt.Color getLegendColor(int index)
Gets legend entry's color value by it's index.

Overrides:
getLegendColor in class GenericChart
Parameters:
index - The index of the legend entry to get color from.
Returns:
Color of the given legend entry.

getLegendLabels

public java.lang.String[] getLegendLabels()
Gets the legend labels. The array returned is the original, so don't change anything in it if you don't know what you are doing.

Overrides:
getLegendLabels in class GenericChart
Returns:
An array containing the labels.
See Also:
GenericChart.setLegendLabels(java.lang.String[])

getLineWidth

public int getLineWidth(int series)
Gets the current width of the line for the gived series.

Parameters:
series - The index of the data series.
Returns:
The width in pixels.

getLocale

public java.util.Locale getLocale()
Gets the current locale used for numbers.

Overrides:
getLocale in class GenericChart

getLowestValue

protected double getLowestValue(int rangeIndex)
Gets the lowest value in the chart. Used when setting the relative range. It also takes into account any overlay charts with grids (bar and line).

Specified by:
getLowestValue in class GenericChart
Parameters:
rangeIndex - The index of the range (0 or 1)

getMinimumSize

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

Overrides:
getMinimumSize in class GenericChart

getPlotImage

public java.lang.String getPlotImage(int series)
Gets a sample highlight image name. If series isare -1, the method returns image used for all samples in the chart.

Parameters:
series - The series of the highlight image.
Returns:
The name of the image, or null if the default actualLegend box is used.

getPlotLabel

public java.lang.String getPlotLabel(int series,
                                     int index)
Gets the plot label for the specified series and index.

Parameters:
series - The index of the series (0-based).
index - The index of the plot insi de the series(0-based).
Returns:
The plot label

getPlotLabels

public java.lang.String[] getPlotLabels(int series)
Gets the plot labels for the specified series.

Parameters:
series - The index of the series (0-based).
Returns:
Array of the plot labels.

getPlotLabelStyle

public int getPlotLabelStyle()
Gets the current style of the plot labels.

Returns:
The style of the plot labels: BELOW, FLOATING, BELOW_AND_FLOATING.

getPlots

public double[][] getPlots(int series)
Gets the x|y plots array for the specified series.

Parameters:
series - The index of the series (0-based).
Returns:
The two-dimensional array of plot coordinates [index][x|y].

getPlotSize

public int getPlotSize(int series)
Gets the plot size for the specified series.

Parameters:
series - The index of the series (0-based).
Returns:
size The size of the plots.

getPlotSize

public int getPlotSize(int series,
                       int index)
Gets the plot size for the specified series.

Parameters:
series - The index of the series (0-based).
index - The index of the plot inside the series (0-based).
Returns:
size The size of the plots.

getPlotStyle

public int getPlotStyle(int series)
Gets the plot style.

Parameters:
series - The series to get the style for.
Returns:
PLOT_STYLE_CIRCLE, PLOT_STYLE_CIRCLE_OPAQUE, PLOT_STYLE_CIRCLE_FILLED, PLOT_STYLE_SQUARE, PLOT_STYLE_SQUARE_OPAQUE, PLOT_STYLE_SQUARE_FILLED, PLOT_STYLE_DIAMOND, PLOT_STYLE_DIAMOND_OPAQUE, PLOT_STYLE_DIAMOND_FILLED.
Throws:
java.lang.IllegalArgumentException - if the series 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.

Overrides:
getPreferredSize in class GenericChart

getRangeColor

public java.awt.Color getRangeColor(int side)
Gets the color of the specified range.

Parameters:
side - The side of the range (LEFT, RIGHT, TOP, BOTTOM).

getRangeFormatter

public java.text.NumberFormat getRangeFormatter(int index)
Get the number formatter of this range.

Parameters:
index - The index of the range.
Returns:
The number formatter.

getSampleCount

public int getSampleCount()
Gets number of plots in the bigges series.

Specified by:
getSampleCount in class GenericChart
Returns:
number of plots in the bigges series.

getSampleCount

public int getSampleCount(int series)
Gets the number of plots for the specified series.

Parameters:
series - The series index.
Returns:
Number of plots in the series.

getSamplePoint

public java.awt.Point getSamplePoint(int serie,
                                     int sample)
Gets the coordinates of the specified sample.

Parameters:
serie - The series index
sample - The sample index.
Returns:
The coordinates of the specified sample, or null if the sample was not found.

getSelectedObjects

public java.lang.Object[] getSelectedObjects()
Gets the currently selected objects.

Specified by:
getSelectedObjects in interface java.awt.ItemSelectable
Returns:
The objects as an array, or null if none are selected.

getSelectedSample

public int getSelectedSample()
Gets the currently selected sample.

Returns:
The sample index currently selected.

getSelectedSeries

public int getSelectedSeries()
Gets the currently selected series.

Returns:
The series index currently selected.

getSeriesColor

public java.awt.Color getSeriesColor(int series)
Gets the color of the specified plot series. This is the color of the series itself, not the color of the label.

Parameters:
series - The series to set color for.

getSeriesColors

public java.awt.Color[] getSeriesColors()
Gets the array of colors used for the plots. This can also be used to find out the number of plot colors by taking the length of the array.

Returns:
An array containing the plot colors.

getSeriesCount

public int getSeriesCount()
Gets the number of series.

Specified by:
getSeriesCount in class GenericChart

getSeriesLabel

public java.lang.String getSeriesLabel(int series)
Gets the specified series label.

Parameters:
series - The index of the series (0-based).
Returns:
The series label, or null if no label was found.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

getSeriesLabelColor

public java.awt.Color getSeriesLabelColor(int series)
Gets the color of the label of the specified series.

Parameters:
series - The index of the series (0-based).
Returns:
The color, or null if no color is set.
Throws:
java.lang.IllegalArgumentException - if the series index is invalid.

getSeriesLabels

public java.lang.String[] getSeriesLabels()
Gets the series labels.

Returns:
The labels as an array of strings, or null if no labels are found.

getSeriesLabelStyle

public int getSeriesLabelStyle()
Gets the current style of the series labels.


getStringValues

public static java.lang.String[] getStringValues(java.lang.String string,
                                                 java.lang.String delimiter)
Conterts a separated string to an array of string. This method is used for multiline labels and by the applet to read applet parameters.

Parameters:
string - The delimited string.
delimiter - The delimiter.
Returns:
The lines as an array of strings, or null if no label.

getTargetLabelsPosition

public int getTargetLabelsPosition()
Gets the target labels position

Returns:
0 for left, 1 for right.

getThousandsDelimeter

public java.lang.String getThousandsDelimeter()
Gets the current thousands delimiter used for formatted numbers.

Overrides:
getThousandsDelimeter in class GenericChart
Returns:
The current delimiter, or null if the Locale is used.

getTitle

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

Overrides:
getTitle in class GenericChart
See Also:
setTitle(java.lang.String)

getValueLabelStyle

public int getValueLabelStyle()
Gets the value label style.

See Also:
setValueLabelStyle(int)

getVersion

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


getXAxisColor

public java.awt.Color getXAxisColor()
Gets the color for the X axis

Returns:
The color of the axis

getXCurrentLowerRange

public double getXCurrentLowerRange()
Gets the X-axis current lower range.


getXCurrentUpperRange

public double getXCurrentUpperRange()
Gets the X-axis current upper range.


getXLowerRange

public double getXLowerRange()
Gets the X-axis lower range.


getXMaxValueLineCount

public int getXMaxValueLineCount()
Gets the current maxium number of the X value lines set.

Returns:
The count, or -1.
See Also:
setXMaxValueLineCount(int)

getXRangeDecimalCount

public int getXRangeDecimalCount()
Gets the number of decimals currently used in the X axis range labels.


getXRangeInterval

public double getXRangeInterval()
Gets the interval between the ticks on the X range.

Returns:
Interval between the X range ticks.

getXRangeLabel

public java.lang.String getXRangeLabel(double x)
Gets an x-range label on the given position.

Parameters:
x - The X position of the label.
Returns:
X-range label on the given position.

getXRangeLabelColor

public java.awt.Color getXRangeLabelColor(double x)
Gets color that is used to paint the corresponding x-range label.

Parameters:
x - The X position of the label.
Returns:
Color that is used to paint the x-range with given position.

getXRangeLabelColors

public java.awt.Color[] getXRangeLabelColors()
Gets the colors of x-range labels.

Returns:
Array of x-range labels color values.

getXRangeLabelLineOn

public boolean getXRangeLabelLineOn(double x)
Checks if a grid line is displayed for the corresponding x-range label.

Parameters:
x - The X position of the label.
Returns:
True if the line is on, false if off.

getXRangeLabelLinesOn

public boolean[] getXRangeLabelLinesOn()
Gets an array of boolean values telling if the grid lines should be displayed for the corresponding x-range labels.

Returns:
Array of grid lines on/off values for each x-range label.

getXRangeLabels

public java.lang.String[] getXRangeLabels()
Gets the x-range labels.

Returns:
Array of the x-range labels.

getXRangeLabelsColor

public java.awt.Color getXRangeLabelsColor()
Gets color that is used to paint the x-range labels.

Returns:
Color that is used to paint the x-range labels.

getXRangeLabelsPos

public double[] getXRangeLabelsPos()
Gets the positions of x-range labels

Returns:
Array of x-coordinates of the labels.

getXRangeLabelStyle

public int getXRangeLabelStyle()
Gets the current style of the x-range labels.

Returns:
The style of the x-range labels: SIDE, BELOW, FLOATING, BELOW_AND_FLOATING.

getXUpperRange

public double getXUpperRange()
Gets the X-axis upper range.


getXValueDecimalCount

public int getXValueDecimalCount(int series)
Gets the number of decimals used for the x values.

Parameters:
series - The index of the series.

getXValueLinesColor

public java.awt.Color getXValueLinesColor()
Gets the color of the x value lines.

Returns:
Color of the x value lines

getYAxisColor

public java.awt.Color getYAxisColor()
Gets the color for the Y axis

Returns:
The color of the axis

getYCurrentLowerRange

public double getYCurrentLowerRange()
Gets the Y-axis lower range.


getYCurrentUpperRange

public double getYCurrentUpperRange()
Gets the Y-axis current upper range.


getYLowerRange

public double getYLowerRange()
Gets the Y-axis lower range.


getYMaxValueLineCount

public int getYMaxValueLineCount()
Gets the current maxium number of the Y value lines set.

Returns:
The count, or -1.
See Also:
setYMaxValueLineCount(int)

getYRangeDecimalCount

public int getYRangeDecimalCount()
Gets the number of decimals currently used in the Y axis range labels.


getYRangeInterval

public double getYRangeInterval()
Gets the interval between the ticks on the Y range.

Returns:
Interval between the Y range ticks.

getYUpperRange

public double getYUpperRange()
Gets the Y-axis upper range.


getYValueDecimalCount

public int getYValueDecimalCount(int series)
Gets the number of decimals used for the y values.

Parameters:
series - The index of the series.

getYValueLinesColor

public java.awt.Color getYValueLinesColor()
Gets the color of the y value lines.

Returns:
Color of the y value lines

isAutoLabelSpacingOn

public boolean isAutoLabelSpacingOn()
Gets the state of the automatic label spacing.

Returns:
True for on, false for off.
See Also:
setAutoLabelSpacingOn(boolean)

isAutomaticRepaintOn

public boolean isAutomaticRepaintOn()
Checks if the automatic repaint is on.

Overrides:
isAutomaticRepaintOn in class GenericChart
Returns:
True for on, false for off.
See Also:
setAutomaticRepaintOn(boolean)

isConnectedLinesOn

public boolean isConnectedLinesOn(int series)
Checks if the lines beween plots are turned on.

Parameters:
series - The index of the series (0-based).
Returns:
True for on, false for off.

isFloatingOnLegendOn

public boolean isFloatingOnLegendOn()
Checks if floating labels are displayed when the mouse moves over the actualLegend. By default, the floating labels for all the samples in a series appear when the mouse hovers over the actualLegend box for that series.

Overrides:
isFloatingOnLegendOn in class GenericChart
Returns:
True for on, false for off.
See Also:
setFloatingOnLegendOn(boolean)

isGridAdjustmentOn

public boolean isGridAdjustmentOn(int edge)
Checks if runtime grid adjustment is on.

Parameters:
edge - TOP, LEFT, BOTTOM, or RIGHT.
Returns:
True if on, false if off.

isPlotLabelsOn

public boolean isPlotLabelsOn()
Checks if the plot labels are turned on.

Returns:
True if they are turned on, false otherwise.

isPlotSortingOn

public boolean isPlotSortingOn(int series)
Checks if the plots were sorted when they were loaded.

Parameters:
series - The index of the series (0-based).
Returns:
True for on, false for off.

isRangeAdjusterOn

public boolean isRangeAdjusterOn(int adjuster)
Checks if the specified range adjuster is turned on.

Parameters:
adjuster - The adjuster to turn on or off (RIGHT or BOTTOM)
Returns:
True if turned on, false otherwise.

isRangeOn

public boolean isRangeOn(int side)
Checks if the specified range is on.

Parameters:
side - The range (RIGHT, LEFT, TOP, BOTTOM).
Returns:
True for on, false of off.

isSampleLabelsOn

public boolean isSampleLabelsOn()
Checks if the plot labels are turned on.

Returns:
True if they are turned on, false otherwise.

isSelected

public boolean isSelected(int series)
Checks if a series is selected.

Parameters:
series - The series index .
Throws:
java.lang.IllegalArgumentException - If the series is invalid.

isSeriesEmpty

public boolean isSeriesEmpty(int index)
Checks if the series contains any data.

Specified by:
isSeriesEmpty in class GenericChart
Parameters:
index - The series index.
Returns:
True if the series is emty (does not contain any data).

isSeriesLabelsOn

public boolean isSeriesLabelsOn()
Checks if the floating series labels is turned on.

Returns:
True for on, false for off.

isSeriesOn

public boolean isSeriesOn(int series)
Checks if the series is on.

Parameters:
series - The plot series to check.
Returns:
True if the series is on, false if off.
Throws:
java.lang.IllegalArgumentException - if the series is invalid.

isTitleOn

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

Overrides:
isTitleOn in class GenericChart
Returns:
True if on, false if off.

isXAxisOn

public boolean isXAxisOn()
Checks if the X axis is turned on.

Returns:
True for on, false for off.

isXValueLabelsOn

public boolean isXValueLabelsOn()
Checks if the x value labels are turned on for any series.

Returns:
True for on, false for off.

isXValueLabelsOn

public boolean isXValueLabelsOn(int series)
Checks if the x value labels are turned on for a specified series. Use -1 to check if any of the series has the x value labels turned on.

Parameters:
series - The series to check for.
Returns:
True for on, false for off.

isXValueLinesOn

public boolean isXValueLinesOn()
Checks if the x value lines are on.

Returns:
True for on, false of off.

isYAxisOn

public boolean isYAxisOn()
Checks if the Y axis is turned on.

Returns:
True for on, false for off.

isYValueLabelsOn

public boolean isYValueLabelsOn()
Checks if the y value labels are turned on for any series.

Returns:
True for on, false for off.

isYValueLabelsOn

public boolean isYValueLabelsOn(int series)
Checks if the y value labels are turned on for a specified series. Use -1 to check if any of the series has the y value labels turned on.

Parameters:
series - The series to check for.
Returns:
True for on, false for off.

isYValueLinesOn

public boolean isYValueLinesOn()
Checks if the y value lines are on.

Returns:
True for on, false of off.

isZoomOn

public boolean isZoomOn()
Checks if zoom is turned on.

Overrides:
isZoomOn in class GenericChart
Returns:
True if turned on, false otherwise.

loadImage

public java.awt.Image loadImage(java.lang.String name)
Loads an image from the disk.

Overrides:
loadImage in class GenericChart
Parameters:
name - The file name of the image.
Returns:
The image loaded, or null if not found or it failed.

processEvent

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

Overrides:
processEvent in class GenericChart
Parameters:
event - The event to process.

removeExternalGraphics

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

Overrides:
removeExternalGraphics in class GenericChart
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.

Specified by:
removeItemListener in interface java.awt.ItemSelectable
Parameters:
l - The item listener to remove.
See Also:
addItemListener(java.awt.event.ItemListener)

reset

public void reset()
Resets the chart data and features.

Overrides:
reset in class GenericChart

setAutoLabelSpacingOn

public void setAutoLabelSpacingOn(boolean on)
Turns on or off automatic bar label spacing. If this is on, only plot labels there is space for will be painted. If turned off, all labels will be painted, even if they overlap. It is turned off by default.

Parameters:
on - True for on, false for off.

setAutomaticRepaintOn

public void setAutomaticRepaintOn(boolean state)
Turns on or off the automatic repaint. If this is turned on, the chart will automatically be refreshed after each chart update. If this is turned off it will not. You must turn it on before your then call autoRepaint() to refresh the chart. your updates. If you want to make a lot of changes to the chart and it's data, you might want to turn this off (for speed), and then turn it back on when you are done.

Overrides:
setAutomaticRepaintOn in class GenericChart
Parameters:
state - True for on, false for off.

setBackground

public void setBackground(java.awt.Color color)
Sets the chart component background color, outside the chart grid. Use the setChartBackground() method to set the chart grid color.

Overrides:
setBackground in class GenericChart
Parameters:
color - The color to use.
See Also:
setChartBackground(java.awt.Color)

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 chart grid itself.

Overrides:
setChartBackground in class GenericChart
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.

Overrides:
setChartForeground in class GenericChart
Parameters:
color - The color to use.

setConnectedLinesOn

public void setConnectedLinesOn(int series,
                                boolean on)
Turns on or off lines between plots for the specified sereis.

Parameters:
series - The index of the series (0-based).
on - True for on, false for off.

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.

Overrides:
setExternalGraphics in class GenericChart
Parameters:
g - The graphics context used for painting.
image - The image to which graphics context belongs. See here for an example.

setFloatingOnLegendOn

public void setFloatingOnLegendOn(boolean on)
Turn on or off floating labels when the mouse moves over the actualLegend. By default, the floating labels for all the samples in a series appear when the mouse hovers over the actualLegend box for that series.

Overrides:
setFloatingOnLegendOn in class GenericChart
Parameters:
on - True for on, false for off.

setForeground

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

Overrides:
setForeground in class GenericChart
Parameters:
color - The color to use.
See Also:
setChartBackground(java.awt.Color)

setGraphInsets

public void setGraphInsets(int top,
                           int left,
                           int bottom,
                           int right)
Sets the insets between the graph itself and the chart component edges. Setting a value of -1 uses the default insets.

Overrides:
setGraphInsets in class GenericChart
Parameters:
top - The top insets in pixels.
left - The left insets in pixels.
bottom - The bottom insets in pixels.
right - The right insets in pixels.

setGridAdjustmentOn

public void setGridAdjustmentOn(int edge,
                                boolean on)
Turns on or of runtime grid adjustment.

Parameters:
edge - TOP,LEFT,BOTTOM, or RIGHT.
on - True or on, false for off.

setGridImage

public void setGridImage(java.lang.String name)
Sets an image to be used as background for the chart grid. The image itself must be added prior to calling this method using the addImage() method.

Overrides:
setGridImage in class GenericChart
Parameters:
name - The image to use, null if you want to remove grid image.
See Also:
addImage(java.lang.String, java.awt.Image)

setGridLine

public void setGridLine(int index,
                        double value)
Sets a single grid line value.

Parameters:
index - The index of the line to set value for.
value - The value to set.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

setGridLineColor

public void setGridLineColor(int index,
                             java.awt.Color color)
Sets a single grid line color.

Parameters:
index - The index of the line to set Color for.
color - The color to set for the grid line.
Throws:
java.lang.IllegalArgumentException - if the index is invalid.

setGridLineColors

public void setGridLineColors(java.awt.Color[] colors)
Sets the color of each vertical grid line.

Parameters:
colors - The array with grid lines colors.

setGridLines

public void setGridLines(double[] grid)
Sets the vertical grid lines positons. The grid values are relative to the sample axis range (default 0 to 100).

Parameters:
grid - The array with grid lines position values.

setGridLinesColor

public void setGridLinesColor(java.awt.Color color)
Sets the vertical grid lines color. If new grid lines are added, this method has to be called again

Parameters:
color - The color to set for all lines.

setLabel

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

Overrides:
setLabel in class GenericChart
Parameters:
name - The name of the label.
label - The label to use, null for no label.

setLabelAngle

public void setLabelAngle(java.lang.String name,
                          int angle)
Sets the angle of the specified label.

Overrides:
setLabelAngle in class GenericChart
Parameters:
name - The name of the label.
angle - The angle to use for the label.

setLineWidth

public void setLineWidth(int series,
                         int width)
Sets the width of the line for the specified series.

Parameters:
series - The series number, -1 for all.
width - The width in pixels, default is 1.

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale used to format numbers.

Overrides:
setLocale in class GenericChart
Parameters:
locale - The locale to use, null for the default locale.

setPlot

public void setPlot(int series,
                    double x,
                    double y)
Sets an individual plot for the specified series with given x|y. If there is no plots with such x, this plot is added to the series, if there is such plot from before, new y coordinate is set for this plot.

Parameters:
series - The index of the series (0-based).
x - The x coordinate of the plot.
y - The y coordinate of the plot.

setPlot

public void setPlot(int series,
                    double x,
                    double y,
                    int size)
Sets an individual plot for the specified series with given x|y. If there is no plots with such x, this plot is added to the series, if there is such plot from before, new y coordinate is set for this plot.

Parameters:
series - The index of the series (0-based).
x - The x coordinate of the plot.
y - The y coordinate of the plot.
size - The size of the plot. (-1 for default size)

setPlotImage

public void setPlotImage(int series,
                         java.lang.String name)
Sets an image to be used as a highlight for a specified series. If series is -1, the image is set for all samples on the chart.

Parameters:
series - The series to set hightlight image for.
name - The image to use, null for the default highlight.
See Also:
addImage(java.lang.String, java.awt.Image)

setPlotLabels

public void setPlotLabels(int series,
                          java.lang.String[] labels)
Sets the plots labels for each plot in serie.

Parameters:
series - The index of the series (0-based).
labels - The array of size values for each plot.

setPlotLabelsOn

public void setPlotLabelsOn(boolean on)
Turns on the plot labels.

Parameters:
on - True for on, false for off.

setPlotLabelStyle

public void setPlotLabelStyle(int style)
Sets the style of the plot labels. By default, the plot labels are displayed below the chart grid for each plot. The plot labels can also be displayed as a tooltip like label when the mouse is over the plot.

Parameters:
style - BELOW, FLOATING, BELOW_AND_FLOATING.

setPlots

public void setPlots(int series,
                     double[][] plots)
Sets the x|y plots for the specified series.

Parameters:
series - The index of the series (0-based).
plots - The two-dimensional array of plot coordinates [index][x|y] (x=0, y=1).

setPlots

public void setPlots(int series,
                     double[][] plots,
                     int size)
Sets the x|y plots for the specified series.

Parameters:
series - The index of the series (0-based).
plots - The two-dimensional array of plot coordinates [index][x|y] (x=0, y=1).
size - The size of the plots (-1 means use the existing size).

setPlots

public void setPlots(int series,
                     double[][] plots,
                     int[] size)
Sets the x|y plots for the specified series.

Parameters:
series - The index of the series (0-based).
plots - The two-dimensional array of plot coordinates [index][x|y] (x=0, y=1).
size - The array of size values for each plot.

setPlotSize

public void setPlotSize(int series,
                        int size)
Sets the plot size for the specified series.

Parameters:
series - The index of the series (0-based, use -1 to set size for all series).
size - The size of the plots.

setPlotSize

public void setPlotSize(int series,
                        int[] size)
Sets the plots size for each plot in serie.

Parameters:
series - The index of the series (0-based, use -1 to set size for all series).
size - The array of size values for each plot.

setPlotSortingOn

public void setPlotSortingOn(int series,
                             boolean on)
This method should be called before setting the plots in order to turn on/off the plots sorting. Turning the plots sorting on means that the plots will be sorted by their x-values when setting them using setPlots().

Parameters:
series - The index of the series (0-based, -1 for all).
on - True for on, false for off.

setPlotStyle

public void setPlotStyle(int style)
Sets the plot style for all the data series.

Parameters:
style - PLOT_STYLE_CIRCLE, PLOT_STYLE_CIRCLE_OPAQUE, PLOT_STYLE_CIRCLE_FILLED, PLOT_STYLE_SQUARE, PLOT_STYLE_SQUARE_OPAQUE, PLOT_STYLE_SQUARE_FILLED, PLOT_STYLE_DIAMOND, PLOT_STYLE_DIAMOND_OPAQUE, PLOT_STYLE_DIAMOND_FILLED.

setPlotStyle

public void setPlotStyle(int series,
                         int style)
Sets the plot style for the specified data series.

Parameters:
series - The index of the series.
style - PLOT_STYLE_CIRCLE, PLOT_STYLE_CIRCLE_OPAQUE, PLOT_STYLE_CIRCLE_FILLED, PLOT_STYLE_SQUARE, PLOT_STYLE_SQUARE_OPAQUE, PLOT_STYLE_SQUARE_FILLED, PLOT_STYLE_DIAMOND, PLOT_STYLE_DIAMOND_OPAQUE, PLOT_STYLE_DIAMOND_FILLED.
Throws:
java.lang.IllegalArgumentException - if the series is invalid.

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.

Overrides:
setPreferredSize in class GenericChart
Parameters:
width - The preferred width.
height - The preferred height.

setRangeAdjusterOn

public void setRangeAdjusterOn(int adjuster,
                               boolean on)
Turns on or off the range adjuster. When this is on, the user can adjust the range to see any low-value lines more clearly.

Parameters:
adjuster - The adjuster to turn on or off (RIGHT or BOTTOM)
on - True for on, false for off.

setRangeColor

public void setRangeColor(int side,
                          java.awt.Color color)
Sets the color of the specified range.

Parameters:
side - The side of the range (LEFT, RIGHT, TOP, BOTTOM).
color - The color to use for the range.

setRangeFormatter

public void setRangeFormatter(int index,
                              java.text.NumberFormat formatter)
Sets a number formatter for the specific range.

Parameters:
index - The index of the range.
formatter - The number formatter to set.

setRangeOn

public void setRangeOn(int side,
                       boolean on)
Turns on or off the specified range.

Parameters:
side - The range to be turned on or off: RIGHT, LEFT, TOP, BOTTOM
on - True for on, false of off.

setSelection

public void setSelection(int series,
                         int sample,
                         boolean selected)
Marks a series as selected or deselected. Listeners are notified of series selections.

Parameters:
series - The series index.
selected - True for selected, false for deselected.
Throws:
java.lang.IllegalArgumentException - If the series or series is invalid.

setSelection

public void setSelection(int series,
                         int sample,
                         boolean selected,
                         boolean notify)
Marks a series as selected or deselected. Listeners are only notified if this is specified with the notify parameter.

Parameters:
series - The series index.
selected - True for selected, false for deselected.
notify - True if listeners should be notified, false otherwise.
Throws:
java.lang.IllegalArgumentException - If the series or series is invalid.

setSelection

public void setSelection(int series,
                         int sample,
                         boolean selected,
                         boolean clear,
                         boolean notify)
Marks a series as selected or deselected. Listeners are notified of series selections.

Specified by:
setSelection in class GenericChart
Parameters:
series - The series index.
selected - True for selected, false for deselected.
clear - True if the other series should be cleared.
notify - True if the listeners should be notified.
sample - The sample index.
Throws:
java.lang.IllegalArgumentException - If the series is invalid.

setSeriesColor

public void setSeriesColor(int series,
                           java.awt.Color color)
Sets the color of the specified plot series. If the index is larger than or equal to the number of total plot colors, later series that fall on that index will be given the same color.

Parameters:
series - The series to set color for (0-based).
color - The color to be used for the plot series.

setSeriesColors

public void setSeriesColors(java.awt.Color[] colors)
Sets colors for the plot series. If the number of series is larger than the number of colors, the colors of the series will cycle through the array. To use the default colors, use NULL as a parameter.

Parameters:
colors - An array with the colors to be used, null for default colors.

setSeriesCount

public void setSeriesCount(int count)
Sets the number of series.

Parameters:
count - The number of series.

setSeriesLabel

public void setSeriesLabel(int series,
                           java.lang.String label)
Sets the specified series label.

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

setSeriesLabelColor

public void setSeriesLabelColor(int series,
                                java.awt.Color color)
Sets the color of of the label for the specified series.

Parameters:
series - The index of the series (0-based).
color - The color to use, null for the default color.
Throws:
java.lang.IllegalArgumentException - if the series index is invalid.

setSeriesLabels

public void setSeriesLabels(java.lang.String[] labels)
Sets the series labels.

Parameters:
labels - The labels to use.

setSeriesLabelsOn

public void setSeriesLabelsOn(boolean on)
Turns on the floating series labels.

Parameters:
on - True for on, false for off.

setSeriesLabelStyle

public void setSeriesLabelStyle(int style)
Sets the style of the series labels. The series labels can be displayed at each plot point of the chart or floating over each plot point when the mouse moves over it.

Parameters:
style - FLOATING, CENTER, OVER, UNDER.

setSeriesOn

public void setSeriesOn(boolean on)
Turns the plot series on and off.

Parameters:
on - True for on, false for off.

setSeriesOn

public void setSeriesOn(int series,
                        boolean on)
Turns the plot series on and off.

Parameters:
series - The series to turn on/off.
on - True for on, false for off.
Throws:
java.lang.IllegalArgumentException - if the series is invalid.

setTargetLabelsPosition

public void setTargetLabelsPosition(int position)
Sets the target labels position.

Parameters:
position - 0 for left, 1 for right

setTargetValueLine

public void setTargetValueLine(java.lang.String id,
                               double value,
                               java.awt.Color color,
                               int style)
Sets a target value line with the specified ID, value, and color.

Parameters:
id - The id of the target line.
value - The value where the line should appear.
color - The color of the line, if null, the line is removed.
style - TARGET_LINE_NO_LABEL, TARGET_LINE_ID_LABEL, TARGET_LINE_VALUE_LABEL, or TARGET_LINE_ID_AND_VALUE_LABEL.
Throws:
java.lang.IllegalArgumentException - if the style is invalid.

setThousandsDelimiter

public void setThousandsDelimiter(java.lang.String delimiter)
Sets the delimiter for use in the display of numbers. By default, the delimiter is not set, so the delimiter for the default Locale is used instead.

Overrides:
setThousandsDelimiter in class GenericChart
Parameters:
delimiter - The delimiter to set, use null for default, or off for no thousands grouping.

setTitle

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

Overrides:
setTitle in class GenericChart
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.

Overrides:
setTitleOn in class GenericChart
Parameters:
on - True for on, false for off.
See Also:
setTitle(java.lang.String)

setValueLabelStyle

public void setValueLabelStyle(int style)
Sets the style of the value labels. By default, the value labels are displayed floating over the plots.

Parameters:
style - CENTER, OVER, FLOATING.

setXAxisColor

public void setXAxisColor(java.awt.Color color)
Sets the color for the X axis

Parameters:
color - The color of the axis

setXAxisOn

public void setXAxisOn(boolean on)
Turns on or off the X axis.

Parameters:
on - True for on, false for off.

setXCurrentLowerRange

public void setXCurrentLowerRange(double range)
Sets the X-axis current lower range.

Parameters:
range - The range to set.

setXCurrentUpperRange

public void setXCurrentUpperRange(double range)
Sets the X-axis current upper range.

Parameters:
range - The range to set.

setXLowerRange

public void setXLowerRange(double range)
Sets the X-axis lower range.

Parameters:
range - The range to set.

setXMaxValueLineCount

public void setXMaxValueLineCount(int count)
Sets the maximum number of X value lines there should be in the chart. If set to -1, the number will be as many as there is room for.

Parameters:
count - The grid line count.

setXRangeDecimalCount

public void setXRangeDecimalCount(int count)
Sets the number of decimals for the X axis range labels.

Parameters:
count - The number of decimals.

setXRangeInterval

public void setXRangeInterval(double interval)
Sets interval between the ticks on the X range.

Parameters:
interval - The interval between the to range ticks.

setXRangeLabel

public void setXRangeLabel(double x,
                           java.lang.String label)
Sets a single custom label on the X range axis.

Parameters:
x - The X position of the label.
label - The labels itself.

setXRangeLabelColor

public void setXRangeLabelColor(double x,
                                java.awt.Color color)
Sets color for the label with specified position.

Parameters:
x - The X position of the label.
color - The color to paint label with.

setXRangeLabelColors

public void setXRangeLabelColors(double[] x,
                                 java.awt.Color[] colors)
Sets colors for the x-range labels.

Parameters:
x - Array of X position of the labels.
colors - Array of Color values one for each label.

setXRangeLabelLineOn

public void setXRangeLabelLineOn(double x,
                                 boolean lineOn)
Sets a boolean value which tells if a grid line should be displayed for the labels with given position.

Parameters:
x - The X position of the label.
lineOn - Tells if a grid line should be painted for this label.

setXRangeLabelLinesOn

public void setXRangeLabelLinesOn(double[] x,
                                  boolean[] linesOn)
Sets boolean values telling if the grid lines should be displayed for the corresponding x-range labels.

Parameters:
x - Array of X position of the labels.
linesOn - Array of boolean values telling if a grid line should be painted for the corresponding lable.

setXRangeLabels

public void setXRangeLabels(double[] x,
                            java.lang.String[] labels)
Sets the custom labels for the X range axis.

Parameters:
x - Array of X position of the labels.
labels - Array of labels displayed on the X axis.

setXRangeLabelsColor

public void setXRangeLabelsColor(java.awt.Color c)
Sets color for all x-range labels.

Parameters:
c - Color to paint x-range labels with.

setXRangeLabelStyle

public void setXRangeLabelStyle(int style)
Sets the style of the x-range labels. By default, the x-range labels are displayed below the chart grid. The x-range labels can also be displayed inside the chard grid to the left side from the x-range lines.

Parameters:
style - SIDE, BELOW, FLOATING, BELOW_AND_FLOATING.

setXUpperRange

public void setXUpperRange(double range)
Sets the X-axis upper range.

Parameters:
range - The range to set.

setXValueDecimalCount

public void setXValueDecimalCount(int series,
                                  int count)
Sets the number of decimals in the x values. The default value is 0.

Parameters:
series - The index of the series (-1 for all).
count - The number of decimals to use.

setXValueLabelsOn

public void setXValueLabelsOn(boolean on)
Turns on or off the x value labels. The x value labels display the x value for each plot in the chart.

Parameters:
on - True for on, false for off.

setXValueLabelsOn

public void setXValueLabelsOn(int series,
                              boolean on)
Turns on or off the x value labels for the specified series.

Parameters:
series - The index of the series (-1) for all.
on - True for on, false for off.

setXValueLinesColor

public void setXValueLinesColor(java.awt.Color color)
Sets the color of the x value lines.

Parameters:
color - The color to use for the x value lines.

setXValueLinesOn

public void setXValueLinesOn(boolean on)
Turns on or off or x value lines.

Parameters:
on - True for on, false of off.

setYAxisColor

public void setYAxisColor(java.awt.Color color)
Sets the color for the Y axis

Parameters:
color - The color of the axis

setYAxisOn

public void setYAxisOn(boolean on)
Turns on or off Y axis.

Parameters:
on - True for on, false for off.

setYCurrentLowerRange

public void setYCurrentLowerRange(double range)
Sets the Y-axis current lower range.

Parameters:
range - The range to set.

setYCurrentUpperRange

public void setYCurrentUpperRange(double range)
Sets the Y-axis current upper range.

Parameters:
range - The range to set.

setYLowerRange

public void setYLowerRange(double range)
Sets the Y-axis lower range.

Parameters:
range - The range to set.

setYMaxValueLineCount

public void setYMaxValueLineCount(int count)
Sets the maximum number of Y value lines there should be in the chart. If set to -1, the number will be as many as there is room for.

Parameters:
count - The grid line count.

setYRangeDecimalCount

public void setYRangeDecimalCount(int count)
Sets the number of decimals for the Y axis range labels.

Parameters:
count - The number of decimals.

setYRangeInterval

public void setYRangeInterval(double interval)
Sets interval between the ticks on the Y range.

Parameters:
interval - The interval between the to range ticks.

setYUpperRange

public void setYUpperRange(double range)
Sets the Y-axis upper range.

Parameters:
range - The range to set.

setYValueDecimalCount

public void setYValueDecimalCount(int series,
                                  int count)
Sets the number of decimals in the y values. The default value is 0.

Parameters:
series - The index of the series (-1 for all).
count - The number of decimals to use.

setYValueLabelsOn

public void setYValueLabelsOn(boolean on)
Turns on or off the y value labels. The y value labels display the y value for each plot in the chart.

Parameters:
on - True for on, false for off.

setYValueLabelsOn

public void setYValueLabelsOn(int series,
                              boolean on)
Turns on or off the y value labels for the specified series.

Parameters:
series - The index of the series (-1) for all.
on - True for on, false for off.

setYValueLinesColor

public void setYValueLinesColor(java.awt.Color color)
Sets the color of the y value lines.

Parameters:
color - The color to use for the y value lines.

setYValueLinesOn

public void setYValueLinesOn(boolean on)
Turns on or off or y value lines.

Parameters:
on - True for on, false of off.

setZoomOn

public void setZoomOn(boolean on)
Turns zoom on or off. When this is on, the user can zoom the chart by using mouse box. This is only applicable for chart types with grids.

Overrides:
setZoomOn in class GenericChart
Parameters:
on - True for on, false for off.

toString

public java.lang.String toString()
Returns the title of the chart.

Overrides:
toString in class GenericChart