diff --git a/src/rprocessing/RLangPApplet.java b/src/rprocessing/RLangPApplet.java index 218d17b..dff73ec 100644 --- a/src/rprocessing/RLangPApplet.java +++ b/src/rprocessing/RLangPApplet.java @@ -323,6 +323,26 @@ private boolean isMixMode() { return isSameClass(this.renjinEngine.get(Constant.SIZE_NAME), closureClass); } + /** + * + * @see processing.core.PApplet#focusGained() + */ + @Override + public void focusGained() { + super.focusGained(); + this.renjinEngine.put("focused",super.focused); + } + + /** + * + * @see processing.core.PApplet#focusLost() + */ + @Override + public void focusLost() { + super.focusLost(); + this.renjinEngine.put("focused",super.focused); + } + /** * Set Environment variables in R top context. */ diff --git a/src/rprocessing/applet/BuiltinApplet.java b/src/rprocessing/applet/BuiltinApplet.java index 0113949..64bb548 100644 --- a/src/rprocessing/applet/BuiltinApplet.java +++ b/src/rprocessing/applet/BuiltinApplet.java @@ -34,24 +34,4 @@ public boolean getFocused() { public double getPI() { return PI; } - - /** - * - * @see processing.core.PApplet#focusGained() - */ - @Override - public void focusGained() { - super.focusGained(); - this.renjinEngine.put("focused",super.focused); - } - - /** - * - * @see processing.core.PApplet#focusLost() - */ - @Override - public void focusLost() { - super.focusLost(); - this.renjinEngine.put("focused",super.focused); - } }