From: John Ahlroos Date: Thu, 27 Sep 2012 08:08:06 +0000 (+0300) Subject: Added primary stylename to all component states #9724 X-Git-Tag: 7.0.0.beta6~87^2~13^2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0543f70823211ef4e9424f4748d01fc19e4e84fa;p=vaadin-framework.git Added primary stylename to all component states #9724 --- diff --git a/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java b/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java index da2c981a8d..aac8151d96 100644 --- a/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java +++ b/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java @@ -11,11 +11,13 @@ public class VBrowserFrame extends Widget { protected Element altElement; protected String altText; + public static final String CLASSNAME = "v-browserframe"; + public VBrowserFrame() { Element root = Document.get().createDivElement(); setElement(root); - setStylePrimaryName("v-browserframe"); + setStyleName(CLASSNAME); createAltTextElement(); } diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java index bcab8e71fc..697ade43e7 100644 --- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.ui.combobox.VFilterSelect.FilterSelectSuggestion; import com.vaadin.client.ui.menubar.MenuItem; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.combobox.ComboBoxConstants; +import com.vaadin.shared.ui.combobox.ComboBoxState; import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.ui.ComboBox; @@ -245,6 +246,11 @@ public class ComboBoxConnector extends AbstractFieldConnector implements return (VFilterSelect) super.getWidget(); } + @Override + public ComboBoxState getState() { + return (ComboBoxState) super.getState(); + } + @Override public void layout() { VFilterSelect widget = getWidget(); diff --git a/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java b/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java index 203f982180..3e8cf396d7 100644 --- a/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java @@ -835,7 +835,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, @Deprecated public static final FilteringMode FILTERINGMODE_CONTAINS = FilteringMode.CONTAINS; - private static final String CLASSNAME = "v-filterselect"; + public static final String CLASSNAME = "v-filterselect"; private static final String STYLE_NO_INPUT = "no-input"; protected int pageLength = 10; diff --git a/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java index 2f2dd380d6..1800125402 100644 --- a/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.UIDL; import com.vaadin.client.ui.datefield.VCalendarPanel.FocusChangeListener; import com.vaadin.client.ui.datefield.VCalendarPanel.TimeChangeListener; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.datefield.InlineDateFieldState; import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.ui.InlineDateField; @@ -111,4 +112,9 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector { public VDateFieldCalendar getWidget() { return (VDateFieldCalendar) super.getWidget(); } + + @Override + public InlineDateFieldState getState() { + return (InlineDateFieldState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java index f5be276575..fbc7bcc88c 100644 --- a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java @@ -24,6 +24,7 @@ import com.vaadin.client.UIDL; import com.vaadin.client.ui.datefield.VCalendarPanel.FocusChangeListener; import com.vaadin.client.ui.datefield.VCalendarPanel.TimeChangeListener; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.datefield.PopupDateFieldState; import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.ui.DateField; @@ -122,6 +123,11 @@ public class PopupDateFieldConnector extends TextualDateConnector { return (VPopupCalendar) super.getWidget(); } + @Override + public PopupDateFieldState getState() { + return (PopupDateFieldState) super.getState(); + } + @Override protected void setWidgetStyleName(String styleName, boolean add) { super.setWidgetStyleName(styleName, add); diff --git a/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java b/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java index ef4b53f9f4..ececdb6775 100644 --- a/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java @@ -19,6 +19,7 @@ package com.vaadin.client.ui.datefield; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.UIDL; import com.vaadin.shared.ui.datefield.Resolution; +import com.vaadin.shared.ui.datefield.TextualDateFieldState; public class TextualDateConnector extends AbstractDateFieldConnector { @@ -59,4 +60,9 @@ public class TextualDateConnector extends AbstractDateFieldConnector { public VTextualDate getWidget() { return (VTextualDate) super.getWidget(); } + + @Override + public TextualDateFieldState getState() { + return (TextualDateFieldState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java index 2a1b4dcc44..1b56a56fe8 100644 --- a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java +++ b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java @@ -39,6 +39,7 @@ import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.embedded.EmbeddedConstants; import com.vaadin.shared.ui.embedded.EmbeddedServerRpc; +import com.vaadin.shared.ui.embedded.EmbeddedState; import com.vaadin.ui.Embedded; @Connect(Embedded.class) @@ -221,6 +222,11 @@ public class EmbeddedConnector extends AbstractComponentConnector implements return (VEmbedded) super.getWidget(); } + @Override + public EmbeddedState getState() { + return (EmbeddedState) super.getState(); + } + protected final ClickEventHandler clickEventHandler = new ClickEventHandler( this) { diff --git a/client/src/com/vaadin/client/ui/flash/VFlash.java b/client/src/com/vaadin/client/ui/flash/VFlash.java index 1f94f21056..0f91ff88e7 100644 --- a/client/src/com/vaadin/client/ui/flash/VFlash.java +++ b/client/src/com/vaadin/client/ui/flash/VFlash.java @@ -8,6 +8,8 @@ import com.vaadin.client.Util; public class VFlash extends HTML { + public static final String CLASSNAME = "v-flash"; + protected String source; protected String altText; protected String classId; @@ -21,7 +23,7 @@ public class VFlash extends HTML { protected String height; public VFlash() { - setStylePrimaryName("v-flash"); + setStyleName(CLASSNAME); } public void setSource(String source) { diff --git a/client/src/com/vaadin/client/ui/image/VImage.java b/client/src/com/vaadin/client/ui/image/VImage.java index 51603a2e5f..b05357b547 100644 --- a/client/src/com/vaadin/client/ui/image/VImage.java +++ b/client/src/com/vaadin/client/ui/image/VImage.java @@ -4,7 +4,9 @@ import com.google.gwt.user.client.ui.Image; public class VImage extends Image { + public static final String CLASSNAME = "v-image"; + public VImage() { - setStylePrimaryName("v-image"); + setStylePrimaryName(CLASSNAME); } } diff --git a/client/src/com/vaadin/client/ui/link/LinkConnector.java b/client/src/com/vaadin/client/ui/link/LinkConnector.java index d7e5f0b25f..f970855769 100644 --- a/client/src/com/vaadin/client/ui/link/LinkConnector.java +++ b/client/src/com/vaadin/client/ui/link/LinkConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.ui.Icon; import com.vaadin.shared.ui.BorderStyle; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.link.LinkConstants; +import com.vaadin.shared.ui.link.LinkState; import com.vaadin.ui.Link; @Connect(Link.class) @@ -48,6 +49,11 @@ public class LinkConnector extends AbstractComponentConnector implements }); } + @Override + public LinkState getState() { + return (LinkState) super.getState(); + } + @Override public boolean delegateCaptionHandling() { return false; diff --git a/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java b/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java index fcd1a3bdac..29030fbd7d 100644 --- a/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java +++ b/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java @@ -33,6 +33,7 @@ import com.vaadin.shared.ui.ComponentStateUtil; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; import com.vaadin.shared.ui.menubar.MenuBarConstants; +import com.vaadin.shared.ui.menubar.MenuBarState; @Connect(value = com.vaadin.ui.MenuBar.class, loadStyle = LoadStyle.LAZY) public class MenuBarConnector extends AbstractComponentConnector implements @@ -177,6 +178,11 @@ public class MenuBarConnector extends AbstractComponentConnector implements return (VMenuBar) super.getWidget(); } + @Override + public MenuBarState getState() { + return (MenuBarState) super.getState(); + } + @Override public void layout() { getWidget().iLayout(); diff --git a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java index b6581a8c02..0c3c06a270 100644 --- a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java +++ b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java @@ -26,6 +26,7 @@ import com.vaadin.client.UIDL; import com.vaadin.shared.EventId; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.optiongroup.OptionGroupConstants; +import com.vaadin.shared.ui.optiongroup.OptionGroupState; import com.vaadin.ui.OptionGroup; @Connect(OptionGroup.class) @@ -77,4 +78,9 @@ public class OptionGroupConnector extends OptionGroupBaseConnector { public VOptionGroup getWidget() { return (VOptionGroup) super.getWidget(); } + + @Override + public OptionGroupState getState() { + return (OptionGroupState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java index aa33e99f45..e6829563f9 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.orderedlayout; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.orderedlayout.HorizontalLayoutState; import com.vaadin.ui.HorizontalLayout; /** @@ -38,4 +39,9 @@ public class HorizontalLayoutConnector extends AbstractOrderedLayoutConnector { return (VHorizontalLayout) super.getWidget(); } + @Override + public HorizontalLayoutState getState() { + return (HorizontalLayoutState) super.getState(); + } + } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java index f80db5113f..7f8ba2be80 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java @@ -20,7 +20,7 @@ package com.vaadin.client.ui.orderedlayout; */ public class VHorizontalLayout extends VOrderedLayout { - private static final String CLASSNAME = "v-horizontallayout"; + public static final String CLASSNAME = "v-horizontallayout"; /** * Default constructor diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java index 17de447b9a..1ebf47efdd 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java @@ -20,7 +20,7 @@ package com.vaadin.client.ui.orderedlayout; */ public class VVerticalLayout extends VOrderedLayout { - private static final String CLASSNAME = "v-verticallayout"; + public static final String CLASSNAME = "v-verticallayout"; /** * Default constructor diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java index 13e9b3ecf7..d073e78c9c 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.orderedlayout; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.orderedlayout.VerticalLayoutState; import com.vaadin.ui.VerticalLayout; /** @@ -38,4 +39,8 @@ public class VerticalLayoutConnector extends AbstractOrderedLayoutConnector { return (VVerticalLayout) super.getWidget(); } + @Override + public VerticalLayoutState getState() { + return (VerticalLayoutState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java index c07bb59289..848e9068fe 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.splitpanel; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.splitpanel.HorizontalSplitPanelState; import com.vaadin.ui.HorizontalSplitPanel; @Connect(value = HorizontalSplitPanel.class, loadStyle = LoadStyle.EAGER) @@ -27,4 +28,9 @@ public class HorizontalSplitPanelConnector extends AbstractSplitPanelConnector { return (VSplitPanelHorizontal) super.getWidget(); } + @Override + public HorizontalSplitPanelState getState() { + return (HorizontalSplitPanelState) super.getState(); + } + } diff --git a/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java index 7a4c4cbb93..2a57be7523 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.splitpanel; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.splitpanel.VerticalSplitPanelState; import com.vaadin.ui.VerticalSplitPanel; @Connect(value = VerticalSplitPanel.class, loadStyle = LoadStyle.EAGER) @@ -27,4 +28,9 @@ public class VerticalSplitPanelConnector extends AbstractSplitPanelConnector { return (VSplitPanelVertical) super.getWidget(); } + @Override + public VerticalSplitPanelState getState() { + return (VerticalSplitPanelState) super.getState(); + } + } diff --git a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java index 9c30d1037d..aff5af2a95 100644 --- a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java +++ b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java @@ -25,6 +25,7 @@ import com.vaadin.client.Util; import com.vaadin.client.ui.SimpleManagedLayout; import com.vaadin.client.ui.layout.MayScrollChildren; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.tabsheet.TabsheetState; import com.vaadin.ui.TabSheet; @Connect(TabSheet.class) @@ -81,6 +82,11 @@ public class TabsheetConnector extends TabsheetBaseConnector implements return (VTabsheet) super.getWidget(); } + @Override + public TabsheetState getState() { + return (TabsheetState) super.getState(); + } + @Override public void updateCaption(ComponentConnector component) { /* Tabsheet does not render its children's captions */ diff --git a/client/src/com/vaadin/client/ui/tree/TreeConnector.java b/client/src/com/vaadin/client/ui/tree/TreeConnector.java index 10a3c0fb95..b7491f8d92 100644 --- a/client/src/com/vaadin/client/ui/tree/TreeConnector.java +++ b/client/src/com/vaadin/client/ui/tree/TreeConnector.java @@ -28,10 +28,10 @@ import com.vaadin.client.UIDL; import com.vaadin.client.Util; import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.client.ui.tree.VTree.TreeNode; -import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.MultiSelectMode; import com.vaadin.shared.ui.tree.TreeConstants; +import com.vaadin.shared.ui.tree.TreeState; import com.vaadin.ui.Tree; @Connect(Tree.class) @@ -262,8 +262,8 @@ public class TreeConnector extends AbstractComponentConnector implements } @Override - public AbstractFieldState getState() { - return (AbstractFieldState) super.getState(); + public TreeState getState() { + return (TreeState) super.getState(); } @Override diff --git a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java index 5bf1beaf16..4539fbd12a 100644 --- a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java +++ b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow; import com.vaadin.client.ui.treetable.VTreeTable.PendingNavigationEvent; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.treetable.TreeTableConstants; +import com.vaadin.shared.ui.treetable.TreeTableState; import com.vaadin.ui.TreeTable; @Connect(TreeTable.class) @@ -105,4 +106,9 @@ public class TreeTableConnector extends TableConnector { public VTreeTable getWidget() { return (VTreeTable) super.getWidget(); } + + @Override + public TreeTableState getState() { + return (TreeTableState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java b/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java index 745de9fe6c..f9767bb727 100644 --- a/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java +++ b/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java @@ -21,6 +21,7 @@ import com.vaadin.client.DirectionalManagedLayout; import com.vaadin.client.UIDL; import com.vaadin.client.ui.optiongroup.OptionGroupBaseConnector; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.twincolselect.TwinColSelectState; import com.vaadin.ui.TwinColSelect; @Connect(TwinColSelect.class) @@ -57,6 +58,11 @@ public class TwinColSelectConnector extends OptionGroupBaseConnector implements return (VTwinColSelect) super.getWidget(); } + @Override + public TwinColSelectState getState() { + return (TwinColSelectState) super.getState(); + } + @Override public void layoutVertically() { if (isUndefinedHeight()) { diff --git a/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java b/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java index cd985876df..494db81e40 100644 --- a/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java +++ b/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java @@ -48,7 +48,7 @@ import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants; public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler, MouseDownHandler, DoubleClickHandler, SubPartAware { - private static final String CLASSNAME = "v-select-twincol"; + public static final String CLASSNAME = "v-select-twincol"; private static final int VISIBLE_COUNT = 10; diff --git a/client/src/com/vaadin/client/ui/video/VVideo.java b/client/src/com/vaadin/client/ui/video/VVideo.java index c1f5f1b353..2f9fbe44be 100644 --- a/client/src/com/vaadin/client/ui/video/VVideo.java +++ b/client/src/com/vaadin/client/ui/video/VVideo.java @@ -25,7 +25,7 @@ import com.vaadin.client.ui.VMediaBase; public class VVideo extends VMediaBase { - private static String CLASSNAME = "v-video"; + public static String CLASSNAME = "v-video"; private VideoElement video; diff --git a/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java b/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java index 283e827e6e..c242cdb11b 100644 --- a/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java @@ -18,9 +18,14 @@ package com.vaadin.shared.ui.absolutelayout; import java.util.HashMap; import java.util.Map; +import com.vaadin.client.ui.absolutelayout.VAbsoluteLayout; import com.vaadin.shared.ui.AbstractLayoutState; public class AbsoluteLayoutState extends AbstractLayoutState { + { + primaryStyleName = VAbsoluteLayout.CLASSNAME; + } + // Maps each component to a position public Map connectorToCssPosition = new HashMap(); } \ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java b/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java index 1c36420372..3325f06789 100644 --- a/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java +++ b/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java @@ -1,7 +1,10 @@ package com.vaadin.shared.ui.browserframe; +import com.vaadin.client.ui.browserframe.VBrowserFrame; import com.vaadin.shared.ui.AbstractEmbeddedState; public class BrowserFrameState extends AbstractEmbeddedState { - + { + primaryStyleName = VBrowserFrame.CLASSNAME; + } } diff --git a/shared/src/com/vaadin/shared/ui/button/ButtonState.java b/shared/src/com/vaadin/shared/ui/button/ButtonState.java index c144a8124f..659ec747aa 100644 --- a/shared/src/com/vaadin/shared/ui/button/ButtonState.java +++ b/shared/src/com/vaadin/shared/ui/button/ButtonState.java @@ -16,6 +16,7 @@ package com.vaadin.shared.ui.button; +import com.vaadin.client.ui.button.VButton; import com.vaadin.shared.ComponentState; import com.vaadin.shared.ui.TabIndexState; @@ -28,6 +29,9 @@ import com.vaadin.shared.ui.TabIndexState; * @since 7.0 */ public class ButtonState extends TabIndexState { + { + primaryStyleName = VButton.CLASSNAME; + } public boolean disableOnClick = false; public int clickShortcutKeyCode = 0; /** diff --git a/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java b/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java index b89270bee2..1892310ae1 100644 --- a/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java +++ b/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java @@ -15,9 +15,13 @@ */ package com.vaadin.shared.ui.checkbox; +import com.vaadin.client.ui.checkbox.VCheckBox; import com.vaadin.shared.AbstractFieldState; public class CheckBoxState extends AbstractFieldState { - public boolean checked = false; + { + primaryStyleName = VCheckBox.CLASSNAME; + } + public boolean checked = false; } \ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java new file mode 100644 index 0000000000..da8ec9ca33 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.combobox; + +import com.vaadin.client.ui.combobox.VFilterSelect; +import com.vaadin.shared.AbstractFieldState; + +public class ComboBoxState extends AbstractFieldState { + { + primaryStyleName = VFilterSelect.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java b/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java index 2fbc42ca0f..a4b595335b 100644 --- a/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java @@ -18,9 +18,13 @@ package com.vaadin.shared.ui.csslayout; import java.util.HashMap; import java.util.Map; +import com.vaadin.client.ui.csslayout.VCssLayout; import com.vaadin.shared.Connector; import com.vaadin.shared.ui.AbstractLayoutState; public class CssLayoutState extends AbstractLayoutState { + { + primaryStyleName = VCssLayout.CLASSNAME; + } public Map childCss = new HashMap(); } \ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java b/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java index e77ea5c068..4d95cd3c68 100644 --- a/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java @@ -18,10 +18,14 @@ package com.vaadin.shared.ui.customlayout; import java.util.HashMap; import java.util.Map; +import com.vaadin.client.ui.customlayout.VCustomLayout; import com.vaadin.shared.Connector; import com.vaadin.shared.ui.AbstractLayoutState; public class CustomLayoutState extends AbstractLayoutState { + { + primaryStyleName = VCustomLayout.CLASSNAME; + } public Map childLocations = new HashMap(); public String templateContents; public String templateName; diff --git a/shared/src/com/vaadin/shared/ui/datefield/InlineDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/InlineDateFieldState.java new file mode 100644 index 0000000000..2575e81ab2 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/datefield/InlineDateFieldState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.datefield; + +import com.vaadin.client.ui.datefield.VDateFieldCalendar; +import com.vaadin.shared.AbstractFieldState; + +public class InlineDateFieldState extends AbstractFieldState { + { + primaryStyleName = VDateFieldCalendar.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java new file mode 100644 index 0000000000..5071b8cfb4 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.datefield; + +import com.vaadin.client.ui.datefield.VPopupCalendar; + +public class PopupDateFieldState extends TextualDateFieldState { + { + primaryStyleName = VPopupCalendar.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/datefield/TextualDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/TextualDateFieldState.java new file mode 100644 index 0000000000..e7a8251bcb --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/datefield/TextualDateFieldState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.datefield; + +import com.vaadin.client.ui.datefield.VTextualDate; +import com.vaadin.shared.AbstractFieldState; + +public class TextualDateFieldState extends AbstractFieldState { + { + primaryStyleName = VTextualDate.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/embedded/EmbeddedState.java b/shared/src/com/vaadin/shared/ui/embedded/EmbeddedState.java new file mode 100644 index 0000000000..cdf0621f5f --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/embedded/EmbeddedState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.embedded; + +import com.vaadin.client.ui.embedded.VEmbedded; +import com.vaadin.shared.ui.AbstractEmbeddedState; + +public class EmbeddedState extends AbstractEmbeddedState { + { + primaryStyleName = VEmbedded.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/flash/FlashState.java b/shared/src/com/vaadin/shared/ui/flash/FlashState.java index 50f0d63733..f9886cf737 100644 --- a/shared/src/com/vaadin/shared/ui/flash/FlashState.java +++ b/shared/src/com/vaadin/shared/ui/flash/FlashState.java @@ -2,9 +2,13 @@ package com.vaadin.shared.ui.flash; import java.util.Map; +import com.vaadin.client.ui.flash.VFlash; import com.vaadin.shared.ui.AbstractEmbeddedState; public class FlashState extends AbstractEmbeddedState { + { + primaryStyleName = VFlash.CLASSNAME; + } public String classId; diff --git a/shared/src/com/vaadin/shared/ui/form/FormState.java b/shared/src/com/vaadin/shared/ui/form/FormState.java index f0e79ad38f..bae8899c13 100644 --- a/shared/src/com/vaadin/shared/ui/form/FormState.java +++ b/shared/src/com/vaadin/shared/ui/form/FormState.java @@ -15,10 +15,14 @@ */ package com.vaadin.shared.ui.form; +import com.vaadin.client.ui.form.VForm; import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.Connector; public class FormState extends AbstractFieldState { + { + primaryStyleName = VForm.CLASSNAME; + } public Connector layout; public Connector footer; } \ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java index ae54dc3765..9d7cd8a615 100644 --- a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java @@ -15,9 +15,13 @@ */ package com.vaadin.shared.ui.gridlayout; +import com.vaadin.client.ui.gridlayout.VGridLayout; import com.vaadin.shared.ui.AbstractLayoutState; public class GridLayoutState extends AbstractLayoutState { + { + primaryStyleName = VGridLayout.CLASSNAME; + } public boolean spacing = false; public int rows = 0; public int columns = 0; diff --git a/shared/src/com/vaadin/shared/ui/image/ImageState.java b/shared/src/com/vaadin/shared/ui/image/ImageState.java index 4296c76847..1ecf9b25d8 100644 --- a/shared/src/com/vaadin/shared/ui/image/ImageState.java +++ b/shared/src/com/vaadin/shared/ui/image/ImageState.java @@ -1,7 +1,10 @@ package com.vaadin.shared.ui.image; +import com.vaadin.client.ui.image.VImage; import com.vaadin.shared.ui.AbstractEmbeddedState; public class ImageState extends AbstractEmbeddedState { - + { + primaryStyleName = VImage.CLASSNAME; + } } diff --git a/shared/src/com/vaadin/shared/ui/label/LabelState.java b/shared/src/com/vaadin/shared/ui/label/LabelState.java index a91aeb0aa1..09d4837fbe 100644 --- a/shared/src/com/vaadin/shared/ui/label/LabelState.java +++ b/shared/src/com/vaadin/shared/ui/label/LabelState.java @@ -15,9 +15,13 @@ */ package com.vaadin.shared.ui.label; +import com.vaadin.client.ui.label.VLabel; import com.vaadin.shared.ComponentState; public class LabelState extends ComponentState { + { + primaryStyleName = VLabel.CLASSNAME; + } public ContentMode contentMode = ContentMode.TEXT; public String text = ""; } diff --git a/shared/src/com/vaadin/shared/ui/link/LinkState.java b/shared/src/com/vaadin/shared/ui/link/LinkState.java new file mode 100644 index 0000000000..7ce626f380 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/link/LinkState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.link; + +import com.vaadin.client.ui.link.VLink; +import com.vaadin.shared.ComponentState; + +public class LinkState extends ComponentState { + { + primaryStyleName = VLink.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java b/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java new file mode 100644 index 0000000000..418be8dba3 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.menubar; + +import com.vaadin.client.ui.menubar.VMenuBar; +import com.vaadin.shared.ComponentState; + +public class MenuBarState extends ComponentState { + { + primaryStyleName = VMenuBar.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java new file mode 100644 index 0000000000..b6a37d0bf6 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.optiongroup; + +import com.vaadin.client.ui.optiongroup.VOptionGroup; +import com.vaadin.shared.AbstractFieldState; + +public class OptionGroupState extends AbstractFieldState { + { + primaryStyleName = VOptionGroup.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java b/shared/src/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java new file mode 100644 index 0000000000..caad987697 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.orderedlayout; + +import com.vaadin.client.ui.orderedlayout.VHorizontalLayout; + +public class HorizontalLayoutState extends AbstractOrderedLayoutState { + { + primaryStyleName = VHorizontalLayout.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java b/shared/src/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java new file mode 100644 index 0000000000..e8ad3c9a29 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.orderedlayout; + +import com.vaadin.client.ui.orderedlayout.VVerticalLayout; + +public class VerticalLayoutState extends AbstractOrderedLayoutState { + { + primaryStyleName = VVerticalLayout.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/panel/PanelState.java b/shared/src/com/vaadin/shared/ui/panel/PanelState.java index 878b921d55..3061d54438 100644 --- a/shared/src/com/vaadin/shared/ui/panel/PanelState.java +++ b/shared/src/com/vaadin/shared/ui/panel/PanelState.java @@ -15,9 +15,13 @@ */ package com.vaadin.shared.ui.panel; +import com.vaadin.client.ui.panel.VPanel; import com.vaadin.shared.ComponentState; public class PanelState extends ComponentState { + { + primaryStyleName = VPanel.CLASSNAME; + } public int tabIndex; public int scrollLeft, scrollTop; } \ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderState.java b/shared/src/com/vaadin/shared/ui/slider/SliderState.java index ca18f72b7a..3393dbbfb5 100644 --- a/shared/src/com/vaadin/shared/ui/slider/SliderState.java +++ b/shared/src/com/vaadin/shared/ui/slider/SliderState.java @@ -1,8 +1,12 @@ package com.vaadin.shared.ui.slider; +import com.vaadin.client.ui.slider.VSlider; import com.vaadin.shared.AbstractFieldState; public class SliderState extends AbstractFieldState { + { + primaryStyleName = VSlider.CLASSNAME; + } public double value; diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java index 733f032726..8bddffdfd6 100644 --- a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java +++ b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java @@ -21,7 +21,6 @@ import com.vaadin.shared.ComponentState; import com.vaadin.shared.Connector; public class AbstractSplitPanelState extends ComponentState { - public Connector firstChild = null; public Connector secondChild = null; public SplitterState splitterState = new SplitterState(); diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java new file mode 100644 index 0000000000..5472c17fdd --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.splitpanel; + +import com.vaadin.client.ui.splitpanel.VSplitPanelHorizontal; + +public class HorizontalSplitPanelState extends AbstractSplitPanelState { + { + primaryStyleName = VSplitPanelHorizontal.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java new file mode 100644 index 0000000000..0e97557769 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.splitpanel; + +import com.vaadin.client.ui.splitpanel.VSplitPanelVertical; + +public class VerticalSplitPanelState extends AbstractSplitPanelState { + { + primaryStyleName = VSplitPanelVertical.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java new file mode 100644 index 0000000000..f03f9b9e5d --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.tabsheet; + +import com.vaadin.client.ui.tabsheet.VTabsheet; +import com.vaadin.shared.ComponentState; + +public class TabsheetState extends ComponentState { + { + primaryStyleName = VTabsheet.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java b/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java index a562c607b0..ca9481f5e3 100644 --- a/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java +++ b/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java @@ -15,10 +15,14 @@ */ package com.vaadin.shared.ui.textarea; +import com.vaadin.client.ui.textarea.VTextArea; import com.vaadin.shared.annotations.DelegateToWidget; import com.vaadin.shared.ui.textfield.AbstractTextFieldState; public class TextAreaState extends AbstractTextFieldState { + { + primaryStyleName = VTextArea.CLASSNAME; + } /** * Number of visible rows in the text area. The default is 5. diff --git a/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java b/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java index 39265c516f..ebe99f729f 100644 --- a/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java +++ b/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java @@ -15,9 +15,14 @@ */ package com.vaadin.shared.ui.textfield; +import com.vaadin.client.ui.textfield.VTextField; import com.vaadin.shared.AbstractFieldState; public class AbstractTextFieldState extends AbstractFieldState { + { + primaryStyleName = VTextField.CLASSNAME; + } + /** * Maximum character count in text field. */ diff --git a/shared/src/com/vaadin/shared/ui/tree/TreeState.java b/shared/src/com/vaadin/shared/ui/tree/TreeState.java new file mode 100644 index 0000000000..3785051276 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/tree/TreeState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.tree; + +import com.vaadin.client.ui.tree.VTree; +import com.vaadin.shared.AbstractFieldState; + +public class TreeState extends AbstractFieldState { + { + primaryStyleName = VTree.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/treetable/TreeTableState.java b/shared/src/com/vaadin/shared/ui/treetable/TreeTableState.java new file mode 100644 index 0000000000..9199c1c267 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/treetable/TreeTableState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.treetable; + +import com.vaadin.client.ui.treetable.VTreeTable; +import com.vaadin.shared.ui.table.TableState; + +public class TreeTableState extends TableState { + { + primaryStyleName = VTreeTable.STYLENAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java new file mode 100644 index 0000000000..a0e554a084 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java @@ -0,0 +1,10 @@ +package com.vaadin.shared.ui.twincolselect; + +import com.vaadin.client.ui.twincolselect.VTwinColSelect; +import com.vaadin.shared.AbstractFieldState; + +public class TwinColSelectState extends AbstractFieldState { + { + primaryStyleName = VTwinColSelect.CLASSNAME; + } +} diff --git a/shared/src/com/vaadin/shared/ui/video/VideoState.java b/shared/src/com/vaadin/shared/ui/video/VideoState.java index 2e6e24a743..4232888328 100644 --- a/shared/src/com/vaadin/shared/ui/video/VideoState.java +++ b/shared/src/com/vaadin/shared/ui/video/VideoState.java @@ -15,8 +15,11 @@ */ package com.vaadin.shared.ui.video; +import com.vaadin.client.ui.video.VVideo; import com.vaadin.shared.ui.AbstractMediaState; public class VideoState extends AbstractMediaState { - + { + primaryStyleName = VVideo.CLASSNAME; + } }