org.mbari.siam.moos.utils.node
Class SiamXYPlot

java.lang.Object
  extended by com.jrefinery.chart.Plot
      extended by com.jrefinery.chart.XYPlot
          extended by org.mbari.siam.moos.utils.node.SiamXYPlot
All Implemented Interfaces:
AxisConstants, com.jrefinery.chart.event.AxisChangeListener, HorizontalValuePlot, VerticalValuePlot, DatasetChangeListener, java.beans.PropertyChangeListener, java.util.EventListener

public class SiamXYPlot
extends XYPlot

A general class for plotting data in the form of (x, y) pairs. XYPlot can use data from any class that implements the XYDataset interface (in the com.jrefinery.data package org.mbari.siam.moos.utils.node).

XYPlot makes use of a renderer to draw each point on the plot. By using different renderers, various chart types can be produced. The ChartFactory class contains static methods for creating pre-configured charts.


Field Summary
 
Fields inherited from class com.jrefinery.chart.XYPlot
domainAxis, horizontalColors, horizontalLines, parent, rangeAxis, renderer, verticalColors, verticalLines, weight
 
Fields inherited from class com.jrefinery.chart.Plot
backgroundAlpha, backgroundImage, backgroundPaint, dataset, DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, firstSeriesIndex, foregroundAlpha, insets, listeners, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, outlinePaint, outlineStroke, seriesOutlinePaint, seriesOutlineStroke, seriesPaint, seriesStroke, shapeFactory, ZERO
 
Fields inherited from interface com.jrefinery.chart.AxisConstants
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_STROKE
 
Constructor Summary
SiamXYPlot(XYDataset data, ValueAxis domainAxis, ValueAxis rangeAxis)
          Constructs an XYPlot with the specified axes (other attributes take default values).
SiamXYPlot(XYDataset data, ValueAxis domainAxis, ValueAxis rangeAxis, java.awt.Insets insets, java.awt.Paint backgroundPaint, java.awt.Image backgroundImage, float backgroundAlpha, java.awt.Stroke outlineStroke, java.awt.Paint outlinePaint, float alpha, XYItemRenderer renderer)
          Constructs a new XY plot.
SiamXYPlot(XYDataset data, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer)
          Constructs an XYPlot with the specified axes and renderer (other attributes take default values).
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartRenderingInfo info, Dataset dataset)
           
 void handleClick(int x, int y, java.awt.geom.Rectangle2D plotArea)
           
 
Methods inherited from class com.jrefinery.chart.XYPlot
addHorizontalLine, addHorizontalLine, addVerticalLine, addVerticalLine, datasetChanged, draw, draw, drawHorizontalLine, drawHorizontalLines, drawVerticalLine, drawVerticalLines, getDomainAxis, getHorizontalAxis, getHorizontalDataRange, getHorizontalValueAxis, getItemRenderer, getLegendItemLabels, getParent, getPlotType, getRangeAxis, getSeriesCount, getVerticalAxis, getVerticalDataRange, getVerticalValueAxis, getWeight, getXYDataset, handleClick, isCompatibleDomainAxis, isCompatibleRangeAxis, isSubplot, propertyChange, render, setDomainAxis, setParent, setRangeAxis, setWeight, setXYItemRenderer, zoom
 
Methods inherited from class com.jrefinery.chart.Plot
addChangeListener, axisChanged, drawOutlineAndBackground, getBackgroundAlpha, getBackgroundPaint, getDataset, getFirstSeriesIndex, getForegroundAlpha, getInsets, getOutlinePaint, getOutlineStroke, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesStroke, getShape, getShape, getShapeFactory, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundPaint, setDataset, setFirstSeriesIndex, setForegroundAlpha, setInsets, setOutlinePaint, setOutlineStroke, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesStroke, setSeriesStroke, setShapeFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiamXYPlot

public SiamXYPlot(XYDataset data,
                  ValueAxis domainAxis,
                  ValueAxis rangeAxis)
Constructs an XYPlot with the specified axes (other attributes take default values).

Parameters:
domainAxis - The domain axis.
rangeAxis - The range axis.

SiamXYPlot

public SiamXYPlot(XYDataset data,
                  ValueAxis domainAxis,
                  ValueAxis rangeAxis,
                  XYItemRenderer renderer)
Constructs an XYPlot with the specified axes and renderer (other attributes take default values).

Parameters:
domainAxis - The domain axis.
rangeAxis - The range axis.
renderer - The renderer

SiamXYPlot

public SiamXYPlot(XYDataset data,
                  ValueAxis domainAxis,
                  ValueAxis rangeAxis,
                  java.awt.Insets insets,
                  java.awt.Paint backgroundPaint,
                  java.awt.Image backgroundImage,
                  float backgroundAlpha,
                  java.awt.Stroke outlineStroke,
                  java.awt.Paint outlinePaint,
                  float alpha,
                  XYItemRenderer renderer)
Constructs a new XY plot.

Parameters:
domainAxis - The domain axis.
rangeAxis - The range axis.
insets - Amount of blank space around the plot area.
backgroundPaint - An optional color for the plot's background.
backgroundImage - An optional image for the plot's background.
backgroundAlpha - Alpha-transparency for the plot's background.
outlineStroke - The Stroke used to draw an outline around the plot.
outlinePaint - The color used to draw the plot outline.
alpha - The alpha-transparency.
renderer - The renderer.
Method Detail

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D plotArea,
                 ChartRenderingInfo info,
                 Dataset dataset)
Overrides:
draw in class XYPlot

handleClick

public void handleClick(int x,
                        int y,
                        java.awt.geom.Rectangle2D plotArea)
Overrides:
handleClick in class XYPlot


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.