org.jfree.chart.urls

Class CustomCategoryURLGenerator

Implemented Interfaces:
CategoryURLGenerator, Cloneable, PublicCloneable, Serializable

public class CustomCategoryURLGenerator
extends java.lang.Object
implements CategoryURLGenerator, Cloneable, PublicCloneable, Serializable

A custom URL generator.

Constructor Summary

CustomCategoryURLGenerator()
Default constructor.

Method Summary

void
addURLSeries(List urls)
Adds a list of URLs.
Object
clone()
Returns a new generator that is a copy of, and independent from, this generator.
boolean
equals(Object obj)
Tests if this object is equal to another.
String
generateURL(CategoryDataset dataset, int series, int item)
Generates a URL.
int
getListCount()
Returns the number of URL lists stored by the renderer.
String
getURL(int series, int item)
Returns the URL for an item.
int
getURLCount(int list)
Returns the number of URLs in a given list.

Constructor Details

CustomCategoryURLGenerator

public CustomCategoryURLGenerator()
Default constructor.

Method Details

addURLSeries

public void addURLSeries(List urls)
Adds a list of URLs.
Parameters:
urls - the list of URLs (null permitted).

clone

public Object clone()
            throws CloneNotSupportedException
Returns a new generator that is a copy of, and independent from, this generator.
Returns:
A clone.

equals

public boolean equals(Object obj)
Tests if this object is equal to another.
Parameters:
obj - the other object.
Returns:
A boolean.

generateURL

public String generateURL(CategoryDataset dataset,
                          int series,
                          int item)
Generates a URL.
Specified by:
generateURL in interface CategoryURLGenerator
Parameters:
dataset - the dataset (ignored in this implementation).
series - the series (zero-based index).
item - the item (zero-based index).
Returns:
A string containing the URL (possibly null).

getListCount

public int getListCount()
Returns the number of URL lists stored by the renderer.
Returns:
The list count.

getURL

public String getURL(int series,
                     int item)
Returns the URL for an item.
Parameters:
series - the series index.
item - the item index.
Returns:
The URL (possibly null).

getURLCount

public int getURLCount(int list)
Returns the number of URLs in a given list.
Parameters:
list - the list index (zero based).
Returns:
The URL count.