|
jfreechart example source code file (IntervalXYItemLabelGenerator.java)
The jfreechart IntervalXYItemLabelGenerator.java source code
/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* ---------------------------------
* IntervalXYItemLabelGenerator.java
* ---------------------------------
* (C) Copyright 2008, by Object Refinery Limited.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): -;
*
* Changes
* -------
* 26-May-2008 : Version 1 (DG);
*
*/
package org.jfree.chart.labels;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.MessageFormat;
import java.text.NumberFormat;
import java.util.Date;
import org.jfree.data.xy.IntervalXYDataset;
import org.jfree.data.xy.XYDataset;
import org.jfree.util.PublicCloneable;
/**
* An item label generator for datasets that implement the
* {@link IntervalXYDataset} interface.
*
* @since 1.0.10
*/
public class IntervalXYItemLabelGenerator extends AbstractXYItemLabelGenerator
implements XYItemLabelGenerator, Cloneable, PublicCloneable,
Serializable {
/** The default item label format. */
public static final String DEFAULT_ITEM_LABEL_FORMAT = "{5} - {6}";
/**
* Creates an item label generator using default number formatters.
*/
public IntervalXYItemLabelGenerator() {
this(DEFAULT_ITEM_LABEL_FORMAT, NumberFormat.getNumberInstance(),
NumberFormat.getNumberInstance());
}
/**
* Creates an item label generator using the specified number formatters.
*
* @param formatString the item label format string (<code>null not
* permitted).
* @param xFormat the format object for the x values (<code>null
* not permitted).
* @param yFormat the format object for the y values (<code>null
* not permitted).
*/
public IntervalXYItemLabelGenerator(String formatString,
NumberFormat xFormat, NumberFormat yFormat) {
super(formatString, xFormat, yFormat);
}
/**
* Creates an item label generator using the specified formatters.
*
* @param formatString the item label format string (<code>null
* not permitted).
* @param xFormat the format object for the x values (<code>null
* not permitted).
* @param yFormat the format object for the y values (<code>null
* not permitted).
*/
public IntervalXYItemLabelGenerator(String formatString,
DateFormat xFormat, NumberFormat yFormat) {
super(formatString, xFormat, yFormat);
}
/**
* Creates an item label generator using the specified formatters (a
* number formatter for the x-values and a date formatter for the
* y-values).
*
* @param formatString the item label format string (<code>null
* not permitted).
* @param xFormat the format object for the x values (<code>null
* permitted).
* @param yFormat the format object for the y values (<code>null
* not permitted).
*/
public IntervalXYItemLabelGenerator(String formatString,
NumberFormat xFormat, DateFormat yFormat) {
super(formatString, xFormat, yFormat);
}
/**
* Creates a label generator using the specified date formatters.
*
* @param formatString the label format string (<code>null not
* permitted).
* @param xFormat the format object for the x values (<code>null
* not permitted).
* @param yFormat the format object for the y values (<code>null
* not permitted).
*/
public IntervalXYItemLabelGenerator(String formatString,
DateFormat xFormat, DateFormat yFormat) {
super(formatString, xFormat, yFormat);
}
/**
* Creates the array of items that can be passed to the
* {@link MessageFormat} class for creating labels.
*
* @param dataset the dataset (<code>null not permitted).
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return An array of seven items from the dataset formatted as
* <code>String objects (never
Other jfreechart examples (source code examples)Here is a short list of links related to this jfreechart IntervalXYItemLabelGenerator.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.