diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-07 10:41:17 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-07 10:41:17 +0300 |
commit | 854fa25e6f9de2dff428a4f5f538a7b47e663402 (patch) | |
tree | 1c826f4dc99ad83c8920483cef903e11650eeca5 /client/src | |
parent | 52fa9639bab979d13e852e42f6aba6fe60b4ffe4 (diff) | |
download | vaadin-framework-854fa25e6f9de2dff428a4f5f538a7b47e663402.tar.gz vaadin-framework-854fa25e6f9de2dff428a4f5f538a7b47e663402.zip |
Moved base theme constants (v-widget and v-layout) from BaseTheme to
StyleConstants
Diffstat (limited to 'client/src')
9 files changed, 26 insertions, 18 deletions
diff --git a/client/src/com/vaadin/client/StyleConstants.java b/client/src/com/vaadin/client/StyleConstants.java index ad8a21b3e7..0806b5767d 100644 --- a/client/src/com/vaadin/client/StyleConstants.java +++ b/client/src/com/vaadin/client/StyleConstants.java @@ -1,4 +1,4 @@ -/* +/* * Copyright 2011 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not @@ -26,4 +26,13 @@ public class StyleConstants { public static final String VERTICAL_SPACING = "vspacing"; public static final String HORIZONTAL_SPACING = "hspacing"; + /** + * Added to all UI components + */ + public static final String UI_WIDGET = "v-widget"; + + /** + * Added to all layouts to denote they are layouts + */ + public static final String UI_LAYOUT = "v-layout"; } diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java index b133b0e83d..c40dc27581 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java @@ -29,6 +29,7 @@ import com.vaadin.client.ComponentContainerConnector; import com.vaadin.client.ConnectorMap; import com.vaadin.client.LayoutManager; import com.vaadin.client.ServerConnector; +import com.vaadin.client.StyleConstants; import com.vaadin.client.TooltipInfo; import com.vaadin.client.UIDL; import com.vaadin.client.Util; @@ -44,7 +45,6 @@ import com.vaadin.shared.ComponentState; import com.vaadin.shared.Connector; import com.vaadin.shared.ui.ComponentStateUtil; import com.vaadin.shared.ui.TabIndexState; -import com.vaadin.ui.themes.BaseTheme; public abstract class AbstractComponentConnector extends AbstractConnector implements ComponentConnector { @@ -73,7 +73,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector getConnection().getVTooltip().connectHandlersToWidget(getWidget()); // Set the core 'v' style name for the widget - getWidget().setStyleName(BaseTheme.UI_WIDGET, true); + getWidget().setStyleName(StyleConstants.UI_WIDGET, true); } /** diff --git a/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java index 30426e1399..229ef7b676 100644 --- a/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java +++ b/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java @@ -24,8 +24,8 @@ import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ApplicationConnection; +import com.vaadin.client.StyleConstants; import com.vaadin.client.VCaption; -import com.vaadin.ui.themes.BaseTheme; public class VAbsoluteLayout extends ComplexPanel { @@ -45,7 +45,7 @@ public class VAbsoluteLayout extends ComplexPanel { public VAbsoluteLayout() { setElement(Document.get().createDivElement()); - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); addStyleName(CLASSNAME); marginElement = Document.get().createDivElement(); canvas.getStyle().setProperty("position", "relative"); diff --git a/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java b/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java index b4db3d00e6..17666cce13 100644 --- a/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java +++ b/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java @@ -18,7 +18,7 @@ package com.vaadin.client.ui.csslayout; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Widget; -import com.vaadin.ui.themes.BaseTheme; +import com.vaadin.client.StyleConstants; /** * VCCSlayout is a layout which supports configuring it's children with CSS @@ -33,7 +33,7 @@ public class VCssLayout extends FlowPanel { */ public VCssLayout() { super(); - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); addStyleName(CLASSNAME); } diff --git a/client/src/com/vaadin/client/ui/customlayout/VCustomLayout.java b/client/src/com/vaadin/client/ui/customlayout/VCustomLayout.java index 963ad5becf..7a512fac49 100644 --- a/client/src/com/vaadin/client/ui/customlayout/VCustomLayout.java +++ b/client/src/com/vaadin/client/ui/customlayout/VCustomLayout.java @@ -29,10 +29,10 @@ import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.BrowserInfo; import com.vaadin.client.ComponentConnector; +import com.vaadin.client.StyleConstants; import com.vaadin.client.Util; import com.vaadin.client.VCaption; import com.vaadin.client.VCaptionWrapper; -import com.vaadin.ui.themes.BaseTheme; /** * Custom Layout implements complex layout defined with HTML template. @@ -83,7 +83,7 @@ public class VCustomLayout extends ComplexPanel { DOM.setStyleAttribute(getElement(), "position", "relative"); } - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); addStyleName(CLASSNAME); } diff --git a/client/src/com/vaadin/client/ui/formlayout/VFormLayout.java b/client/src/com/vaadin/client/ui/formlayout/VFormLayout.java index 49df49374d..cbdef6685c 100644 --- a/client/src/com/vaadin/client/ui/formlayout/VFormLayout.java +++ b/client/src/com/vaadin/client/ui/formlayout/VFormLayout.java @@ -40,7 +40,6 @@ import com.vaadin.shared.ComponentConstants; import com.vaadin.shared.ComponentState; import com.vaadin.shared.ui.ComponentStateUtil; import com.vaadin.shared.ui.MarginInfo; -import com.vaadin.ui.themes.BaseTheme; /** * Two col Layout that places caption on left col and field on right col @@ -53,7 +52,7 @@ public class VFormLayout extends SimplePanel { public VFormLayout() { super(); - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); addStyleName(CLASSNAME); table = new VFormLayoutTable(); setWidget(table); diff --git a/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java b/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java index 894b21c925..1664a6568f 100644 --- a/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java +++ b/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java @@ -32,6 +32,7 @@ import com.vaadin.client.ApplicationConnection; import com.vaadin.client.ComponentConnector; import com.vaadin.client.ConnectorMap; import com.vaadin.client.LayoutManager; +import com.vaadin.client.StyleConstants; import com.vaadin.client.UIDL; import com.vaadin.client.Util; import com.vaadin.client.VCaption; @@ -39,7 +40,6 @@ import com.vaadin.client.ui.layout.ComponentConnectorLayoutSlot; import com.vaadin.client.ui.layout.VLayoutSlot; import com.vaadin.shared.ui.AlignmentInfo; import com.vaadin.shared.ui.MarginInfo; -import com.vaadin.ui.themes.BaseTheme; public class VGridLayout extends ComplexPanel { @@ -71,7 +71,7 @@ public class VGridLayout extends ComplexPanel { spacingStyle.setPosition(Position.ABSOLUTE); getElement().appendChild(spacingMeasureElement); - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); addStyleName(CLASSNAME); } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java index b97ffdc394..a9397b39c2 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java @@ -32,10 +32,10 @@ import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.LayoutManager; +import com.vaadin.client.StyleConstants; import com.vaadin.client.Util; import com.vaadin.shared.ui.AlignmentInfo; import com.vaadin.shared.ui.MarginInfo; -import com.vaadin.ui.themes.BaseTheme; /** * Base class for ordered layouts @@ -60,7 +60,7 @@ public class VOrderedLayout extends FlowPanel { * Constructor */ public VOrderedLayout() { - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); setVertical(true); } @@ -387,7 +387,7 @@ public class VOrderedLayout extends FlowPanel { if (caption == null) { caption = DOM.createDiv(); captionWrap = DOM.createDiv(); - captionWrap.addClassName(BaseTheme.UI_WIDGET); + captionWrap.addClassName(StyleConstants.UI_WIDGET); captionWrap.addClassName("v-has-caption"); getElement().appendChild(captionWrap); captionWrap.appendChild(getWidget().getElement()); diff --git a/client/src/com/vaadin/client/ui/splitpanel/VAbstractSplitPanel.java b/client/src/com/vaadin/client/ui/splitpanel/VAbstractSplitPanel.java index ef19b83c20..088e743d7a 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/VAbstractSplitPanel.java +++ b/client/src/com/vaadin/client/ui/splitpanel/VAbstractSplitPanel.java @@ -41,13 +41,13 @@ import com.vaadin.client.BrowserInfo; import com.vaadin.client.ComponentConnector; import com.vaadin.client.ConnectorMap; import com.vaadin.client.LayoutManager; +import com.vaadin.client.StyleConstants; import com.vaadin.client.Util; import com.vaadin.client.VConsole; import com.vaadin.client.ui.TouchScrollDelegate; import com.vaadin.client.ui.TouchScrollDelegate.TouchScrollHandler; import com.vaadin.client.ui.VOverlay; import com.vaadin.client.ui.splitpanel.VAbstractSplitPanel.SplitterMoveHandler.SplitterMoveEvent; -import com.vaadin.ui.themes.BaseTheme; public class VAbstractSplitPanel extends ComplexPanel { @@ -118,7 +118,7 @@ public class VAbstractSplitPanel extends ComplexPanel { public VAbstractSplitPanel(int orientation) { setElement(DOM.createDiv()); - setStyleName(BaseTheme.UI_LAYOUT); + setStyleName(StyleConstants.UI_LAYOUT); switch (orientation) { case ORIENTATION_HORIZONTAL: addStyleName(CLASSNAME + "-horizontal"); |