Optimized frame repainting. Fixed mouse click processing.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 22 Jul 2018 22:12:39 +0000 (01:12 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 22 Jul 2018 22:12:39 +0000 (01:12 +0300)
src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Cell.java

index 5817148..18f2d57 100755 (executable)
@@ -15,7 +15,7 @@ class Cell extends AbstractCompositeShape implements
     /**
      * cell visual size
      */
-    public static final int SIZE = 20;
+    static final int SIZE = 20;
     /**
      * Color of the active cell (R, G, B, A)
      */
@@ -98,18 +98,21 @@ class Cell extends AbstractCompositeShape implements
     }
 
     @Override
-    public void mouseClicked() {
+    public boolean mouseClicked() {
         setActive(!isActive());
+        return true;
     }
 
     @Override
-    public void mouseEntered() {
+    public boolean mouseEntered() {
         setMouseOver(true);
+        return true;
     }
 
     @Override
-    public void mouseExited() {
+    public boolean mouseExited() {
         setMouseOver(false);
+        return true;
     }
 
     private void setMouseOver(final boolean isMouseOver) {