|
2 | 2 | * #%L |
3 | 3 | * Commons Demo |
4 | 4 | * %% |
5 | | - * Copyright (C) 2020 - 2024 Flowing Code |
| 5 | + * Copyright (C) 2020 - 2025 Flowing Code |
6 | 6 | * %% |
7 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | 8 | * you may not use this file except in compliance with the License. |
@@ -120,32 +120,6 @@ public TabbedDemo() { |
120 | 120 | setSizeFull(); |
121 | 121 | } |
122 | 122 |
|
123 | | - /** |
124 | | - * Add a tab with a {@code demo} component. The tab label and source code URL are retrieved from |
125 | | - * the {@link PageTitle} (required) and {@link DemoSource} (optional) annotations in the demo |
126 | | - * class, respectively. |
127 | | - * |
128 | | - * @param demo the demo instance |
129 | | - */ |
130 | | - @Deprecated |
131 | | - public void addDemo(Component demo) { |
132 | | - String label = Optional.ofNullable(demo.getClass().getAnnotation(PageTitle.class)) |
133 | | - .map(PageTitle::value).orElse(demo.getClass().getSimpleName()); |
134 | | - |
135 | | - addDemo(demo, label, null); |
136 | | - } |
137 | | - |
138 | | - /** |
139 | | - * @param demo the demo instance |
140 | | - * @param label the demo name (tab label) |
141 | | - * @param sourceCodeUrl ignored. |
142 | | - */ |
143 | | - @Deprecated |
144 | | - public void addDemo(Component demo, String label, String sourceCodeUrl) { |
145 | | - tabs.addLegacyTab(label, demo); |
146 | | - updateVisibility(); |
147 | | - } |
148 | | - |
149 | 123 | /** |
150 | 124 | * Add a tab with a demo component. |
151 | 125 | * |
@@ -188,11 +162,6 @@ public void addDemo(Class<? extends Component> clazz) { |
188 | 162 | addDemo(clazz, label); |
189 | 163 | } |
190 | 164 |
|
191 | | - @Deprecated |
192 | | - public void addDemo(Component demo, String label) { |
193 | | - addDemo(demo, label, null); |
194 | | - } |
195 | | - |
196 | 165 | @Override |
197 | 166 | public void showRouterLayoutContent(HasElement content) { |
198 | 167 | Component demo = (Component) content; |
@@ -347,27 +316,11 @@ public void setOrientation(Orientation orientation) { |
347 | 316 |
|
348 | 317 | private static final String THEME_NAME = TabbedDemo.class.getName() + "#THEME_NAME"; |
349 | 318 |
|
350 | | - @Deprecated |
351 | | - public static String getThemeName() { |
352 | | - return getThemeAttribute(); |
353 | | - } |
354 | | - |
355 | 319 | public static String getThemeAttribute() { |
356 | 320 | return (String) Optional.ofNullable(VaadinSession.getCurrent().getAttribute(THEME_NAME)) |
357 | 321 | .orElse(""); |
358 | 322 | } |
359 | 323 |
|
360 | | - @Deprecated |
361 | | - public static void applyTheme(Element element, boolean useDarkTheme) { |
362 | | - String theme = useDarkTheme ? "dark" : ""; |
363 | | - applyTheme(element, theme); |
364 | | - } |
365 | | - |
366 | | - @Deprecated |
367 | | - public static void applyTheme(Element element, String theme) { |
368 | | - applyThemeAttribute(element, theme); |
369 | | - } |
370 | | - |
371 | 324 | public static void applyThemeAttribute(Element element, String theme) { |
372 | 325 | VaadinSession.getCurrent().setAttribute(THEME_NAME, theme); |
373 | 326 |
|
|
0 commit comments