diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-27 11:08:06 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-27 11:08:06 +0300 |
commit | 0543f70823211ef4e9424f4748d01fc19e4e84fa (patch) | |
tree | 510c9295a0eb2596e18406280bb952e1d6ceea1b /client | |
parent | 1888d8fdcb32f8111122430cf8c6f782287d97f6 (diff) | |
download | vaadin-framework-0543f70823211ef4e9424f4748d01fc19e4e84fa.tar.gz vaadin-framework-0543f70823211ef4e9424f4748d01fc19e4e84fa.zip |
Added primary stylename to all component states #9724
Diffstat (limited to 'client')
24 files changed, 106 insertions, 11 deletions
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; @@ -246,6 +247,11 @@ public class ComboBoxConnector extends AbstractFieldConnector implements } @Override + public ComboBoxState getState() { + return (ComboBoxState) super.getState(); + } + + @Override public void layout() { VFilterSelect widget = getWidget(); if (widget.initDone) { 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; @@ -123,6 +124,11 @@ public class PopupDateFieldConnector extends TextualDateConnector { } @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) @@ -49,6 +50,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 @@ -178,6 +179,11 @@ public class MenuBarConnector extends AbstractComponentConnector implements } @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) @@ -82,6 +83,11 @@ public class TabsheetConnector extends TabsheetBaseConnector implements } @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) @@ -58,6 +59,11 @@ public class TwinColSelectConnector extends OptionGroupBaseConnector implements } @Override + public TwinColSelectState getState() { + return (TwinColSelectState) super.getState(); + } + + @Override public void layoutVertically() { if (isUndefinedHeight()) { getWidget().clearInternalHeights(); 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; |