Package org.jfree.chart.urls
Class StandardCategoryURLGenerator
- java.lang.Object
-
- org.jfree.chart.urls.StandardCategoryURLGenerator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,CategoryURLGenerator
public class StandardCategoryURLGenerator extends java.lang.Object implements CategoryURLGenerator, java.lang.Cloneable, java.io.Serializable
A URL generator that can be assigned to aCategoryItemRenderer
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
categoryParameterName
Category parameter name to go in each URLprivate java.lang.String
prefix
Prefix to the URLprivate static long
serialVersionUID
For serialization.private java.lang.String
seriesParameterName
Series parameter name to go in each URL
-
Constructor Summary
Constructors Constructor Description StandardCategoryURLGenerator()
Creates a new generator with default settings.StandardCategoryURLGenerator(java.lang.String prefix)
Constructor that overrides default prefix to the URL.StandardCategoryURLGenerator(java.lang.String prefix, java.lang.String seriesParameterName, java.lang.String categoryParameterName)
Constructor that overrides all the defaults.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Returns an independent copy of the URL generator.boolean
equals(java.lang.Object obj)
Tests the generator for equality with an arbitrary object.java.lang.String
generateURL(CategoryDataset dataset, int series, int category)
Generates a URL for a particular item within a series.int
hashCode()
Returns a hash code.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
prefix
private java.lang.String prefix
Prefix to the URL
-
seriesParameterName
private java.lang.String seriesParameterName
Series parameter name to go in each URL
-
categoryParameterName
private java.lang.String categoryParameterName
Category parameter name to go in each URL
-
-
Constructor Detail
-
StandardCategoryURLGenerator
public StandardCategoryURLGenerator()
Creates a new generator with default settings.
-
StandardCategoryURLGenerator
public StandardCategoryURLGenerator(java.lang.String prefix)
Constructor that overrides default prefix to the URL.- Parameters:
prefix
- the prefix to the URL (null
not permitted).
-
StandardCategoryURLGenerator
public StandardCategoryURLGenerator(java.lang.String prefix, java.lang.String seriesParameterName, java.lang.String categoryParameterName)
Constructor that overrides all the defaults.- Parameters:
prefix
- the prefix to the URL (null
not permitted).seriesParameterName
- the name of the series parameter to go in each URL (null
not permitted).categoryParameterName
- the name of the category parameter to go in each URL (null
not permitted).
-
-
Method Detail
-
generateURL
public java.lang.String generateURL(CategoryDataset dataset, int series, int category)
Generates a URL for a particular item within a series.- Specified by:
generateURL
in interfaceCategoryURLGenerator
- Parameters:
dataset
- the dataset.series
- the series index (zero-based).category
- the category index (zero-based).- Returns:
- The generated URL.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns an independent copy of the URL generator.- Overrides:
clone
in classjava.lang.Object
- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException
- not thrown by this class, but subclasses (if any) might.
-
equals
public boolean equals(java.lang.Object obj)
Tests the generator for equality with an arbitrary object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code.
-
-