diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-11-12 13:22:47 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-14 09:39:16 +0000 |
commit | 1b7a4a1ee9e03f445cbfcbb520a5ac970ccf47de (patch) | |
tree | 7ca4d25ffd4de8955dbcb3518c0271ef00cc1e5f /client | |
parent | e44c882563ff50adb0b053a987b697e613d92f82 (diff) | |
download | vaadin-framework-1b7a4a1ee9e03f445cbfcbb520a5ac970ccf47de.tar.gz vaadin-framework-1b7a4a1ee9e03f445cbfcbb520a5ac970ccf47de.zip |
Move widget classes from c.v.c.ui.<widget> to c.v.c.ui (#9392)
Conflicts:
client/src/com/vaadin/client/ui/VScrollTable.java
Change-Id: Ie65e26c9e3df520b099744d4bc1aecc901eaa07a
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VEmbedded.java (renamed from client/src/com/vaadin/client/ui/embedded/VEmbedded.java) | 29 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VFlash.java (renamed from client/src/com/vaadin/client/ui/flash/VFlash.java) | 2 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VForm.java (renamed from client/src/com/vaadin/client/ui/form/VForm.java) | 58 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VFormLayout.java (renamed from client/src/com/vaadin/client/ui/formlayout/VFormLayout.java) | 10 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 1 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java | 1 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/flash/FlashConnector.java | 1 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/form/FormConnector.java | 1 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java | 7 |
9 files changed, 70 insertions, 40 deletions
diff --git a/client/src/com/vaadin/client/ui/embedded/VEmbedded.java b/client/src/com/vaadin/client/ui/VEmbedded.java index 4dc85cd10c..5315560991 100644 --- a/client/src/com/vaadin/client/ui/embedded/VEmbedded.java +++ b/client/src/com/vaadin/client/ui/VEmbedded.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.client.ui.embedded; +package com.vaadin.client.ui; import java.util.HashMap; import java.util.Iterator; @@ -36,12 +36,17 @@ import com.vaadin.shared.ui.embedded.EmbeddedConstants; public class VEmbedded extends HTML { public static String CLASSNAME = "v-embedded"; - protected Element browserElement; + /** For internal use only. May be removed or replaced in the future. */ + public Element browserElement; - protected String type; - protected String mimetype; + /** For internal use only. May be removed or replaced in the future. */ + public String type; - protected ApplicationConnection client; + /** For internal use only. May be removed or replaced in the future. */ + public String mimetype; + + /** For internal use only. May be removed or replaced in the future. */ + public ApplicationConnection client; public VEmbedded() { setStyleName(CLASSNAME); @@ -49,13 +54,15 @@ public class VEmbedded extends HTML { /** * Creates the Object and Embed tags for the Flash plugin so it works - * cross-browser + * cross-browser. + * <p> + * For internal use only. May be removed or replaced in the future. * * @param uidl * The UIDL * @return Tags concatenated into a string */ - protected String createFlashEmbed(UIDL uidl) { + public String createFlashEmbed(UIDL uidl) { /* * To ensure cross-browser compatibility we are using the twice-cooked * method to embed flash i.e. we add a OBJECT tag for IE ActiveX and @@ -179,11 +186,13 @@ public class VEmbedded extends HTML { /** * Returns a map (name -> value) of all parameters in the UIDL. + * <p> + * For internal use only. May be removed or replaced in the future. * * @param uidl * @return */ - protected static Map<String, String> getParameters(UIDL uidl) { + public static Map<String, String> getParameters(UIDL uidl) { Map<String, String> parameters = new HashMap<String, String>(); Iterator<Object> childIterator = uidl.getChildIterator(); @@ -207,12 +216,14 @@ public class VEmbedded extends HTML { /** * Helper to return translated src-attribute from embedded's UIDL + * <p> + * For internal use only. May be removed or replaced in the future. * * @param uidl * @param client * @return */ - protected String getSrc(UIDL uidl, ApplicationConnection client) { + public String getSrc(UIDL uidl, ApplicationConnection client) { String url = client.translateVaadinUri(uidl.getStringAttribute("src")); if (url == null) { return ""; diff --git a/client/src/com/vaadin/client/ui/flash/VFlash.java b/client/src/com/vaadin/client/ui/VFlash.java index 0f91ff88e7..fede021865 100644 --- a/client/src/com/vaadin/client/ui/flash/VFlash.java +++ b/client/src/com/vaadin/client/ui/VFlash.java @@ -1,4 +1,4 @@ -package com.vaadin.client.ui.flash; +package com.vaadin.client.ui; import java.util.HashMap; import java.util.Map; diff --git a/client/src/com/vaadin/client/ui/form/VForm.java b/client/src/com/vaadin/client/ui/VForm.java index ac877bd12f..14dc574f71 100644 --- a/client/src/com/vaadin/client/ui/form/VForm.java +++ b/client/src/com/vaadin/client/ui/VForm.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.client.ui.form; +package com.vaadin.client.ui; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; @@ -26,35 +26,52 @@ import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.VErrorMessage; -import com.vaadin.client.ui.Icon; -import com.vaadin.client.ui.ShortcutActionHandler; public class VForm extends ComplexPanel implements KeyDownHandler { - protected String id; - public static final String CLASSNAME = "v-form"; - Widget lo; - Element legend = DOM.createLegend(); - Element caption = DOM.createSpan(); - Element desc = DOM.createDiv(); - Icon icon; - VErrorMessage errorMessage = new VErrorMessage(); + /** For internal use only. May be removed or replaced in the future. */ + public String id; + + /** For internal use only. May be removed or replaced in the future. */ + public Widget lo; + + /** For internal use only. May be removed or replaced in the future. */ + public Element legend = DOM.createLegend(); + + /** For internal use only. May be removed or replaced in the future. */ + public Element caption = DOM.createSpan(); + + /** For internal use only. May be removed or replaced in the future. */ + public Element desc = DOM.createDiv(); + + /** For internal use only. May be removed or replaced in the future. */ + public Icon icon; + + /** For internal use only. May be removed or replaced in the future. */ + public VErrorMessage errorMessage = new VErrorMessage(); - Element fieldContainer = DOM.createDiv(); + /** For internal use only. May be removed or replaced in the future. */ + public Element fieldContainer = DOM.createDiv(); - Element footerContainer = DOM.createDiv(); + /** For internal use only. May be removed or replaced in the future. */ + public Element footerContainer = DOM.createDiv(); - Element fieldSet = DOM.createFieldSet(); + /** For internal use only. May be removed or replaced in the future. */ + public Element fieldSet = DOM.createFieldSet(); - Widget footer; + /** For internal use only. May be removed or replaced in the future. */ + public Widget footer; - ApplicationConnection client; + /** For internal use only. May be removed or replaced in the future. */ + public ApplicationConnection client; - ShortcutActionHandler shortcutHandler; + /** For internal use only. May be removed or replaced in the future. */ + public ShortcutActionHandler shortcutHandler; - HandlerRegistration keyDownRegistration; + /** For internal use only. May be removed or replaced in the future. */ + public HandlerRegistration keyDownRegistration; public VForm() { setElement(DOM.createDiv()); @@ -100,10 +117,9 @@ public class VForm extends ComplexPanel implements KeyDownHandler { shortcutHandler.handleKeyboardEvent(Event.as(event.getNativeEvent())); } + /** For internal use only. May be removed or replaced in the future. */ @Override - protected void add(Widget child, Element container) { - // Overridden to allow VFormPaintable to call this. Should be removed - // once functionality from VFormPaintable is moved to VForm. + public void add(Widget child, Element container) { super.add(child, container); } } diff --git a/client/src/com/vaadin/client/ui/formlayout/VFormLayout.java b/client/src/com/vaadin/client/ui/VFormLayout.java index cbdef6685c..a46a0a41c8 100644 --- a/client/src/com/vaadin/client/ui/formlayout/VFormLayout.java +++ b/client/src/com/vaadin/client/ui/VFormLayout.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.client.ui.formlayout; +package com.vaadin.client.ui; import java.util.ArrayList; import java.util.HashMap; @@ -34,8 +34,6 @@ import com.vaadin.client.ComponentConnector; import com.vaadin.client.Focusable; import com.vaadin.client.StyleConstants; import com.vaadin.client.VTooltip; -import com.vaadin.client.ui.AbstractFieldConnector; -import com.vaadin.client.ui.Icon; import com.vaadin.shared.ComponentConstants; import com.vaadin.shared.ComponentState; import com.vaadin.shared.ui.ComponentStateUtil; @@ -48,7 +46,8 @@ public class VFormLayout extends SimplePanel { private final static String CLASSNAME = "v-formlayout"; - VFormLayoutTable table; + /** For internal use only. May be removed or replaced in the future. */ + public VFormLayoutTable table; public VFormLayout() { super(); @@ -340,7 +339,8 @@ public class VFormLayout extends SimplePanel { } } - class ErrorFlag extends HTML { + /** For internal use only. May be removed or replaced in the future. */ + public class ErrorFlag extends HTML { private static final String CLASSNAME = VFormLayout.CLASSNAME + "-error-indicator"; Element errorIndicatorElement; diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 2af58d8578..601c93428c 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -92,7 +92,6 @@ import com.vaadin.client.ui.dd.VDragAndDropManager; import com.vaadin.client.ui.dd.VDragEvent; import com.vaadin.client.ui.dd.VHasDropHandler; import com.vaadin.client.ui.dd.VTransferable; -import com.vaadin.client.ui.embedded.VEmbedded; import com.vaadin.shared.ComponentState; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.dd.VerticalDropLocation; diff --git a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java index a15803beb7..97fab6d3d1 100644 --- a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java +++ b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java @@ -34,6 +34,7 @@ import com.vaadin.client.VConsole; import com.vaadin.client.VTooltip; import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.client.ui.ClickEventHandler; +import com.vaadin.client.ui.VEmbedded; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.embedded.EmbeddedConstants; diff --git a/client/src/com/vaadin/client/ui/flash/FlashConnector.java b/client/src/com/vaadin/client/ui/flash/FlashConnector.java index eaccc4736c..c8ca750840 100644 --- a/client/src/com/vaadin/client/ui/flash/FlashConnector.java +++ b/client/src/com/vaadin/client/ui/flash/FlashConnector.java @@ -2,6 +2,7 @@ package com.vaadin.client.ui.flash; import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.AbstractComponentConnector; +import com.vaadin.client.ui.VFlash; import com.vaadin.shared.ui.AbstractEmbeddedState; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.flash.FlashState; diff --git a/client/src/com/vaadin/client/ui/form/FormConnector.java b/client/src/com/vaadin/client/ui/form/FormConnector.java index 0c2e4a8ecd..bd7ab6ff6e 100644 --- a/client/src/com/vaadin/client/ui/form/FormConnector.java +++ b/client/src/com/vaadin/client/ui/form/FormConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.UIDL; import com.vaadin.client.ui.AbstractComponentContainerConnector; import com.vaadin.client.ui.Icon; import com.vaadin.client.ui.ShortcutActionHandler; +import com.vaadin.client.ui.VForm; import com.vaadin.client.ui.layout.ElementResizeEvent; import com.vaadin.client.ui.layout.ElementResizeListener; import com.vaadin.client.ui.layout.MayScrollChildren; diff --git a/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java b/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java index 6379ae47be..ed873ae809 100644 --- a/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java @@ -24,9 +24,10 @@ import com.vaadin.client.Util; import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.AbstractFieldConnector; import com.vaadin.client.ui.AbstractLayoutConnector; -import com.vaadin.client.ui.formlayout.VFormLayout.Caption; -import com.vaadin.client.ui.formlayout.VFormLayout.ErrorFlag; -import com.vaadin.client.ui.formlayout.VFormLayout.VFormLayoutTable; +import com.vaadin.client.ui.VFormLayout; +import com.vaadin.client.ui.VFormLayout.Caption; +import com.vaadin.client.ui.VFormLayout.ErrorFlag; +import com.vaadin.client.ui.VFormLayout.VFormLayoutTable; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.MarginInfo; import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState; |