Package org.jfree.chart.urls
Class CustomCategoryURLGenerator
java.lang.Object
org.jfree.chart.urls.CustomCategoryURLGenerator
- All Implemented Interfaces:
Serializable,Cloneable,CategoryURLGenerator,PublicCloneable
public class CustomCategoryURLGenerator extends Object implements CategoryURLGenerator, Cloneable, PublicCloneable, Serializable
A custom URL generator.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CustomCategoryURLGenerator()Default constructor. -
Method Summary
Modifier and Type Method Description voidaddURLSeries(List urls)Adds a list of URLs.Objectclone()Returns a new generator that is a copy of, and independent from, this generator.booleanequals(Object obj)Tests if this object is equal to another.StringgenerateURL(CategoryDataset dataset, int series, int item)Generates a URL.intgetListCount()Returns the number of URL lists stored by the renderer.StringgetURL(int series, int item)Returns the URL for an item.intgetURLCount(int list)Returns the number of URLs in a given list.
-
Constructor Details
-
CustomCategoryURLGenerator
public CustomCategoryURLGenerator()Default constructor.
-
-
Method Details
-
getListCount
Returns the number of URL lists stored by the renderer.- Returns:
- The list count.
-
getURLCount
Returns the number of URLs in a given list.- Parameters:
list- the list index (zero based).- Returns:
- The URL count.
-
getURL
Returns the URL for an item.- Parameters:
series- the series index.item- the item index.- Returns:
- The URL (possibly
null).
-
generateURL
Generates a URL.- Specified by:
generateURLin interfaceCategoryURLGenerator- 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).
-
addURLSeries
Adds a list of URLs.- Parameters:
urls- the list of URLs (nullpermitted).
-
equals
Tests if this object is equal to another. -
clone
Returns a new generator that is a copy of, and independent from, this generator.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if there is a problem with cloning.
-