summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/JavascriptExtension.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/JavascriptExtension.java')
-rw-r--r--src/com/vaadin/terminal/gwt/client/JavascriptExtension.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/JavascriptExtension.java b/src/com/vaadin/terminal/gwt/client/JavascriptExtension.java
new file mode 100644
index 0000000000..6c098a52f6
--- /dev/null
+++ b/src/com/vaadin/terminal/gwt/client/JavascriptExtension.java
@@ -0,0 +1,33 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.terminal.gwt.client;
+
+import com.vaadin.terminal.AbstractJavascriptExtension;
+import com.vaadin.terminal.gwt.client.communication.HasJavascriptConnectorHelper;
+import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
+import com.vaadin.terminal.gwt.client.ui.AbstractConnector;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+
+@Connect(AbstractJavascriptExtension.class)
+public class JavascriptExtension extends AbstractConnector implements
+ HasJavascriptConnectorHelper {
+ private final JavascriptConnectorHelper helper = new JavascriptConnectorHelper(
+ this);
+
+ @Override
+ protected void init() {
+ helper.init();
+ }
+
+ @Override
+ public void onStateChanged(StateChangeEvent stateChangeEvent) {
+ super.onStateChanged(stateChangeEvent);
+ helper.fireNativeStateChange();
+ }
+
+ public JavascriptConnectorHelper getJavascriptConnectorHelper() {
+ return helper;
+ }
+}