HiRISE

HiRISE.HiReport.util
Class NamedXYSeriesCollection

java.lang.Object
  extended by org.jfree.data.general.AbstractDataset
      extended by org.jfree.data.general.AbstractSeriesDataset
          extended by org.jfree.data.xy.AbstractXYDataset
              extended by org.jfree.data.xy.AbstractIntervalXYDataset
                  extended by org.jfree.data.xy.XYSeriesCollection
                      extended by HiRISE.HiReport.util.NamedXYSeriesCollection
All Implemented Interfaces:
ObjectInputValidation, Serializable, Cloneable, EventListener, XYToolTipGenerator, XYURLGenerator, DomainInfo, Dataset, SeriesChangeListener, SeriesDataset, RangeInfo, IntervalXYDataset, XYDataset, PublicCloneable

public class NamedXYSeriesCollection
extends XYSeriesCollection
implements XYURLGenerator, XYToolTipGenerator

Simple URL generator that prefixes names (keys for X-Y items) with a base URL.

See Also:
Serialized Form

Constructor Summary
NamedXYSeriesCollection(String base)
          Create the instance
 
Method Summary
 void add(int series, double x, double y, String name, String tooltip)
          Set the name for a item.
 void addSeries(XYSeries series, String prefix)
          Add a series, with optional prefix, which if non-null, will form the 2nd part of the URL to be constructed for an item
 String generateToolTip(XYDataset dataset, int series, int item)
           
 String generateURL(XYDataset dataset, int series, int item)
          Return the URL for an item in a series in a dataset
 
Methods inherited from class org.jfree.data.xy.XYSeriesCollection
addSeries, clone, equals, getDomainBounds, getDomainLowerBound, getDomainOrder, getDomainUpperBound, getEndX, getEndY, getIntervalPositionFactor, getIntervalWidth, getItemCount, getRangeBounds, getRangeLowerBound, getRangeUpperBound, getSeries, getSeries, getSeries, getSeriesCount, getSeriesKey, getStartX, getStartY, getX, getY, hashCode, indexOf, isAutoWidth, removeAllSeries, removeSeries, removeSeries, setAutoWidth, setIntervalPositionFactor, setIntervalWidth
 
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset
getEndXValue, getEndYValue, getStartXValue, getStartYValue
 
Methods inherited from class org.jfree.data.xy.AbstractXYDataset
getXValue, getYValue
 
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset
indexOf, seriesChanged
 
Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.data.xy.IntervalXYDataset
getEndXValue, getEndYValue, getStartXValue, getStartYValue
 
Methods inherited from interface org.jfree.data.xy.XYDataset
getXValue, getYValue
 
Methods inherited from interface org.jfree.data.general.SeriesDataset
indexOf
 
Methods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

NamedXYSeriesCollection

public NamedXYSeriesCollection(String base)
Create the instance

Parameters:
base - First part of URLs to be constructed for item
Method Detail

addSeries

public void addSeries(XYSeries series,
                      String prefix)
Add a series, with optional prefix, which if non-null, will form the 2nd part of the URL to be constructed for an item

Parameters:
series - to be added to collection
prefix - part of an URL

add

public void add(int series,
                double x,
                double y,
                String name,
                String tooltip)
Set the name for a item. The name will be appended to the base URL (and the prefix for the series) when the item is in an imagemap.

Parameters:
series - index in dataset
x - coordinate value
y - coordinate value
name - URL segment for item
tooltip - text

generateURL

public String generateURL(XYDataset dataset,
                          int series,
                          int item)
Return the URL for an item in a series in a dataset

Specified by:
generateURL in interface XYURLGenerator
Parameters:
dataset - ignored
series - index in series
item - index in series

generateToolTip

public String generateToolTip(XYDataset dataset,
                              int series,
                              int item)
Specified by:
generateToolTip in interface XYToolTipGenerator

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona