2 * Sixth 3D engine demos. Author: Svjatoslav Agejenko.
3 * This project is released under Creative Commons Zero (CC0) license.
7 package eu.svjatoslav.sixth.e3d.examples.launcher;
9 import eu.svjatoslav.sixth.e3d.examples.*;
12 import java.awt.event.ActionEvent;
14 class MenuPanel extends JPanel {
15 private static final long serialVersionUID = 2012721856427052560L;
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 ShowGameOfLife()));
27 sequentialGroup.addComponent(new JButton(new ShowRandomPolygons()));
30 private static class ShowTextEditors extends AbstractAction {
32 putValue(NAME, "Text editors");
36 public void actionPerformed(final ActionEvent e) {
37 TextEditorDemo.main(null);
42 private static class ShowRain extends AbstractAction {
44 putValue(NAME, "Raining numbers");
48 public void actionPerformed(final ActionEvent e) {
49 RainingNumbersDemo.main(null);
53 private static class ShowPointCloud extends AbstractAction {
55 putValue(NAME, "Pointcloud galaxy");
59 public void actionPerformed(final ActionEvent e) {
60 PointCloudDemo.main(null);
64 private static class ShowMathGraphs extends AbstractAction {
66 putValue(NAME, "Mathematical graphs");
70 public void actionPerformed(final ActionEvent e) {
75 private static class ShowRandomPolygons extends AbstractAction {
76 ShowRandomPolygons() {
77 putValue(NAME, "Random polygons");
81 public void actionPerformed(final ActionEvent e) {
82 RandomPolygonsDemo.main(null);
86 private static class ShowOctree extends AbstractAction {
88 putValue(NAME, "Volumetric Octree");
92 public void actionPerformed(final ActionEvent e) {
93 OctreeDemo.main(null);
97 private static class ShowGameOfLife extends AbstractAction {
99 putValue(NAME, "Game of Life");
103 public void actionPerformed(final ActionEvent e) {
104 eu.svjatoslav.sixth.e3d.examples.life.Main.main(null);