org.jfree.chart.labels

Class StandardCrosshairLabelGenerator

public class StandardCrosshairLabelGenerator extends Object implements CrosshairLabelGenerator, Serializable

A default label generator.

Since: 1.0.13

Constructor Summary
StandardCrosshairLabelGenerator()
Creates a new instance with default attributes.
StandardCrosshairLabelGenerator(String labelTemplate, NumberFormat numberFormat)
Creates a new instance with the specified attributes.
Method Summary
booleanequals(Object obj)
Tests this generator for equality with an arbitrary object.
StringgenerateLabel(Crosshair crosshair)
Returns a string that can be used as the label for a crosshair.
StringgetLabelTemplate()
Returns the label template string.
NumberFormatgetNumberFormat()
Returns the number formatter.
inthashCode()
Returns a hash code for this instance.

Constructor Detail

StandardCrosshairLabelGenerator

public StandardCrosshairLabelGenerator()
Creates a new instance with default attributes.

StandardCrosshairLabelGenerator

public StandardCrosshairLabelGenerator(String labelTemplate, NumberFormat numberFormat)
Creates a new instance with the specified attributes.

Parameters: labelTemplate the label template (null not permitted). numberFormat the number formatter (null not permitted).

Method Detail

equals

public boolean equals(Object obj)
Tests this generator for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

generateLabel

public String generateLabel(Crosshair crosshair)
Returns a string that can be used as the label for a crosshair.

Parameters: crosshair the crosshair (null not permitted).

Returns: The label (possibly null).

getLabelTemplate

public String getLabelTemplate()
Returns the label template string.

Returns: The label template string (never null).

getNumberFormat

public NumberFormat getNumberFormat()
Returns the number formatter.

Returns: The formatter (never null).

hashCode

public int hashCode()
Returns a hash code for this instance.

Returns: A hash code for this instance.

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.