]> source.dussan.org Git - vaadin-framework.git/commitdiff
Make ValoTheme subclassable
authorLeif Åstrand <leif@vaadin.com>
Thu, 17 Nov 2016 18:43:45 +0000 (20:43 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 17 Nov 2016 18:44:09 +0000 (20:44 +0200)
Change-Id: Ib8976949108888deac51a90eb775445f0b5cecf8

server/src/main/java/com/vaadin/ui/themes/ValoTheme.java
server/src/test/java/com/vaadin/ui/themes/ValoThemeTest.java [new file with mode: 0644]

index 48fad1ce9547c083689a55a7e83fd01182a1bb28..fd670a175bac39d0b2eafd8c2938a79a8cf932d8 100644 (file)
@@ -1073,6 +1073,6 @@ public class ValoTheme {
      */
     public static final String MENU_APPEAR_ON_HOVER = "valo-menu-hover";
 
-    private ValoTheme() {
+    protected ValoTheme() {
     }
 }
diff --git a/server/src/test/java/com/vaadin/ui/themes/ValoThemeTest.java b/server/src/test/java/com/vaadin/ui/themes/ValoThemeTest.java
new file mode 100644 (file)
index 0000000..658b804
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2000-2016 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.ui.themes;
+
+public class ValoThemeTest {
+    /*
+     * No runtime behavior to test. Just verifying that it's possible to create
+     * a custom subclass for inheriting the constants from the built-in theme.
+     */
+    public static class CustomValoTheme extends ValoTheme {
+        public static String MY_THEME_CONSTANT = "my theme constant";
+    }
+}