Package org.jfree.chart.labels
Class StandardFlowLabelGenerator
java.lang.Object
org.jfree.chart.labels.StandardFlowLabelGenerator
- All Implemented Interfaces:
Serializable,FlowLabelGenerator
Standard flow label generator. Instances of this class are immutable.
- Since:
- 1.5.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default template for formatting the label. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with the default template.StandardFlowLabelGenerator(String template) Creates a new generator with the specified template. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests this instance for equality with an arbitrary object.generateLabel(FlowDataset dataset, FlowKey key) Returns a label for the specified flow.inthashCode()
-
Field Details
-
DEFAULT_TEMPLATE
The default template for formatting the label.- See Also:
-
-
Constructor Details
-
StandardFlowLabelGenerator
public StandardFlowLabelGenerator()Creates a new instance with the default template. -
StandardFlowLabelGenerator
Creates a new generator with the specified template. The template is passed to a Java Formatter instance along with four arguments, the stage (an integer), the source (a String), the destination (a String) and the flow value (a Number).- Parameters:
template- the template (nullnot permitted).
-
-
Method Details
-
generateLabel
Returns a label for the specified flow.- Specified by:
generateLabelin interfaceFlowLabelGenerator- Parameters:
dataset- the flow dataset (nullnot permitted).key- the flow key (nullnot permitted).- Returns:
- The label (possibly
null).
-
equals
Tests this instance for equality with an arbitrary object. -
hashCode
-