public class CustomPieURLGenerator extends java.lang.Object implements PieURLGenerator, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
For serialization.
|
private java.util.ArrayList |
urls
Storage for the URLs.
|
| Constructor and Description |
|---|
CustomPieURLGenerator()
Creates a new
CustomPieURLGenerator instance, initially
empty. |
| Modifier and Type | Method and Description |
|---|---|
void |
addURLs(java.util.Map urlMap)
Adds a map containing
(key, URL) mappings where each
key is an instance of Comparable
(corresponding to the key for an item in a pie dataset) and each
URL is a String representing a URL fragment. |
java.lang.Object |
clone()
Returns a clone of the generator.
|
boolean |
equals(java.lang.Object o)
Tests if this object is equal to another.
|
java.lang.String |
generateURL(PieDataset dataset,
java.lang.Comparable key,
int pieIndex)
Generates a URL fragment.
|
int |
getListCount()
Returns the number of URL maps stored by the renderer.
|
java.lang.String |
getURL(java.lang.Comparable key,
int mapIndex)
Returns the URL for a section in the specified map.
|
int |
getURLCount(int list)
Returns the number of URLs in a given map (specified by its position
in the map list).
|
private static final long serialVersionUID
private java.util.ArrayList urls
public CustomPieURLGenerator()
CustomPieURLGenerator instance, initially
empty. Call addURLs(Map) to specify the URL fragments to be
used.public java.lang.String generateURL(PieDataset dataset, java.lang.Comparable key, int pieIndex)
generateURL in interface PieURLGeneratordataset - the dataset (ignored).key - the item key.pieIndex - the pie index.getURL(Comparable, int)public int getListCount()
addURLs(Map)public int getURLCount(int list)
list - the list index (zero based).getListCount()public java.lang.String getURL(java.lang.Comparable key,
int mapIndex)
key - the key.mapIndex - the map index.public void addURLs(java.util.Map urlMap)
(key, URL) mappings where each
key is an instance of Comparable
(corresponding to the key for an item in a pie dataset) and each
URL is a String representing a URL fragment.
MultiplePiePlot.urlMap - the URLs (null permitted).public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other object.public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if cloning is not supported.