Removed ViewListener interface. Renamed View to ViewPanel.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 13 Jul 2018 21:56:06 +0000 (00:56 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 13 Jul 2018 21:56:06 +0000 (00:56 +0300)
src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/RandomPolygonsDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java
src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java

index 7bcaed7..e2ee634 100644 (file)
@@ -109,7 +109,7 @@ public class GraphDemo {
 
         final ViewFrame viewFrame = new ViewFrame();
 
-        final ShapeCollection geometryCollection = viewFrame.getView()
+        final ShapeCollection geometryCollection = viewFrame.getViewPanel()
                 .getContext().getRootShapeCollection();
 
         Point3D location = new Point3D(-600, -300, 0);
@@ -130,7 +130,7 @@ public class GraphDemo {
         location = new Point3D(600, 300, 0);
         geometryCollection.addShape(getFormula3Graph(location));
 
-        viewFrame.getView().getContext().getAvatar()
+        viewFrame.getViewPanel().getContext().getAvatar()
                 .setLocation(new Point3D(0, 0, -500));
 
     }
index 9b87aac..f5a9d08 100755 (executable)
@@ -90,7 +90,7 @@ public class OctreeDemo extends WorldNavigationTracker {
     private void init() {
 
         final ViewFrame viewFrame = new ViewFrame();
-        context = viewFrame.getView().getContext();
+        context = viewFrame.getViewPanel().getContext();
 
         context.getAvatar().setLocation(new Point3D(0, -30, -300));
 
@@ -125,7 +125,7 @@ public class OctreeDemo extends WorldNavigationTracker {
         shapeCollection.addShape(message);
 
         context.getKeyboardFocusTracker().setFocusOwner(this);
-        context.getView().repaintDuringNextViewUpdate();
+        context.getViewPanel().repaintDuringNextViewUpdate();
     }
 
     @Override
@@ -164,7 +164,7 @@ public class OctreeDemo extends WorldNavigationTracker {
 
         // initialize and start Raytracer in a separate thread
         final RayTracer rayTracer = new RayTracer(camera.getTexture(),
-                octreeVolume, lights, camera, context.getView());
+                octreeVolume, lights, camera, context.getViewPanel());
         final Thread thread = new Thread(rayTracer);
         thread.start();
     }
index ae3d5c7..63d1b38 100644 (file)
@@ -20,7 +20,7 @@ public class PointCloudDemo {
 
         final ViewFrame viewFrame = new ViewFrame();
 
-        final ShapeCollection geometryCollection = viewFrame.getView()
+        final ShapeCollection geometryCollection = viewFrame.getViewPanel()
                 .getContext().getRootShapeCollection();
 
         Transform transform = new Transform(new Point3D(0, -1000, 1000), 0, 0);
index ad26a8b..557d5ff 100644 (file)
@@ -56,7 +56,7 @@ public class RainingNumbersDemo implements ViewRenderListener {
     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();
@@ -76,6 +76,6 @@ public class RainingNumbersDemo implements ViewRenderListener {
             geometryCollection.addShape(textCanvas);
         }
 
-        viewFrame.getView().addViewUpdateListener(this);
+        viewFrame.getViewPanel().addViewUpdateListener(this);
     }
 }
index 5ff3bfd..7534148 100755 (executable)
@@ -61,7 +61,7 @@ public class RandomPolygonsDemo {
 
         final ViewFrame viewFrame = new ViewFrame();
 
-        final ShapeCollection shapeCollection = viewFrame.getView()
+        final ShapeCollection shapeCollection = viewFrame.getViewPanel()
                 .getContext().getRootShapeCollection();
 
         // add grid
index 22b9dee..d89486f 100755 (executable)
@@ -56,7 +56,7 @@ public class SphereDemo {
     public static void main(final String[] args) {
 
         final ViewFrame viewFrame = new ViewFrame();
-        final ViewContext context = viewFrame.getView().getContext();
+        final ViewContext context = viewFrame.getViewPanel().getContext();
 
         final ShapeCollection geometryCollection = context
                 .getRootShapeCollection();
index 7b19b10..ea2a867 100644 (file)
@@ -36,9 +36,9 @@ public class TextEditorDemo {
     public static void main(final String[] args) {
 
         final ViewFrame viewFrame = new ViewFrame();
-        final ViewContext viewContext = viewFrame.getView().getContext();
+        final ViewContext viewContext = viewFrame.getViewPanel().getContext();
 
-        final ShapeCollection shapeCollection = viewFrame.getView()
+        final ShapeCollection shapeCollection = viewFrame.getViewPanel()
                 .getContext().getRootShapeCollection();
 
         shapeCollection.addShape(createGrid());
index 8397d20..99fc3e1 100644 (file)
@@ -50,7 +50,7 @@ public class Main extends WorldNavigationTracker {
         // create application frame visible to the user
         final ViewFrame viewFrame = new ViewFrame();
 
-        final ShapeCollection shapeCollection = viewFrame.getView()
+        final ShapeCollection shapeCollection = viewFrame.getViewPanel()
                 .getContext().getRootShapeCollection();
 
         // add matrix
@@ -59,7 +59,7 @@ public class Main extends WorldNavigationTracker {
         // add wireframe grid (optional)
         shapeCollection.addShape(createGrid());
 
-        final ViewContext context = viewFrame.getView().getContext();
+        final ViewContext context = viewFrame.getViewPanel().getContext();
 
         setAvatarOrientation(context.getAvatar());
 
@@ -67,7 +67,7 @@ public class Main extends WorldNavigationTracker {
         context.getKeyboardFocusTracker().setFocusOwner(this);
 
         // Done! World is built. So ensure screen is updated too.
-        context.getView().repaintDuringNextViewUpdate();
+        context.getViewPanel().repaintDuringNextViewUpdate();
     }
 
     /**