diff options
author | John Ahlroos <john@vaadin.com> | 2012-08-31 10:10:03 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-08-31 10:10:03 +0300 |
commit | 340cd7899812b444941584d383d930fe8155159b (patch) | |
tree | 5989b22f0db52cd578aad087afc9f9fe4d63fb9d /shared | |
parent | 8b546f207714a663d4e2996f514cdc077cc9dafc (diff) | |
parent | 7b25b3886ea95bc6495506fbe9472e45fcbde684 (diff) | |
download | vaadin-framework-340cd7899812b444941584d383d930fe8155159b.tar.gz vaadin-framework-340cd7899812b444941584d383d930fe8155159b.zip |
Merge branch 'master' into layoutgraph
Conflicts:
client/src/com/vaadin/client/ComponentLocator.java
client/src/com/vaadin/client/ui/AbstractComponentConnector.java
Diffstat (limited to 'shared')
13 files changed, 103 insertions, 59 deletions
diff --git a/shared/src/com/vaadin/shared/AbstractFieldState.java b/shared/src/com/vaadin/shared/AbstractFieldState.java index 0389507f6c..02cbd16a6f 100644 --- a/shared/src/com/vaadin/shared/AbstractFieldState.java +++ b/shared/src/com/vaadin/shared/AbstractFieldState.java @@ -131,7 +131,7 @@ public class AbstractFieldState extends ComponentState implements TabIndexState /* * (non-Javadoc) * - * @see com.vaadin.terminal.gwt.client.ComponentState#getTabIndex() + * @see com.vaadin.client.ComponentState#getTabIndex() */ @Override public int getTabIndex() { @@ -141,7 +141,7 @@ public class AbstractFieldState extends ComponentState implements TabIndexState /* * (non-Javadoc) * - * @see com.vaadin.terminal.gwt.client.ui.TabIndexState#setTabIndex(int) + * @see com.vaadin.client.ui.TabIndexState#setTabIndex(int) */ @Override public void setTabIndex(int tabIndex) { 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 41bddd4666..06330a8604 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; /** @@ -175,7 +173,7 @@ public class ComponentState extends SharedState { /** * Returns true if the component is in immediate mode. * - * @see com.vaadin.terminal.VariableOwner#isImmediate() + * @see com.vaadin.server.VariableOwner#isImmediate() * * @return true if the component is in immediate mode */ @@ -186,7 +184,7 @@ public class ComponentState extends SharedState { /** * Sets or resets the immediate mode for a component. * - * @see com.vaadin.terminal.VariableOwner#setImmediate() + * @see com.vaadin.server.VariableOwner#setImmediate() * * @param immediate * new mode for the component @@ -285,14 +283,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/Connector.java b/shared/src/com/vaadin/shared/Connector.java index 5927d08d79..f3d5d16e59 100644 --- a/shared/src/com/vaadin/shared/Connector.java +++ b/shared/src/com/vaadin/shared/Connector.java @@ -29,9 +29,8 @@ import java.io.Serializable; * <p> * No classes should implement this interface directly, client side classes * wanting to communicate with server side should implement - * {@link com.vaadin.terminal.gwt.client.ServerConnector} and server side - * classes should implement - * {@link com.vaadin.terminal.gwt.server.ClientConnector}. + * {@link com.vaadin.client.ServerConnector} and server side classes should + * implement {@link com.vaadin.server.ClientConnector}. * </p> * * @author Vaadin Ltd diff --git a/shared/src/com/vaadin/shared/VBrowserDetails.java b/shared/src/com/vaadin/shared/VBrowserDetails.java index 2e81fbfe61..2143e884c0 100644 --- a/shared/src/com/vaadin/shared/VBrowserDetails.java +++ b/shared/src/com/vaadin/shared/VBrowserDetails.java @@ -20,9 +20,8 @@ import java.io.Serializable; /** * Class that parses the user agent string from the browser and provides * information about the browser. Used internally by - * {@link com.vaadin.terminal.gwt.client.BrowserInfo} and - * {@link com.vaadin.terminal.gwt.server.WebBrowser}. Should not be used - * directly. + * {@link com.vaadin.client.BrowserInfo} and + * {@link com.vaadin.server.WebBrowser}. Should not be used directly. * * @author Vaadin Ltd. * @since 6.3 diff --git a/shared/src/com/vaadin/shared/communication/SharedState.java b/shared/src/com/vaadin/shared/communication/SharedState.java index 841e4579a2..09147ac97d 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; @@ -36,9 +38,9 @@ import com.vaadin.shared.Connector; * arrays of these. * * On the client side the connector should override - * {@link com.vaadin.terminal.gwt.client.ui.AbstractConnector#getState()} to - * return the correct state type. This automatically causes a correct state - * object to be created. + * {@link com.vaadin.client.ui.AbstractConnector#getState()} to return the + * correct state type. This automatically causes a correct state object to be + * created. * * Subclasses of a {@link Connector} using shared state should also provide a * subclass of the shared state class of the parent class to extend the state. A @@ -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/Connect.java b/shared/src/com/vaadin/shared/ui/Connect.java index d54374a0ec..c7a55775bd 100644 --- a/shared/src/com/vaadin/shared/ui/Connect.java +++ b/shared/src/com/vaadin/shared/ui/Connect.java @@ -25,7 +25,7 @@ import com.vaadin.shared.Connector; /** * Annotation defining the server side connector that this ClientSideConnector * should connect to. The value must always by a class extending - * {@link com.vaadin.terminal.gwt.server.ClientConnector}. + * {@link com.vaadin.server.ClientConnector}. * <p> * With this annotation client side Vaadin connector is marked to have a server * side counterpart. The value of the annotation is the class of server side @@ -46,9 +46,8 @@ public @interface Connect { * Depending on the used WidgetMap generator, these optional hints may be * used to define how the client side components are loaded by the browser. * The default is to eagerly load all widgets - * {@link com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator}, - * but if the - * {@link com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator} is used + * {@link com.vaadin.server.widgetsetutils.EagerWidgetMapGenerator}, but if + * the {@link com.vaadin.server.widgetsetutils.WidgetMapGenerator} is used * by the widgetset, these load style hints are respected. * <p> * Lazy loading of a widget implementation means the client side component @@ -69,15 +68,14 @@ public @interface Connect { * the best of both worlds. * <p> * Fine tunings to widget loading can also be made by overriding - * {@link com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator} in the - * GWT module. Tunings might be helpful if the end users have slow - * connections and especially if they have high latency in their network. - * The - * {@link com.vaadin.terminal.gwt.widgetsetutils.CustomWidgetMapGenerator} - * is an abstract generator implementation for easy customization. Vaadin - * package also includes - * {@link com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator} - * that makes as many widgets lazily loaded as possible. + * {@link com.vaadin.server.widgetsetutils.WidgetMapGenerator} in the GWT + * module. Tunings might be helpful if the end users have slow connections + * and especially if they have high latency in their network. The + * {@link com.vaadin.server.widgetsetutils.CustomWidgetMapGenerator} is an + * abstract generator implementation for easy customization. Vaadin package + * also includes + * {@link com.vaadin.server.widgetsetutils.LazyWidgetMapGenerator} that + * makes as many widgets lazily loaded as possible. * * @since 6.4 * diff --git a/shared/src/com/vaadin/shared/ui/button/ButtonState.java b/shared/src/com/vaadin/shared/ui/button/ButtonState.java index 7e76f5d1e8..2383b038bd 100644 --- a/shared/src/com/vaadin/shared/ui/button/ButtonState.java +++ b/shared/src/com/vaadin/shared/ui/button/ButtonState.java @@ -114,7 +114,7 @@ public class ButtonState extends ComponentState implements TabIndexState { /* * (non-Javadoc) * - * @see com.vaadin.terminal.gwt.client.ui.TabIndexState#getTabIndex() + * @see com.vaadin.client.ui.TabIndexState#getTabIndex() */ @Override public int getTabIndex() { @@ -124,7 +124,7 @@ public class ButtonState extends ComponentState implements TabIndexState { /* * (non-Javadoc) * - * @see com.vaadin.terminal.gwt.client.ui.TabIndexState#setTabIndex(int) + * @see com.vaadin.client.ui.TabIndexState#setTabIndex(int) */ @Override public void setTabIndex(int tabIndex) { diff --git a/shared/src/com/vaadin/shared/ui/dd/AcceptCriterion.java b/shared/src/com/vaadin/shared/ui/dd/AcceptCriterion.java index e53f75e552..d0805e453e 100644 --- a/shared/src/com/vaadin/shared/ui/dd/AcceptCriterion.java +++ b/shared/src/com/vaadin/shared/ui/dd/AcceptCriterion.java @@ -23,7 +23,7 @@ import java.lang.annotation.Target; /** * An annotation type used to point the server side counterpart for client side - * a {@link com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterion} class. + * a {@link com.vaadin.client.ui.dd.VAcceptCriterion} class. * <p> * Annotations are used at GWT compilation phase, so remember to rebuild your * widgetset if you do changes for {@link AcceptCriterion} mappings. 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..dd6079167e --- /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; - } } |