Skip to content

Commit 8735420

Browse files
committed
🔨 Remove unused click event offset coordinates
1 parent 51a98d1 commit 8735420

File tree

4 files changed

+7
-52
lines changed

4 files changed

+7
-52
lines changed

src/main/java/org/cleancode/journal/component/achievement/AchievementComponent.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cleancode.journal.component.achievement;
22

3-
import com.vaadin.flow.component.*;
3+
import com.vaadin.flow.component.ComponentEvent;
4+
import com.vaadin.flow.component.ComponentEventListener;
5+
import com.vaadin.flow.component.DomEvent;
6+
import com.vaadin.flow.component.Tag;
47
import com.vaadin.flow.component.dependency.JsModule;
58
import com.vaadin.flow.component.dependency.NpmPackage;
69
import com.vaadin.flow.component.polymertemplate.PolymerTemplate;
@@ -34,21 +37,8 @@ public Registration addClickListener(ComponentEventListener<ClickEvent> listener
3437
@DomEvent("click")
3538
public static class ClickEvent extends ComponentEvent<AchievementComponent> {
3639

37-
private int x, y;
38-
39-
public ClickEvent(AchievementComponent source, boolean fromClient, @EventData("event.offsetX") int x, @EventData("event.offsetY") int y) {
40+
public ClickEvent(AchievementComponent source, boolean fromClient) {
4041
super(source, fromClient);
41-
this.x = x;
42-
this.y = y;
43-
}
44-
45-
public int getX() {
46-
return x;
4742
}
48-
49-
public int getY() {
50-
return y;
51-
}
52-
5343
}
5444
}

src/main/java/org/cleancode/journal/component/speeddial/SpeedDial.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,8 @@ public Registration addClickListener(ComponentEventListener<ClickEvent> listener
6363
@DomEvent("click")
6464
public static class ClickEvent extends ComponentEvent<SpeedDial> {
6565

66-
private int x, y;
67-
68-
public ClickEvent(SpeedDial source, boolean fromClient, @EventData("event.offsetX") int x, @EventData("event.offsetY") int y) {
66+
public ClickEvent(SpeedDial source, boolean fromClient) {
6967
super(source, fromClient);
70-
this.x = x;
71-
this.y = y;
72-
}
73-
74-
public int getX() {
75-
return x;
76-
}
77-
78-
public int getY() {
79-
return y;
8068
}
8169

8270
}

src/main/java/org/cleancode/journal/component/speeddial/SpeedDialAction.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,8 @@ public Registration addClickListener(ComponentEventListener<ClickEvent> listener
3131
@DomEvent("click")
3232
public static class ClickEvent extends ComponentEvent<SpeedDialAction> {
3333

34-
private int x, y;
35-
36-
public ClickEvent(SpeedDialAction source, boolean fromClient, @EventData("event.offsetX") int x, @EventData("event.offsetY") int y) {
34+
public ClickEvent(SpeedDialAction source, boolean fromClient) {
3735
super(source, fromClient);
38-
this.x = x;
39-
this.y = y;
40-
}
41-
42-
public int getX() {
43-
return x;
44-
}
45-
46-
public int getY() {
47-
return y;
4836
}
4937

5038
}

src/main/java/org/cleancode/journal/view/AboutView.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
import com.vaadin.flow.component.Composite;
44
import com.vaadin.flow.component.Html;
5-
import com.vaadin.flow.component.button.Button;
6-
import com.vaadin.flow.component.orderedlayout.FlexComponent;
7-
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
85
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
96
import com.vaadin.flow.router.PageTitle;
107
import com.vaadin.flow.router.Route;
@@ -18,16 +15,8 @@
1815
public class AboutView extends Composite<VerticalLayout> {
1916

2017
public AboutView(Profile profile, IGradeService gradeService, IAchievementService achievementService) {
21-
2218
var content = getContent();
2319

24-
HorizontalLayout line = new HorizontalLayout();
25-
line.setJustifyContentMode(FlexComponent.JustifyContentMode.BETWEEN);
26-
line.add(new Button("A"));
27-
line.add(new Button("B"));
28-
line.setSizeFull();
29-
content.add(line);
30-
3120
content.add(new Html(getTranslation("about.info")));
3221
content.add(new Html(getTranslation("about.info.technical")));
3322
content.add(new Html(getTranslation("about.info.tanks")));

0 commit comments

Comments
 (0)