Grid's ProgressBarRenderer uses that style by default.
Change-Id: Ie3e1ec33168f61f921efdaf554714fba10cb2644
background: #f7f9f9 url(img/progress.png);
}
-}
\ No newline at end of file
+// Static style
+
+.#{$primaryStyleName}-static .#{$primaryStyleName}-wrapper {
+ background: #dfe2e4 url(img/base-static.gif) repeat-x;
+}
+
+}
background: #dfe2e4;
}
-}
\ No newline at end of file
+// Static style
+
+.#{$primaryStyleName}-static .#{$primaryStyleName}-wrapper {
+ background: #dfe2e4 url(img/base-static.gif) repeat-x;
+}
+
+}
@Override
public VProgressBar createWidget() {
- return GWT.create(VProgressBar.class);
+ VProgressBar progressBar = GWT.create(VProgressBar.class);
+ progressBar.addStyleDependentName("static");
+ return progressBar;
}
@Override
*/
package com.vaadin.ui.themes;
-import com.vaadin.ui.CssLayout;
-import com.vaadin.ui.FormLayout;
-import com.vaadin.ui.GridLayout;
-import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.HorizontalSplitPanel;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.VerticalSplitPanel;
-
public class Reindeer extends BaseTheme {
public static final String THEME_NAME = "reindeer";
*/
public static final String PANEL_LIGHT = "light";
+ /***************************************************************************
+ *
+ * ProgressBar Styles
+ *
+ **************************************************************************/
+
+ /**
+ * Displays the progress bar with a static background, instead of an
+ * animated one.
+ */
+ public static final String PROGRESSBAR_STATIC = "static";
+
/***************************************************************************
*
* SplitPanel styles
*/
public static final String PANEL_LIGHT = "light";
+ /***************************************************************************
+ *
+ * ProgressBar Styles
+ *
+ **************************************************************************/
+
+ /**
+ * Displays the progress bar with a static background, instead of an
+ * animated one.
+ */
+ public static final String PROGRESSBAR_STATIC = "static";
+
/***************************************************************************
*
* TabSheet styles
--- /dev/null
+/*
+ * Copyright 2000-2014 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.tests.components.progressindicator;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ProgressBar;
+import com.vaadin.ui.themes.Reindeer;
+
+@Theme(Reindeer.THEME_NAME)
+public class ProgressBarStaticReindeer extends AbstractTestUI {
+ @Override
+ protected void setup(VaadinRequest request) {
+ ProgressBar progressBar = new ProgressBar();
+ progressBar.addStyleName(Reindeer.PROGRESSBAR_STATIC);
+ addComponent(progressBar);
+ }
+}
--- /dev/null
+/*
+ * Copyright 2000-2014 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.tests.components.progressindicator;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class ProgressBarStaticReindeerTest extends MultiBrowserTest {
+ @Test
+ public void compareScreenshot() throws Exception {
+ openTestURL();
+ compareScreen("screen");
+ }
+}
--- /dev/null
+/*
+ * Copyright 2000-2014 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.tests.components.progressindicator;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ProgressBar;
+import com.vaadin.ui.themes.Runo;
+
+@Theme(Runo.THEME_NAME)
+public class ProgressBarStaticRuno extends AbstractTestUI {
+ @Override
+ protected void setup(VaadinRequest request) {
+ ProgressBar progressBar = new ProgressBar();
+ progressBar.addStyleName(Runo.PROGRESSBAR_STATIC);
+ addComponent(progressBar);
+ }
+}
--- /dev/null
+/*
+ * Copyright 2000-2014 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.tests.components.progressindicator;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class ProgressBarStaticRunoTest extends MultiBrowserTest {
+ @Test
+ public void compareScreenshot() throws Exception {
+ openTestURL();
+ compareScreen("screen");
+ }
+}