40 | * Classes that implement this interface should also implement
41 | * {@code java.io.Serializable}, otherwise it will not be possible to
42 | * serialize and deserialize charts that use the non-serializable instance.
43 | */
44 | public interface XYZColorSource {
45 |
46 | /**
47 | * Returns the color for one item in the plot.
48 | *
49 | * @param series the series index.
50 | * @param item the item index.
51 | *
52 | * @return The color (never {@code null}).
53 | */
54 | Color getColor(int series, int item);
55 |
56 | /**
57 | * Returns the color that represents the specified series.
58 | *
59 | * @param series the series index.
60 | *
61 | * @return The color (never {@code null}).
62 | */
63 | Color getLegendColor(int series);
64 |
65 | /**
66 | * Restyles the source using the specified colors. Refer to the
67 | * implementing class to confirm the precise behaviour (typically all
68 | * existing color settings are cleared and the specified colors are
69 | * installed as the new defaults).
70 | *
71 | * @param colors the colors.
72 | *
73 | * @since 1.2
74 | */
75 | void style(Color... colors);
76 | }
77 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/renderer/xyz/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Renderers that can be used with the
3 | * {@link org.jfree.chart3d.plot.XYZPlot} class.
4 | */
5 | package org.jfree.chart3d.renderer.xyz;
6 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/style/ChartStyleChangeEvent.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * Orson Charts : a 3D chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C)opyright 2013-present, by David Gilbert. All rights reserved.
6 | *
7 | * https://github.com/jfree/orson-charts
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see
42 | * NOTE: This class is serializable, but the serialization format is subject
43 | * to change in future releases and should not be relied upon for persisting
44 | * instances of this class.
45 | *
46 | * @since 1.2
47 | */
48 | @SuppressWarnings("serial")
49 | public class ChartStyleChangeEvent extends EventObject {
50 |
51 | private ChartStyle style;
52 |
53 | /**
54 | * Creates a new event.
55 | *
56 | * @param style the style ({@code null} not permitted).
57 | */
58 | public ChartStyleChangeEvent(ChartStyle style) {
59 | this(style, style);
60 | }
61 |
62 | /**
63 | * Creates a new event.
64 | *
65 | * @param source the source.
66 | * @param style the style ({@code null} not permitted).
67 | */
68 | public ChartStyleChangeEvent(Object source, ChartStyle style) {
69 | super(source);
70 | Args.nullNotPermitted(style, "style");
71 | this.style = style;
72 | }
73 |
74 | /**
75 | * Returns the chart style that this event is associated with.
76 | *
77 | * @return The style (never {@code null}).
78 | */
79 | public ChartStyle getChartStyle () {
80 | return this.style;
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/style/ChartStyleChangeListener.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * Orson Charts : a 3D chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C)opyright 2013-present, by David Gilbert. All rights reserved.
6 | *
7 | * https://github.com/jfree/orson-charts
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see
42 | * The {@link Chart3D} class implements this interface so that it can
43 | * receive notification of changes to the chart style.
44 | *
45 | * @since 1.2
46 | */
47 | public interface ChartStyleChangeListener extends EventListener {
48 |
49 | /**
50 | * Called to inform that a chart change event has occurred.
51 | *
52 | * @param event the event.
53 | */
54 | void styleChanged(ChartStyleChangeEvent event);
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/style/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Classes for controlling chart styles.
3 | */
4 | package org.jfree.chart3d.style;
5 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/table/ContainerElement.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * Orson Charts : a 3D chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C)opyright 2013-present, by David Gilbert. All rights reserved.
6 | *
7 | * https://github.com/jfree/orson-charts
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see
43 | * NOTE: It is recommended that classes that implement this interface are
44 | * designed to be {@code Serializable} and immutable. Immutability is
45 | * desirable because painters are assigned to {@link Chart3D} instances, and
46 | * there is no change notification if the painter can be modified directly.
47 | * In addition, a single painter can be shared amongst multiple charts.
48 | */
49 | public interface RectanglePainter {
50 |
51 | /**
52 | * Fills the specified rectangle (where "fill" is some arbitrary drawing
53 | * operation defined by the class that implements this interface).
54 | *
55 | * @param g2 the graphics target ({@code null} not permitted).
56 | * @param bounds the rectangle ({@code null} not permitted).
57 | */
58 | void fill(Graphics2D g2, Rectangle2D bounds);
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/table/TableElementOnDraw.java:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * Orson Charts : a 3D chart library for the Java(tm) platform
3 | * ===========================================================
4 | *
5 | * (C)opyright 2013-present, by David Gilbert. All rights reserved.
6 | *
7 | * https://github.com/jfree/orson-charts
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see
30 | * This class is for internal use by Orson Charts, it is not
31 | * part of the supported API and you should not call it directly. If you need
32 | * JSON support in your project you should include JSON.simple
33 | * (https://code.google.com/p/json-simple/) or some other JSON library directly
34 | * in your project.
35 | */
36 | public interface JSONAware {
37 |
38 | /**
39 | * Returns a JSON string representing the object.
40 | *
41 | * @return A JSON string.
42 | */
43 | String toJSONString();
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/org/jfree/chart3d/util/json/JSONStreamAware.java:
--------------------------------------------------------------------------------
1 | /* ============
2 | * Orson Charts
3 | * ============
4 | *
5 | * (C)opyright 2013-present, by David Gilbert.
6 | *
7 | * https://github.com/jfree/orson-charts
8 | *
9 | * JSON.simple
10 | * -----------
11 | * The code in this file originates from the JSON.simple project by
12 | * FangYidong