Skip to content

Commit 18111c8

Browse files
paodbjavier-godoy
authored andcommitted
style: apply code formatter
1 parent 3be7a63 commit 18111c8

File tree

9 files changed

+68
-67
lines changed

9 files changed

+68
-67
lines changed

src/main/java/com/flowingcode/vaadin/addons/flipcard/FlipCard.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,12 +28,13 @@
2828

2929
/**
3030
* Representation of a Flip Card component.
31-
*
31+
*
32+
* <p>
3233
* This component is a wrapper for Flip Card Web Component
3334
* (https://www.npmjs.com/package/flip-card-wc)
34-
*
35+
* </p>
36+
*
3537
* @author Paola De Bartolo / Flowing Code
36-
*
3738
*/
3839
@SuppressWarnings("serial")
3940
@NpmPackage(value = "flip-card-wc", version = "1.3.0")
@@ -42,7 +43,8 @@
4243
public class FlipCard extends Div {
4344

4445
public enum FlipCardVariant {
45-
HOVER, CLICK;
46+
HOVER,
47+
CLICK;
4648
}
4749

4850
public FlipCard(Component frontComponent, Component backComponent) {
@@ -57,7 +59,7 @@ public FlipCard(Component frontComponent, Component backComponent, FlipCardVaria
5759

5860
/**
5961
* Sets the mechanism of how the card flips.
60-
*
62+
*
6163
* @param variant the variant type that specifies the flip behavior of the card
6264
*/
6365
public void setVariant(FlipCardVariant variant) {
@@ -66,7 +68,7 @@ public void setVariant(FlipCardVariant variant) {
6668

6769
/**
6870
* Returns the variant value that represents the current flip behavior of the card.
69-
*
71+
*
7072
* @return the current variant value
7173
*/
7274
public FlipCardVariant getVariant() {
@@ -76,7 +78,7 @@ public FlipCardVariant getVariant() {
7678

7779
/**
7880
* Sets the component that will be display on the front side of the card.
79-
*
81+
*
8082
* @param component the front side component
8183
*/
8284
public void setFrontComponent(Component component) {
@@ -87,13 +89,12 @@ public void setFrontComponent(Component component) {
8789

8890
/**
8991
* Sets the component that will be display on the back side of the card.
90-
*
92+
*
9193
* @param component the back side component
9294
*/
9395
public void setBackComponent(Component component) {
9496
Element backElement = component.getElement();
9597
backElement.setAttribute("slot", "back");
9698
this.getElement().appendChild(backElement);
9799
}
98-
99100
}

src/test/java/com/flowingcode/vaadin/addons/DemoLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

src/test/java/com/flowingcode/vaadin/addons/flipcard/DemoView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

src/test/java/com/flowingcode/vaadin/addons/flipcard/FlipCardAsInfoCardDemo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,6 @@
1919
*/
2020
package com.flowingcode.vaadin.addons.flipcard;
2121

22-
import java.time.LocalDateTime;
2322
import com.flowingcode.vaadin.addons.demo.DemoSource;
2423
import com.flowingcode.vaadin.addons.flipcard.FlipCard.FlipCardVariant;
2524
import com.vaadin.flow.component.datetimepicker.DateTimePicker;
@@ -34,6 +33,7 @@
3433
import com.vaadin.flow.component.textfield.TextField;
3534
import com.vaadin.flow.router.PageTitle;
3635
import com.vaadin.flow.router.Route;
36+
import java.time.LocalDateTime;
3737

3838
@SuppressWarnings("serial")
3939
@DemoSource

src/test/java/com/flowingcode/vaadin/addons/flipcard/FlipCardDemo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

src/test/java/com/flowingcode/vaadin/addons/flipcard/it/AbstractViewTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,8 +47,7 @@ public abstract class AbstractViewTest extends ParallelTest {
4747

4848
private final String route;
4949

50-
@Rule
51-
public ScreenshotOnFailureRule rule = new ScreenshotOnFailureRule(this, true);
50+
@Rule public ScreenshotOnFailureRule rule = new ScreenshotOnFailureRule(this, true);
5251

5352
public AbstractViewTest() {
5453
this("");
@@ -87,8 +86,7 @@ private static String getURL(String route) {
8786
private static final String USE_HUB_PROPERTY = "test.use.hub";
8887

8988
/**
90-
* Returns whether we are using a test hub. This means that the starter is
91-
* running tests in
89+
* Returns whether we are using a test hub. This means that the starter is running tests in
9290
* Vaadin's CI environment, and uses TestBench to connect to the testing hub.
9391
*
9492
* @return whether we are using a test hub

src/test/java/com/flowingcode/vaadin/addons/flipcard/it/ViewIT.java

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,28 +32,29 @@
3232

3333
public class ViewIT extends AbstractViewTest {
3434

35-
private Matcher<TestBenchElement> hasBeenUpgradedToCustomElement = new TypeSafeDiagnosingMatcher<TestBenchElement>() {
36-
37-
@Override
38-
public void describeTo(Description description) {
39-
description.appendText("a custom element");
40-
}
41-
42-
@Override
43-
protected boolean matchesSafely(TestBenchElement item, Description mismatchDescription) {
44-
String script = "let s=arguments[0].shadowRoot; return !!(s&&s.childElementCount)";
45-
if (!item.getTagName().contains("-")) {
46-
return true;
47-
}
48-
if ((Boolean) item.getCommandExecutor().executeScript(script, item)) {
49-
return true;
50-
} else {
51-
mismatchDescription.appendText(item.getTagName() + " ");
52-
mismatchDescription.appendDescriptionOf(is(not(this)));
53-
return false;
54-
}
55-
}
56-
};
35+
private Matcher<TestBenchElement> hasBeenUpgradedToCustomElement =
36+
new TypeSafeDiagnosingMatcher<TestBenchElement>() {
37+
38+
@Override
39+
public void describeTo(Description description) {
40+
description.appendText("a custom element");
41+
}
42+
43+
@Override
44+
protected boolean matchesSafely(TestBenchElement item, Description mismatchDescription) {
45+
String script = "let s=arguments[0].shadowRoot; return !!(s&&s.childElementCount)";
46+
if (!item.getTagName().contains("-")) {
47+
return true;
48+
}
49+
if ((Boolean) item.getCommandExecutor().executeScript(script, item)) {
50+
return true;
51+
} else {
52+
mismatchDescription.appendText(item.getTagName() + " ");
53+
mismatchDescription.appendDescriptionOf(is(not(this)));
54+
return false;
55+
}
56+
}
57+
};
5758

5859
@Test
5960
public void componentWorks() {

src/test/java/com/flowingcode/vaadin/addons/flipcard/test/SerializationTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,15 +19,15 @@
1919
*/
2020
package com.flowingcode.vaadin.addons.flipcard.test;
2121

22+
import com.flowingcode.vaadin.addons.flipcard.FlipCard;
23+
import com.vaadin.flow.component.html.Div;
2224
import java.io.ByteArrayInputStream;
2325
import java.io.ByteArrayOutputStream;
2426
import java.io.IOException;
2527
import java.io.ObjectInputStream;
2628
import java.io.ObjectOutputStream;
2729
import org.junit.Assert;
2830
import org.junit.Test;
29-
import com.flowingcode.vaadin.addons.flipcard.FlipCard;
30-
import com.vaadin.flow.component.html.Div;
3131

3232
public class SerializationTest {
3333

@@ -36,7 +36,8 @@ private void testSerializationOf(Object obj) throws IOException, ClassNotFoundEx
3636
try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
3737
oos.writeObject(obj);
3838
}
39-
try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
39+
try (ObjectInputStream in =
40+
new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
4041
obj.getClass().cast(in.readObject());
4142
}
4243
}

src/test/resources/META-INF/frontend/styles/flip-card-demo-styles.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020

2121
.flip-card-basic {
22-
margin: 60px auto;
23-
width: 500px;
24-
--flip-card-height: 300px;
22+
margin: 60px auto;
23+
width: 500px;
24+
--flip-card-height: 300px;
2525
--flip-card-transition-duration: 1000ms;
2626
--flip-card-border-radius: 20px;
2727
--flip-card-box-shadow: none;
@@ -37,11 +37,11 @@
3737

3838
.flip-card-basic .front-card, .flip-card-basic .back-card {
3939
width: 500px;
40-
height: 300px;
41-
display: flex;
42-
justify-content: center;
43-
align-items: center;
44-
flex-flow: column;
40+
height: 300px;
41+
display: flex;
42+
justify-content: center;
43+
align-items: center;
44+
flex-flow: column;
4545
}
4646

4747
.flip-card-basic .front-card span, .flip-card-basic .back-card span {
@@ -50,9 +50,9 @@
5050
}
5151

5252
.flip-card-info-card {
53-
margin: 60px auto;
54-
width: 600px;
55-
--flip-card-height: 400px;
53+
margin: 60px auto;
54+
width: 600px;
55+
--flip-card-height: 400px;
5656
--flip-card-transition-duration: 1500ms;
5757
--flip-card-border-radius: 0;
5858
--flip-card-box-shadow: none;
@@ -62,7 +62,7 @@
6262

6363
.flip-card-info-card .front-card, .flip-card-info-card .back-card {
6464
width: 540px;
65-
height: 400px;
65+
height: 400px;
6666
}
6767

6868
.flip-card-info-card .back-card {

0 commit comments

Comments
 (0)