From bccb2a4fb28a598bc307b73e55a3d8686a3f944e Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Sun, 22 Jul 2018 23:36:06 +0300 Subject: [PATCH] Code refactoring. --- .../java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java | 6 +++--- .../java/eu/svjatoslav/sixth/e3d/examples/life/Main.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java index dd5ea4b..706935c 100755 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java @@ -11,7 +11,7 @@ package eu.svjatoslav.sixth.e3d.examples; import eu.svjatoslav.sixth.e3d.geometry.Point3D; import eu.svjatoslav.sixth.e3d.gui.ViewFrame; import eu.svjatoslav.sixth.e3d.gui.ViewPanel; -import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker; +import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationUserInputTracker; import eu.svjatoslav.sixth.e3d.math.Transform; import eu.svjatoslav.sixth.e3d.renderer.octree.OctreeVolume; import eu.svjatoslav.sixth.e3d.renderer.octree.raytracer.Camera; @@ -29,7 +29,7 @@ import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.Grid3D import java.awt.event.KeyEvent; import java.util.Vector; -public class OctreeDemo extends WorldNavigationTracker { +public class OctreeDemo extends WorldNavigationUserInputTracker { private static final double magnification = 5; private final LineAppearance gridAppearance = new LineAppearance(40, new Color(255, @@ -124,7 +124,7 @@ public class OctreeDemo extends WorldNavigationTracker { Color.WHITE, Color.PURPLE); shapeCollection.addShape(message); - viewPanel.getKeyboardFocusTracker().setFocusOwner(this); + viewPanel.getKeyboardFocusStack().pushFocusOwner(this); viewPanel.repaintDuringNextViewUpdate(); } diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java index 47698df..afc0e1c 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java @@ -5,7 +5,7 @@ import eu.svjatoslav.sixth.e3d.geometry.Rectangle; import eu.svjatoslav.sixth.e3d.gui.Avatar; import eu.svjatoslav.sixth.e3d.gui.ViewFrame; import eu.svjatoslav.sixth.e3d.gui.ViewPanel; -import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker; +import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationUserInputTracker; import eu.svjatoslav.sixth.e3d.math.Transform; import eu.svjatoslav.sixth.e3d.renderer.raster.Color; import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; @@ -15,7 +15,7 @@ import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.Grid2D import java.awt.event.KeyEvent; -public class Main extends WorldNavigationTracker { +public class Main extends WorldNavigationUserInputTracker { private static final Matrix MATRIX = new Matrix( new Point3D() // position matrix in the center of the scene @@ -65,7 +65,7 @@ public class Main extends WorldNavigationTracker { setAvatarOrientation(viewPanel.getAvatar()); // enable receiving of keyboard events - viewPanel.getKeyboardFocusTracker().setFocusOwner(this); + viewPanel.getKeyboardFocusStack().pushFocusOwner(this); // Done! World is built. So ensure screen is updated too. viewPanel.repaintDuringNextViewUpdate(); -- 2.20.1