summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-08-28 09:41:55 +0300
committerJohn Ahlroos <john@vaadin.com>2012-08-28 09:41:55 +0300
commit435a2e735251464529f8329b0563c26d5b4cc6a9 (patch)
tree8bde89594f6b258f087a8518265418a02800cea2 /shared
parent7b9e1566d6e36c10aef3566b20267449586a81cb (diff)
parentc6d43cc88fb0ef4853e07be54fc76a6aa1dc9e23 (diff)
downloadvaadin-framework-435a2e735251464529f8329b0563c26d5b4cc6a9.tar.gz
vaadin-framework-435a2e735251464529f8329b0563c26d5b4cc6a9.zip
Merge branch 'master' into layoutgraph
Conflicts: tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ApplicationConstants.java6
-rw-r--r--shared/src/com/vaadin/shared/Version.java4
-rw-r--r--shared/src/com/vaadin/shared/annotations/DelegateToWidget.java25
-rw-r--r--shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java27
-rw-r--r--shared/src/com/vaadin/shared/ui/AbstractMediaState.java4
-rw-r--r--shared/src/com/vaadin/shared/ui/embeddedbrowser/EmbeddedBrowserState.java7
-rw-r--r--shared/src/com/vaadin/shared/ui/flash/FlashState.java68
-rw-r--r--shared/src/com/vaadin/shared/ui/image/ImageServerRpc.java8
-rw-r--r--shared/src/com/vaadin/shared/ui/image/ImageState.java7
-rw-r--r--shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java5
-rw-r--r--shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java14
-rw-r--r--shared/src/com/vaadin/shared/ui/slider/SliderState.java60
-rw-r--r--shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java3
-rw-r--r--shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java3
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/PageClientRpc.java (renamed from shared/src/com/vaadin/shared/ui/root/PageClientRpc.java)2
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/UIConstants.java (renamed from shared/src/com/vaadin/shared/ui/root/RootConstants.java)9
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java (renamed from shared/src/com/vaadin/shared/ui/root/RootServerRpc.java)4
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/UIState.java (renamed from shared/src/com/vaadin/shared/ui/root/RootState.java)4
18 files changed, 247 insertions, 13 deletions
diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java
index 31e633a210..0bacd2d256 100644
--- a/shared/src/com/vaadin/shared/ApplicationConstants.java
+++ b/shared/src/com/vaadin/shared/ApplicationConstants.java
@@ -23,16 +23,14 @@ public class ApplicationConstants {
public static final String UIDL_REQUEST_PATH = "UIDL/";
+ public static final String HEARTBEAT_REQUEST_PATH = "HEARTBEAT/";
+
public static final String CONNECTOR_RESOURCE_PREFIX = APP_REQUEST_PATH
+ "CONNECTOR";
public static final String APP_PROTOCOL_PREFIX = "app://";
public static final String CONNECTOR_PROTOCOL_PREFIX = "connector://";
public static final String UIDL_SECURITY_TOKEN_ID = "Vaadin-Security-Key";
- /**
- * Name of the parameter used to transmit root ids back and forth
- */
- public static final String ROOT_ID_PARAMETER = "rootId";
public static final String PARAM_UNLOADBURST = "onunloadburst";
diff --git a/shared/src/com/vaadin/shared/Version.java b/shared/src/com/vaadin/shared/Version.java
index 9320698318..16f466fc6e 100644
--- a/shared/src/com/vaadin/shared/Version.java
+++ b/shared/src/com/vaadin/shared/Version.java
@@ -47,10 +47,10 @@ public class Version implements Serializable {
/* Initialize version numbers from string replaced by build-script. */
static {
- if ("7.0.0.dev-20120816-12".equals("@" + "VERSION" + "@")) {
+ if ("@VERSION@".equals("@" + "VERSION" + "@")) {
VERSION = "9.9.9.INTERNAL-DEBUG-BUILD";
} else {
- VERSION = "7.0.0.dev-20120816-12";
+ VERSION = "@VERSION@";
}
final String[] digits = VERSION.split("\\.", 4);
VERSION_MAJOR = Integer.parseInt(digits[0]);
diff --git a/shared/src/com/vaadin/shared/annotations/DelegateToWidget.java b/shared/src/com/vaadin/shared/annotations/DelegateToWidget.java
new file mode 100644
index 0000000000..0ac16ecea9
--- /dev/null
+++ b/shared/src/com/vaadin/shared/annotations/DelegateToWidget.java
@@ -0,0 +1,25 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.shared.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.METHOD, ElementType.FIELD })
+public @interface DelegateToWidget {
+ public String value() default "";
+
+ public static class Helper {
+ public static String getDelegateTarget(String propertyName,
+ String annotationValue) {
+ String name = annotationValue;
+ if (name.isEmpty()) {
+ name = "set" + Character.toUpperCase(propertyName.charAt(0))
+ + propertyName.substring(1);
+ }
+ return name;
+ }
+ }
+}
diff --git a/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java b/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java
new file mode 100644
index 0000000000..96b785edd0
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java
@@ -0,0 +1,27 @@
+package com.vaadin.shared.ui;
+
+import com.vaadin.shared.ComponentState;
+import com.vaadin.shared.communication.URLReference;
+
+public class AbstractEmbeddedState extends ComponentState {
+
+ protected URLReference source;
+ protected String alternateText;
+
+ public URLReference getSource() {
+ return source;
+ }
+
+ public void setSource(URLReference source) {
+ this.source = source;
+ }
+
+ public String getAlternateText() {
+ return alternateText;
+ }
+
+ public void setAlternateText(String alternateText) {
+ this.alternateText = alternateText;
+ }
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/AbstractMediaState.java b/shared/src/com/vaadin/shared/ui/AbstractMediaState.java
index 2731529caf..80d41dd797 100644
--- a/shared/src/com/vaadin/shared/ui/AbstractMediaState.java
+++ b/shared/src/com/vaadin/shared/ui/AbstractMediaState.java
@@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.List;
import com.vaadin.shared.ComponentState;
+import com.vaadin.shared.annotations.DelegateToWidget;
import com.vaadin.shared.communication.URLReference;
public class AbstractMediaState extends ComponentState {
@@ -39,6 +40,7 @@ public class AbstractMediaState extends ComponentState {
return showControls;
}
+ @DelegateToWidget("setControls")
public void setShowControls(boolean showControls) {
this.showControls = showControls;
}
@@ -63,6 +65,7 @@ public class AbstractMediaState extends ComponentState {
return autoplay;
}
+ @DelegateToWidget
public void setAutoplay(boolean autoplay) {
this.autoplay = autoplay;
}
@@ -71,6 +74,7 @@ public class AbstractMediaState extends ComponentState {
return muted;
}
+ @DelegateToWidget
public void setMuted(boolean muted) {
this.muted = muted;
}
diff --git a/shared/src/com/vaadin/shared/ui/embeddedbrowser/EmbeddedBrowserState.java b/shared/src/com/vaadin/shared/ui/embeddedbrowser/EmbeddedBrowserState.java
new file mode 100644
index 0000000000..cca47176a3
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/embeddedbrowser/EmbeddedBrowserState.java
@@ -0,0 +1,7 @@
+package com.vaadin.shared.ui.embeddedbrowser;
+
+import com.vaadin.shared.ui.AbstractEmbeddedState;
+
+public class EmbeddedBrowserState extends AbstractEmbeddedState {
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/flash/FlashState.java b/shared/src/com/vaadin/shared/ui/flash/FlashState.java
new file mode 100644
index 0000000000..2d33d1a711
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/flash/FlashState.java
@@ -0,0 +1,68 @@
+package com.vaadin.shared.ui.flash;
+
+import java.util.Map;
+
+import com.vaadin.shared.ui.AbstractEmbeddedState;
+
+public class FlashState extends AbstractEmbeddedState {
+
+ protected String classId;
+
+ protected String codebase;
+
+ protected String codetype;
+
+ protected String archive;
+
+ protected String standby;
+
+ protected Map<String, String> embedParams;
+
+ public String getClassId() {
+ return classId;
+ }
+
+ public void setClassId(String classId) {
+ this.classId = classId;
+ }
+
+ public String getCodebase() {
+ return codebase;
+ }
+
+ public void setCodebase(String codeBase) {
+ codebase = codebase;
+ }
+
+ public String getCodetype() {
+ return codetype;
+ }
+
+ public void setCodetype(String codetype) {
+ this.codetype = codetype;
+ }
+
+ public String getArchive() {
+ return archive;
+ }
+
+ public void setArchive(String archive) {
+ this.archive = archive;
+ }
+
+ public String getStandby() {
+ return standby;
+ }
+
+ public void setStandby(String standby) {
+ this.standby = standby;
+ }
+
+ public Map<String, String> getEmbedParams() {
+ return embedParams;
+ }
+
+ public void setEmbedParams(Map<String, String> embedParams) {
+ this.embedParams = embedParams;
+ }
+}
diff --git a/shared/src/com/vaadin/shared/ui/image/ImageServerRpc.java b/shared/src/com/vaadin/shared/ui/image/ImageServerRpc.java
new file mode 100644
index 0000000000..aa48f10e5b
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/image/ImageServerRpc.java
@@ -0,0 +1,8 @@
+package com.vaadin.shared.ui.image;
+
+import com.vaadin.shared.communication.ServerRpc;
+import com.vaadin.shared.ui.ClickRpc;
+
+public interface ImageServerRpc extends ClickRpc, ServerRpc {
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/image/ImageState.java b/shared/src/com/vaadin/shared/ui/image/ImageState.java
new file mode 100644
index 0000000000..4296c76847
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/image/ImageState.java
@@ -0,0 +1,7 @@
+package com.vaadin.shared.ui.image;
+
+import com.vaadin.shared.ui.AbstractEmbeddedState;
+
+public class ImageState extends AbstractEmbeddedState {
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java b/shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java
new file mode 100644
index 0000000000..d130550946
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java
@@ -0,0 +1,5 @@
+package com.vaadin.shared.ui.slider;
+
+public enum SliderOrientation {
+ HORIZONTAL, VERTICAL;
+}
diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java b/shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java
new file mode 100644
index 0000000000..6ea02f0a95
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java
@@ -0,0 +1,14 @@
+package com.vaadin.shared.ui.slider;
+
+import com.vaadin.shared.communication.ServerRpc;
+
+public interface SliderServerRpc extends ServerRpc {
+
+ /**
+ * Invoked when the value of a variable has changed. Slider listeners are
+ * notified if the slider value has changed.
+ *
+ * @param value
+ */
+ public void valueChanged(double value);
+}
diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderState.java b/shared/src/com/vaadin/shared/ui/slider/SliderState.java
new file mode 100644
index 0000000000..98168b80af
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/slider/SliderState.java
@@ -0,0 +1,60 @@
+package com.vaadin.shared.ui.slider;
+
+import com.vaadin.shared.AbstractFieldState;
+
+public class SliderState extends AbstractFieldState {
+
+ protected double value;
+
+ protected double maxValue;
+ protected double minValue;
+
+ /**
+ * The number of fractional digits that are considered significant. Must be
+ * non-negative.
+ */
+ protected int resolution;
+
+ protected SliderOrientation orientation;
+
+ public double getValue() {
+ return value;
+ }
+
+ public void setValue(double value) {
+ this.value = value;
+ }
+
+ public double getMaxValue() {
+ return maxValue;
+ }
+
+ public void setMaxValue(double maxValue) {
+ this.maxValue = maxValue;
+ }
+
+ public double getMinValue() {
+ return minValue;
+ }
+
+ public void setMinValue(double minValue) {
+ this.minValue = minValue;
+ }
+
+ public int getResolution() {
+ return resolution;
+ }
+
+ public void setResolution(int resolution) {
+ this.resolution = resolution;
+ }
+
+ public SliderOrientation getOrientation() {
+ return orientation;
+ }
+
+ public void setOrientation(SliderOrientation orientation) {
+ this.orientation = orientation;
+ }
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
index 46eb851edd..71f789b70d 100644
--- a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
+++ b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
@@ -19,6 +19,7 @@ import java.io.Serializable;
import com.vaadin.shared.ComponentState;
import com.vaadin.shared.Connector;
+import com.vaadin.shared.annotations.DelegateToWidget;
public class AbstractSplitPanelState extends ComponentState {
@@ -120,6 +121,7 @@ public class AbstractSplitPanelState extends ComponentState {
return positionReversed;
}
+ @DelegateToWidget
public void setPositionReversed(boolean positionReversed) {
this.positionReversed = positionReversed;
}
@@ -128,6 +130,7 @@ public class AbstractSplitPanelState extends ComponentState {
return locked;
}
+ @DelegateToWidget
public void setLocked(boolean locked) {
this.locked = locked;
}
diff --git a/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java b/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java
index 31cec77554..50dc1393a3 100644
--- a/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java
+++ b/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java
@@ -15,6 +15,7 @@
*/
package com.vaadin.shared.ui.textarea;
+import com.vaadin.shared.annotations.DelegateToWidget;
import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
public class TextAreaState extends AbstractTextFieldState {
@@ -33,6 +34,7 @@ public class TextAreaState extends AbstractTextFieldState {
return rows;
}
+ @DelegateToWidget
public void setRows(int rows) {
this.rows = rows;
}
@@ -41,6 +43,7 @@ public class TextAreaState extends AbstractTextFieldState {
return wordwrap;
}
+ @DelegateToWidget
public void setWordwrap(boolean wordwrap) {
this.wordwrap = wordwrap;
}
diff --git a/shared/src/com/vaadin/shared/ui/root/PageClientRpc.java b/shared/src/com/vaadin/shared/ui/ui/PageClientRpc.java
index b7d9419057..a3cbc10cf6 100644
--- a/shared/src/com/vaadin/shared/ui/root/PageClientRpc.java
+++ b/shared/src/com/vaadin/shared/ui/ui/PageClientRpc.java
@@ -14,7 +14,7 @@
* the License.
*/
-package com.vaadin.shared.ui.root;
+package com.vaadin.shared.ui.ui;
import com.vaadin.shared.communication.ClientRpc;
diff --git a/shared/src/com/vaadin/shared/ui/root/RootConstants.java b/shared/src/com/vaadin/shared/ui/ui/UIConstants.java
index 34c17ac71f..76413628a4 100644
--- a/shared/src/com/vaadin/shared/ui/root/RootConstants.java
+++ b/shared/src/com/vaadin/shared/ui/ui/UIConstants.java
@@ -13,9 +13,9 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package com.vaadin.shared.ui.root;
+package com.vaadin.shared.ui.ui;
-public class RootConstants {
+public class UIConstants {
/**
* Attribute name for the lazy resize setting .
*/
@@ -41,4 +41,9 @@ public class RootConstants {
@Deprecated
public static final String ATTRIBUTE_NOTIFICATION_DELAY = "delay";
+ /**
+ * Name of the parameter used to transmit UI ids back and forth
+ */
+ public static final String UI_ID_PARAMETER = "uiId";
+
}
diff --git a/shared/src/com/vaadin/shared/ui/root/RootServerRpc.java b/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java
index df2031f7d5..ef28a12415 100644
--- a/shared/src/com/vaadin/shared/ui/root/RootServerRpc.java
+++ b/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java
@@ -13,13 +13,13 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package com.vaadin.shared.ui.root;
+package com.vaadin.shared.ui.ui;
import com.vaadin.shared.annotations.Delayed;
import com.vaadin.shared.communication.ServerRpc;
import com.vaadin.shared.ui.ClickRpc;
-public interface RootServerRpc extends ClickRpc, ServerRpc {
+public interface UIServerRpc extends ClickRpc, ServerRpc {
@Delayed(lastonly = true)
public void resize(int viewWidth, int viewHeight, int windowWidth,
int windowHeight);
diff --git a/shared/src/com/vaadin/shared/ui/root/RootState.java b/shared/src/com/vaadin/shared/ui/ui/UIState.java
index b7c2c88ce5..01426bd8f3 100644
--- a/shared/src/com/vaadin/shared/ui/root/RootState.java
+++ b/shared/src/com/vaadin/shared/ui/ui/UIState.java
@@ -13,12 +13,12 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package com.vaadin.shared.ui.root;
+package com.vaadin.shared.ui.ui;
import com.vaadin.shared.ComponentState;
import com.vaadin.shared.Connector;
-public class RootState extends ComponentState {
+public class UIState extends ComponentState {
private Connector content;
public Connector getContent() {