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.style;
034
035import java.awt.Color;
036import java.awt.Font;
037import java.awt.Shape;
038import java.awt.Stroke;
039import org.jfree.chart3d.Chart3D;
040import org.jfree.chart3d.table.RectanglePainter;
041
042/**
043 * A chart style provides styling attributes for a chart.  To apply a style
044 * to a chart, use the 
045 * {@link Chart3D#setStyle(org.jfree.chart3d.style.ChartStyle)} method.  See the 
046 * {@link ChartStyles} class for predefined styles.
047 * 
048 * @since 1.2
049 */
050public interface ChartStyle {
051    
052    /**
053     * Returns the painter that fills the background for the chart.
054     * 
055     * @return The painter (never {@code null}). 
056     */
057    RectanglePainter getBackgroundPainter();
058    
059    /**
060     * Returns the title font.
061     * 
062     * @return The title font (never {@code null}). 
063     */
064    Font getTitleFont();
065    
066    /**
067     * Returns the foreground color for the chart title.
068     * 
069     * @return The foreground color (never {@code null}). 
070     */
071    Color getTitleColor();
072    
073    /**
074     * Returns the background color for the chart title.
075     * 
076     * @return The background color for the chart title (never 
077     *     {@code null}).
078     */
079    Color getTitleBackgroundColor();
080    
081    /**
082     * Returns the subtitle font. 
083     * 
084     * @return The subtitle font (never {@code null}). 
085     */
086    Font getSubtitleFont();
087
088    /**
089     * Returns the foreground color for the chart subtitle.
090     * 
091     * @return The foreground color (never {@code null}). 
092     */
093    Color getSubtitleColor();
094    
095    /**
096     * Returns the background color for the chart subtitle.
097     * 
098     * @return The background color (never {@code null}). 
099     */
100    Color getSubtitleBackgroundColor();
101    
102    /**
103     * Returns the color for the chart box, if any.
104     * 
105     * @return The color for the chart box (never {@code null}). 
106     */
107    Color getChartBoxColor();
108    
109    /**
110     * Returns the flag that controls whether or not gridlines are drawn 
111     * perpendicular to the column axis in category plots.
112     * 
113     * @return A boolean. 
114     */
115    boolean getColumnAxisGridlinesVisible();
116    
117    /**
118     * Returns the flag that controls whether or not gridlines are drawn 
119     * perpendicular to the row axis in category plots.
120     * 
121     * @return A boolean. 
122     */
123    boolean getRowAxisGridlinesVisible();
124
125    /**
126     * Returns the flag that controls whether or not gridlines are drawn 
127     * perpendicular to the x-axis (or column axis).
128     * 
129     * @return A boolean. 
130     */
131    boolean getXAxisGridlinesVisible();
132    
133    /**
134     * Returns the flag that controls whether or not gridlines are drawn 
135     * perpendicular to the y-axis (or value axis).
136     * 
137     * @return A boolean. 
138     */
139    boolean getYAxisGridlinesVisible();
140    
141    /**
142     * Returns the flag that controls whether or not gridlines are drawn 
143     * perpendicular to the z-axis (or row axis).
144     * 
145     * @return A boolean. 
146     */
147    boolean getZAxisGridlinesVisible();
148    
149    /**
150     * Returns the color used to draw the gridlines.
151     * 
152     * @return The color (never {@code null}). 
153     */
154    Color getGridlineColor();
155    
156    /**
157     * Returns the stroke used to draw the gridlines.
158     * 
159     * @return The stroke (never {@code null}).
160     */
161    Stroke getGridlineStroke();
162    
163    /**
164     * Returns the font used for pie section labels.
165     * 
166     * @return The pie section label font (never {@code null}).
167     */
168    Font getSectionLabelFont();
169    
170    /**
171     * Returns the foreground color used for pie section labels.
172     * 
173     * @return The pie section label color (never {@code null}). 
174     */
175    Color getSectionLabelColor();
176    
177    /**
178     * Returns the standard colors for the style.
179     * 
180     * @return The standard colors (never {@code null}).
181     */
182    Color[] getStandardColors();
183    
184    /**
185     * Returns the axis label font.  The axis label is usually a description
186     * of what the axis represents.
187     * 
188     * @return The axis label font (never {@code null}). 
189     * 
190     * @see #getAxisTickLabelFont() 
191     */
192    Font getAxisLabelFont();
193    
194    /**
195     * Returns the foreground color for axis labels.
196     * 
197     * @return The foreground color (never {@code null}). 
198     */
199    Color getAxisLabelColor();
200    
201    /**
202     * Returns the axis tick label font.
203     * 
204     * @return The axis tick label font (never {@code null}).
205     * 
206     * @see #getAxisLabelFont() 
207     */
208    Font getAxisTickLabelFont();
209    
210    /**
211     * Returns the color used to draw the tick labels on the axis.
212     * 
213     * @return The color (never {@code null}).
214     */
215    Color getAxisTickLabelColor();
216    
217    /**
218     * Returns the legend header font.
219     * 
220     * @return The legend header font (never {@code null}). 
221     */
222    Font getLegendHeaderFont();
223   
224    /**
225     * Returns the foreground color for the legend header if there is one.
226     * 
227     * @return The color (never {@code null}). 
228     */
229    Color getLegendHeaderColor();
230    
231    /**
232     * Returns the background color for the legend header if there is one.
233     * 
234     * @return The color (never {@code null}). 
235     */
236    Color getLegendHeaderBackgroundColor();
237    
238    /**
239     * Returns the standard shape for legend items.
240     * 
241     * @return The legend shape (never {@code null}). 
242     */
243    Shape getLegendItemShape();
244    
245    /**
246     * Returns the legend item font.
247     * 
248     * @return The legend item font (never {@code null}). 
249     */
250    Font getLegendItemFont();
251    
252    /**
253     * Returns the foreground color for legend items.
254     * 
255     * @return The foreground color (never {@code null}).
256     */
257    Color getLegendItemColor();
258    
259    /**
260     * Returns the background color for legend items.
261     * 
262     * @return The background color (never {@code null}). 
263     */
264    Color getLegendItemBackgroundColor();
265    
266    /**
267     * Returns the legend footer font.
268     * 
269     * @return The legend footer font (never {@code null}). 
270     */
271    Font getLegendFooterFont();
272    
273    /**
274     * Returns the color used for the legend footer text (if any).
275     * 
276     * @return The color (never {@code null}). 
277     */
278    Color getLegendFooterColor();
279    
280    /**
281     * Returns the color used for the background of legend footer text (if any).
282     * 
283     * @return The color (never {@code null}). 
284     */
285    Color getLegendFooterBackgroundColor();
286    
287    /**
288     * Returns the font used to draw marker labels.
289     * 
290     * @return The font used to draw marker labels (never {@code null}).
291     */
292    Font getMarkerLabelFont();
293    
294    /**
295     * Returns the color for the marker labels.
296     * 
297     * @return The color for the marker labels (never {@code null}). 
298     */
299    Color getMarkerLabelColor();
300
301    /**
302     * Returns the stroke used to draw marker lines.
303     * 
304     * @return The stroke used to draw marker lines (never {@code null}).
305     */
306    Stroke getMarkerLineStroke();
307    
308    /**
309     * Returns the color used to draw marker lines.
310     * 
311     * @return The color used to draw marker lines (never {@code null}). 
312     */
313    Color getMarkerLineColor();
314    
315    /**
316     * Returns the color used to fill the band representing the marker range.
317     * 
318     * @return The fill color (never {@code null}). 
319     */
320    Color getMarkerFillColor();
321
322    /**
323     * Returns a clone of the chart style.
324     * 
325     * @return A clone (never {@code null}). 
326     */
327    ChartStyle clone();
328    
329    /**
330     * Registers a listener to receive notification of changes to the chart
331     * style.  Typically the chart registers with its style, and applies the
332     * style changes when it receives notification of any change.
333     * 
334     * @param listener  the listener ({@code null} not permitted). 
335     */
336    void addChangeListener(ChartStyleChangeListener listener);
337    
338    /**
339     * Deregisters a listener so that it no longer receives notification of
340     * chart changes.
341     * 
342     * @param listener  the listener ({@code null} not permitted). 
343     */
344    void removeChangeListener(ChartStyleChangeListener listener);
345
346}