summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-30 11:30:39 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-30 12:47:35 +0300
commitfd3826abf42f69db546eff18d269e462843feb49 (patch)
tree2852b77e657e90061842bc2d99dad09b36cd4150 /shared
parente71794ee177e309a4cba15ebd6b65d5950721dd7 (diff)
downloadvaadin-framework-fd3826abf42f69db546eff18d269e462843feb49.tar.gz
vaadin-framework-fd3826abf42f69db546eff18d269e462843feb49.zip
Replace ApplicationResource with ConnectorResource (#9419)
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ComponentConstants.java21
-rw-r--r--shared/src/com/vaadin/shared/ComponentState.java10
-rw-r--r--shared/src/com/vaadin/shared/communication/SharedState.java11
-rw-r--r--shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java12
-rw-r--r--shared/src/com/vaadin/shared/ui/link/LinkConstants.java23
-rw-r--r--shared/src/com/vaadin/shared/ui/video/VideoConstants.java21
-rw-r--r--shared/src/com/vaadin/shared/ui/video/VideoState.java10
7 files changed, 78 insertions, 30 deletions
diff --git a/shared/src/com/vaadin/shared/ComponentConstants.java b/shared/src/com/vaadin/shared/ComponentConstants.java
new file mode 100644
index 0000000000..6fea3f2dfd
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ComponentConstants.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.shared;
+
+public class ComponentConstants {
+ public static final String ICON_RESOURCE = "icon";
+}
diff --git a/shared/src/com/vaadin/shared/ComponentState.java b/shared/src/com/vaadin/shared/ComponentState.java
index 1b08f9b2d2..898114e1db 100644
--- a/shared/src/com/vaadin/shared/ComponentState.java
+++ b/shared/src/com/vaadin/shared/ComponentState.java
@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Set;
import com.vaadin.shared.communication.SharedState;
-import com.vaadin.shared.communication.URLReference;
/**
* Default shared state implementation for UI components.
@@ -40,7 +39,6 @@ public class ComponentState extends SharedState {
// string!
private String caption = null;
private boolean visible = true;
- private URLReference icon = null;
private List<String> styles = null;
private String id = null;
/**
@@ -265,14 +263,6 @@ public class ComponentState extends SharedState {
this.visible = visible;
}
- public URLReference getIcon() {
- return icon;
- }
-
- public void setIcon(URLReference icon) {
- this.icon = icon;
- }
-
/**
* Gets the style names for the component.
*
diff --git a/shared/src/com/vaadin/shared/communication/SharedState.java b/shared/src/com/vaadin/shared/communication/SharedState.java
index f9c9f642d0..f35d4675f3 100644
--- a/shared/src/com/vaadin/shared/communication/SharedState.java
+++ b/shared/src/com/vaadin/shared/communication/SharedState.java
@@ -17,6 +17,8 @@
package com.vaadin.shared.communication;
import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
import com.vaadin.shared.Connector;
@@ -48,6 +50,15 @@ import com.vaadin.shared.Connector;
*/
public class SharedState implements Serializable {
+ /**
+ * The automatically managed resources used by the connector.
+ *
+ * @see com.vaadin.terminal.AbstractClientConnector#setResource(String,
+ * com.vaadin.terminal.Resource)
+ * @see com.vaadin.terminal.gwt.client.ui.AbstractConnector#getResourceUrl(String)
+ */
+ public Map<String, URLReference> resources = new HashMap<String, URLReference>();
+
private boolean enabled = true;
/**
diff --git a/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java b/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java
index 96b785edd0..6422b643ad 100644
--- a/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java
+++ b/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java
@@ -1,20 +1,12 @@
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 static final String SOURCE_RESOURCE = "source";
- public URLReference getSource() {
- return source;
- }
-
- public void setSource(URLReference source) {
- this.source = source;
- }
+ private String alternateText;
public String getAlternateText() {
return alternateText;
diff --git a/shared/src/com/vaadin/shared/ui/link/LinkConstants.java b/shared/src/com/vaadin/shared/ui/link/LinkConstants.java
new file mode 100644
index 0000000000..61fc73577f
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/link/LinkConstants.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.shared.ui.link;
+
+import com.vaadin.shared.ComponentState;
+
+public class LinkConstants {
+ public static String HREF_RESOURCE = "href";
+}
diff --git a/shared/src/com/vaadin/shared/ui/video/VideoConstants.java b/shared/src/com/vaadin/shared/ui/video/VideoConstants.java
new file mode 100644
index 0000000000..951495b6af
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/video/VideoConstants.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.shared.ui.video;
+
+public class VideoConstants {
+ public static final String POSTER_RESOURCE = "poster";
+}
diff --git a/shared/src/com/vaadin/shared/ui/video/VideoState.java b/shared/src/com/vaadin/shared/ui/video/VideoState.java
index 695d495e16..2e6e24a743 100644
--- a/shared/src/com/vaadin/shared/ui/video/VideoState.java
+++ b/shared/src/com/vaadin/shared/ui/video/VideoState.java
@@ -15,18 +15,8 @@
*/
package com.vaadin.shared.ui.video;
-import com.vaadin.shared.communication.URLReference;
import com.vaadin.shared.ui.AbstractMediaState;
public class VideoState extends AbstractMediaState {
- private URLReference poster;
-
- public URLReference getPoster() {
- return poster;
- }
-
- public void setPoster(URLReference poster) {
- this.poster = poster;
- }
}