Skip to content
Snippets Groups Projects
Commit 4f534b3b authored by Tim Molter's avatar Tim Molter
Browse files

refactor rename examples --> demo

parent 329f626b
No related branches found
No related tags found
No related merge requests found
Showing
with 17 additions and 14 deletions
......@@ -49,7 +49,7 @@
<modules>
<module>xchart</module>
<module>xchart-examples</module>
<module>xchart-demo</module>
</modules>
<dependencies>
......
......@@ -9,13 +9,12 @@
<version>1.3.0-SNAPSHOT</version>
</parent>
<artifactId>xchart-examples</artifactId>
<artifactId>xchart-demo</artifactId>
<!-- This version is tied to the version of the parent -->
<version>1.3.0-SNAPSHOT</version>
<name>XChart Examples</name>
<description>
</description>
<name>XChart Demo</name>
<description>A demonstration of various charts using XChart</description>
<dependencies>
<dependency>
......
......@@ -29,7 +29,7 @@ import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeSelectionModel;
import com.xeiam.xchart.XChartPanel;
import com.xeiam.xchart.demo.charts.Example10;
import com.xeiam.xchart.demo.charts.Example1;
import com.xeiam.xchart.demo.charts.Example2;
import com.xeiam.xchart.demo.charts.Example3;
import com.xeiam.xchart.demo.charts.Example4;
......@@ -77,7 +77,7 @@ public class XChartDemo extends JPanel implements TreeSelectionListener {
JScrollPane treeView = new JScrollPane(tree);
// Create Chart Panel
chartPanel = new XChartPanel(new Example10().getChart());
chartPanel = new XChartPanel(new Example1().getChart());
// Add the scroll panes to a split pane.
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
......@@ -111,6 +111,11 @@ public class XChartDemo extends JPanel implements TreeSelectionListener {
}
}
/**
* Create the tree
*
* @param top
*/
private void createNodes(DefaultMutableTreeNode top) {
// categories
......@@ -122,7 +127,7 @@ public class XChartDemo extends JPanel implements TreeSelectionListener {
category = new DefaultMutableTreeNode("Line Charts");
top.add(category);
chart = new DefaultMutableTreeNode(new ChartInfo("Example10 - Manual Data", new Example10().getChart()));
chart = new DefaultMutableTreeNode(new ChartInfo("Example1 - Manual Data", new Example1().getChart()));
category.add(chart);
chart = new DefaultMutableTreeNode(new ChartInfo("Example2 - Customized series style", new Example2().getChart()));
......
......@@ -24,15 +24,15 @@ import com.xeiam.xchart.SeriesMarker;
import com.xeiam.xchart.SwingWrapper;
/**
* Embed a Chart in a simple Swing application
* Manual Data
*
* @author timmolter
*/
public class Example10 implements ExampleChart {
public class Example1 implements ExampleChart {
public static void main(String[] args) {
ExampleChart exampleChart = new Example10();
ExampleChart exampleChart = new Example1();
Chart chart = exampleChart.getChart();
new SwingWrapper(chart).displayChart();
}
......@@ -74,7 +74,7 @@ public class Example10 implements ExampleChart {
Chart chart = new Chart(800, 600);
// Customize Chart
chart.setTitle("Example10");
chart.setTitle("Example1");
chart.setTitleVisible(false);
chart.setLegendVisible(false);
......
......@@ -14,7 +14,6 @@
<version>1.3.0-SNAPSHOT</version>
<name>XChart</name>
<description>
</description>
<description>The core XChart library</description>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment