Added screenshot for lots of text editors
[sixth-3d-demos.git] / src / main / java / eu / svjatoslav / sixth / e3d / examples / launcher / MenuPanel.java
1 /*
2  * Sixth 3D engine demos. Author: Svjatoslav Agejenko. 
3  * This project is released under Creative Commons Zero (CC0) license.
4  *
5 */
6
7 package eu.svjatoslav.sixth.e3d.examples.launcher;
8
9 import eu.svjatoslav.sixth.e3d.examples.*;
10
11 import javax.swing.*;
12 import java.awt.event.ActionEvent;
13
14 class MenuPanel extends JPanel {
15     private static final long serialVersionUID = 2012721856427052560L;
16
17     MenuPanel() {
18         final GroupLayout groupLayout = new GroupLayout(this);
19         GroupLayout.SequentialGroup sequentialGroup = groupLayout.createSequentialGroup();
20         sequentialGroup.addComponent(new JLabel("Choose an example to launch:"));
21         sequentialGroup.addComponent(new JButton(new ShowOctree()));
22         sequentialGroup.addComponent(new JButton(new ShowMathGraphs()));
23         sequentialGroup.addComponent(new JButton(new ShowPointCloud()));
24         sequentialGroup.addComponent(new JButton(new ShowRain()));
25         sequentialGroup.addComponent(new JButton(new ShowTextEditors()));
26         sequentialGroup.addComponent(new JButton(new ShowTextEditors2()));
27         sequentialGroup.addComponent(new JButton(new ShowGameOfLife()));
28         sequentialGroup.addComponent(new JButton(new ShowRandomPolygons()));
29     }
30
31     private static class ShowTextEditors extends AbstractAction {
32         ShowTextEditors() {
33             putValue(NAME, "Text editors");
34         }
35
36         @Override
37         public void actionPerformed(final ActionEvent e) {
38             TextEditorDemo.main(null);
39         }
40     }
41
42     private static class ShowTextEditors2 extends AbstractAction {
43         ShowTextEditors2() {
44             putValue(NAME, "Text editors city");
45         }
46
47         @Override
48         public void actionPerformed(final ActionEvent e) {
49             TextEditorDemo2.main(null);
50         }
51     }
52
53
54     private static class ShowRain extends AbstractAction {
55         ShowRain() {
56             putValue(NAME, "Raining numbers");
57         }
58
59         @Override
60         public void actionPerformed(final ActionEvent e) {
61             RainingNumbersDemo.main(null);
62         }
63     }
64
65     private static class ShowPointCloud extends AbstractAction {
66         ShowPointCloud() {
67             putValue(NAME, "Pointcloud galaxy");
68         }
69
70         @Override
71         public void actionPerformed(final ActionEvent e) {
72             PointCloudDemo.main(null);
73         }
74     }
75
76     private static class ShowMathGraphs extends AbstractAction {
77         ShowMathGraphs() {
78             putValue(NAME, "Mathematical graphs");
79         }
80
81         @Override
82         public void actionPerformed(final ActionEvent e) {
83             GraphDemo.main(null);
84         }
85     }
86
87     private static class ShowRandomPolygons extends AbstractAction {
88         ShowRandomPolygons() {
89             putValue(NAME, "Random polygons");
90         }
91
92         @Override
93         public void actionPerformed(final ActionEvent e) {
94             RandomPolygonsDemo.main(null);
95         }
96     }
97
98     private static class ShowOctree extends AbstractAction {
99         ShowOctree() {
100             putValue(NAME, "Volumetric Octree");
101         }
102
103         @Override
104         public void actionPerformed(final ActionEvent e) {
105             OctreeDemo.main(null);
106         }
107     }
108
109     private static class ShowGameOfLife extends AbstractAction {
110         ShowGameOfLife() {
111             putValue(NAME, "Game of Life");
112         }
113
114         @Override
115         public void actionPerformed(final ActionEvent e) {
116             eu.svjatoslav.sixth.e3d.examples.life.Main.main(null);
117         }
118     }
119
120 }