Skip to content

Commit 5094b06

Browse files
javier-godoypaodb
authored andcommitted
remove!: remove deprecated methods and classes
Close #126
1 parent 0785a74 commit 5094b06

File tree

4 files changed

+3
-152
lines changed

4 files changed

+3
-152
lines changed

src/main/java/com/flowingcode/vaadin/addons/demo/DefaultSourceUrlResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public Optional<String> resolveURL(TabbedDemo demo, Class<?> annotatedClass,
4242
DemoSource annotation) {
4343
String demoFile;
4444
String url = annotation.value();
45-
if (url.equals(DemoSource.GITHUB_SOURCE) || url.equals(DemoSource.DEFAULT_VALUE)) {
45+
if (url.equals(DemoSource.DEFAULT_VALUE)) {
4646
String className;
4747
if (annotation.clazz() == DemoSource.class) {
4848
className = annotatedClass.getName().replace('.', '/');

src/main/java/com/flowingcode/vaadin/addons/demo/DemoSource.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* #%L
33
* Commons Demo
44
* %%
5-
* Copyright (C) 2020 - 2024 Flowing Code
5+
* Copyright (C) 2020 - 2025 Flowing Code
66
* %%
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -46,10 +46,6 @@
4646
@Target(ElementType.TYPE)
4747
public @interface DemoSource {
4848

49-
/** @deprecated. Use {@link #DEFAULT_VALUE} */
50-
@Deprecated
51-
static final String GITHUB_SOURCE = "__GITHUB__";
52-
5349
static final String DEFAULT_VALUE = "__DEFAULT__";
5450

5551
/**

src/main/java/com/flowingcode/vaadin/addons/demo/RouteTabs.java

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* #%L
33
* Commons Demo
44
* %%
5-
* Copyright (C) 2020 - 2024 Flowing Code
5+
* Copyright (C) 2020 - 2025 Flowing Code
66
* %%
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -120,32 +120,6 @@ public TabbedDemo() {
120120
setSizeFull();
121121
}
122122

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-
149123
/**
150124
* Add a tab with a demo component.
151125
*
@@ -188,11 +162,6 @@ public void addDemo(Class<? extends Component> clazz) {
188162
addDemo(clazz, label);
189163
}
190164

191-
@Deprecated
192-
public void addDemo(Component demo, String label) {
193-
addDemo(demo, label, null);
194-
}
195-
196165
@Override
197166
public void showRouterLayoutContent(HasElement content) {
198167
Component demo = (Component) content;
@@ -347,27 +316,11 @@ public void setOrientation(Orientation orientation) {
347316

348317
private static final String THEME_NAME = TabbedDemo.class.getName() + "#THEME_NAME";
349318

350-
@Deprecated
351-
public static String getThemeName() {
352-
return getThemeAttribute();
353-
}
354-
355319
public static String getThemeAttribute() {
356320
return (String) Optional.ofNullable(VaadinSession.getCurrent().getAttribute(THEME_NAME))
357321
.orElse("");
358322
}
359323

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-
371324
public static void applyThemeAttribute(Element element, String theme) {
372325
VaadinSession.getCurrent().setAttribute(THEME_NAME, theme);
373326

0 commit comments

Comments
 (0)