- java.lang.Object
-
- org.jfree.chart.urls.CustomXYURLGenerator
-
- All Implemented Interfaces:
Serializable,Cloneable,PublicCloneable,XYURLGenerator
public class CustomXYURLGenerator extends Object implements XYURLGenerator, Cloneable, PublicCloneable, Serializable
A custom URL generator.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CustomXYURLGenerator()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods 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 this generator for equality with an arbitrary object.StringgenerateURL(XYDataset 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 Detail
-
CustomXYURLGenerator
public CustomXYURLGenerator()
Default constructor.
-
-
Method Detail
-
getListCount
public int getListCount()
Returns the number of URL lists stored by the renderer.- Returns:
- The list count.
-
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.
-
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).
-
generateURL
public String generateURL(XYDataset dataset, int series, int item)
Generates a URL.- Specified by:
generateURLin interfaceXYURLGenerator- Parameters:
dataset- the dataset.series- the series (zero-based index).item- the item (zero-based index).- Returns:
- A string containing the URL (possibly
null).
-
addURLSeries
public void addURLSeries(List urls)
Adds a list of URLs.- Parameters:
urls- the list of URLs (nullpermitted, the list is copied).
-
equals
public boolean equals(Object obj)
Tests this generator for equality with an arbitrary object.
-
clone
public Object clone() throws CloneNotSupportedException
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.
-
-