Removed ViewListener interface. Renamed View to ViewPanel.
[sixth-3d-demos.git] / src / main / java / eu / svjatoslav / sixth / e3d / examples / RainingNumbersDemo.java
index 5ffc730..557d5ff 100644 (file)
@@ -1,7 +1,6 @@
 /*
- * Sixth - System for data storage, computation, exploration and interaction.
- * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ * Sixth 3D engine demos. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General Public License
  * or later as published by the Free Software Foundation.
 package eu.svjatoslav.sixth.e3d.examples;
 
 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.geometry.Transform;
+import eu.svjatoslav.sixth.e3d.math.Transform;
 import eu.svjatoslav.sixth.e3d.gui.ViewContext;
 import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
-import eu.svjatoslav.sixth.e3d.gui.ViewUpdateListener;
+import eu.svjatoslav.sixth.e3d.gui.ViewRenderListener;
 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
 import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape;
@@ -23,7 +22,7 @@ import java.io.IOException;
 import java.util.Collection;
 import java.util.Random;
 
-public class RainingNumbersDemo implements ViewUpdateListener {
+public class RainingNumbersDemo implements ViewRenderListener {
 
     private static final int NUMBERS_COUNT = 1000;
     private final static int AREA = 600;
@@ -34,8 +33,8 @@ public class RainingNumbersDemo implements ViewUpdateListener {
     }
 
     @Override
-    public boolean beforeViewUpdate(final ViewContext viewContext,
-                                    final int millisecondsSinceLastFrame) {
+    public boolean beforeRender(final ViewContext viewContext,
+                                final int millisecondsSinceLastFrame) {
 
         final Collection<AbstractShape> shapes = viewContext
                 .getRootShapeCollection().getShapes();
@@ -57,7 +56,7 @@ public class RainingNumbersDemo implements ViewUpdateListener {
     private void run() throws IOException {
         final ViewFrame viewFrame = new ViewFrame();
 
-        final ShapeCollection geometryCollection = viewFrame.getView()
+        final ShapeCollection geometryCollection = viewFrame.getViewPanel()
                 .getContext().getRootShapeCollection();
 
         Random random = new Random();
@@ -77,6 +76,6 @@ public class RainingNumbersDemo implements ViewUpdateListener {
             geometryCollection.addShape(textCanvas);
         }
 
-        viewFrame.getView().addViewUpdateListener(this);
+        viewFrame.getViewPanel().addViewUpdateListener(this);
     }
 }