    001/* ===========================================================
    002 * Orson Charts : a 3D chart library for the Java(tm) platform
    003 * ===========================================================
    004 *
    005 * (C)opyright 2013-2022, by David Gilbert.  All rights reserved.
    006 *
    007 * https://github.com/jfree/orson-charts
    008 *
    009 * This program is free software: you can redistribute it and/or modify
    010 * it under the terms of the GNU General Public License as published by
    011 * the Free Software Foundation, either version 3 of the License, or
    012 * (at your option) any later version.
    013 *
    014 * This program is distributed in the hope that it will be useful,
    015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    017 * GNU General Public License for more details.
    018 *
    019 * You should have received a copy of the GNU General Public License
    020 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    021 *
    022 * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    023 * Other names may be trademarks of their respective owners.]
    024 *
    025 * If you do not wish to be bound by the terms of the GPL, an alternative
    026 * commercial license can be purchased.  For details, please see visit the
    027 * Orson Charts home page:
    028 *
    029 * http://www.object-refinery.com/orsoncharts/index.html
    030 *
    031 */
    032
    033package org.jfree.chart3d.legend;
    034
    035import java.awt.Shape;
    036import java.util.Map;
    037import java.awt.Color;
    038import org.jfree.chart3d.plot.Plot3D;
    039
    040/**
    041 * Information about an item (typically a data series) that can be displayed
    042 * in a legend.  All plots will return a list of these, to be used in the
    043 * construction of a chart legend, via the {@link Plot3D#getLegendInfo()}
    044 * method.
    045 */
    046public interface LegendItemInfo {
    047
    048    /**
    049     * Returns the series key.
    050     *
    051     * @return The series key (never {@code null}).
    052     */
    053    Comparable<?> getSeriesKey();
    054
    055    /**
    056     * Returns the series label that will be displayed in the legend.  Very
    057     * often this is the same as {@code getSeriesKey().toString()}, but
    058     * here we have the option to provide some alternative text.
    059     *
    060     * @return The label (never {@code null}).
    061     */
    062    String getLabel();
    063
    064    /**
    065     * Returns a longer description of the series (this could be used in
    066     * tooltips, for example).
    067     *
    068     * @return The description (possibly {@code null}).
    069     */
    070    String getDescription();
    071
    072    /**
    073     * Returns the shape used to represent the series in the legend.  This
    074     * may be {@code null}, in which case the legend builder should
    075     * use a default shape.
    076     *
    077     * @return The shape (possibly {@code null}).
    078     */
    079    Shape getShape();
    080
    081    /**
    082     * Returns the color used to represent a series.
    083     *
    084     * @return The color (never {@code null}).
    085     */
    086    Color getColor();
    087
    088    /**
    089     * A map containing other properties for the legend item.  Not currently
    090     * used, but available for future expansion.
    091     *
    092     * @return A map (never {@code null}).
    093     */
    094    Map<Comparable<?>, Object> getProperties();
    095
    096}