Hello, this is my implementation of CustomCategoryURLGenerator.
Thanks for your work.
 
D.Pierangeli
 
------------------------------------------------------------------------------------------------------------------
package org.jfree.chart.urls;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.jfree.data.category.*;
 

public class CustomCategoryURLGenerator implements CategoryURLGenerator, Serializable {
 
 /** For serialization. */
    private static final long serialVersionUID = -8565933425596551526L;
   
    /** Storage for the URLs. */
    private ArrayList urlSeries = new ArrayList();
 
    /**
     * Default constructor.
     */
 public CustomCategoryURLGenerator()
 {
        super();
    }
 
    /**
     * Returns the number of URL lists stored by the renderer.
     *
     * @return The list count.
     */
    public int getListCount() {
        return this.urlSeries.size();
    }
 
    /**
     * Returns the number of URLs in a given list.
     *
     * @param list  the list index (zero based).
     *
     * @return The URL count.
     */
    public int getURLCount(int list) {
        int result = 0;
        List urls = (List) this.urlSeries.get(list);
        if (urls != null) {
            result = urls.size();
        }
        return result;
    }
 
    /**
     * Returns the URL for an item.
     *
     * @param series  the series index.
     * @param item  the item index.
     *
     * @return The URL (possibly <code>null</code>).
     */
    public String getURL(int series, int item) {
        String result = null;
  List ur=null;
        if (series < getListCount()) {
            List urls = (List) this.urlSeries.get(series);
   ur = urls;
            if (urls != null) {
                if (item < urls.size()) {
                    result = (String) urls.get(item);
                }
            }
        }
        return result;
    }
 
    /**
     * Generates a URL.
     *
     * @param dataset  the dataset.
     * @param series  the series (zero-based index).
     * @param item  the item (zero-based index).
     *
     * @return A string containing the URL (possibly <code>null</code>).
     */
    public String generateURL(CategoryDataset dataset, int series, int item) {
        return getURL(series, item);
    }
 
    /**
     * Adds a list of URLs.
     *
     * @param urls  the list of URLs.
     */
    public void addURLSeries(List urls) {
        this.urlSeries.add(urls);
    }
 
 /**
     * Adds a list of URLs.
     *
     * @param urls  the list of URLs.
     */
 public void addURLSeries(ArrayList urls)
 {
  this.urlSeries.add(urls);
 }
 
 
    /**
     * Tests if this object is equal to another.
     *
     * @param o  the other object.
     *
     * @return A boolean.
     */
    public boolean equals(Object o) {
 
        if (o == null) {
            return false;
        }
        if (o == this) {
            return true;
        }
 
  if (!(o instanceof CustomCategoryURLGenerator))
  {
            return false;
        }
  CustomCategoryURLGenerator generator = (CustomCategoryURLGenerator)o;
        int listCount = getListCount();
        if (listCount != generator.getListCount()) {
            return false;
        }
 
        for (int series = 0; series < listCount; series++) {
            int urlCount = getURLCount(series);
            if (urlCount != generator.getURLCount(series)) {
                return false;
            }
 
            for (int item = 0; item < urlCount; item++) {
                String u1 = getURL(series, item);
                String u2 = generator.getURL(series, item);
                if (u1 != null) {
                    if (!u1.equals(u2)) {
                        return false;
                    }
                }
                else {
                    if (u2 != null) {
                        return false;
                    }
                }
            }
        }
        return true;
 
    }
 
}