Skip to content

Commit 29a9af3

Browse files
committed
UY-1469 code style
1 parent 318b442 commit 29a9af3

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

vaadin-endpoint-common/src/main/java/io/imunity/vaadin/endpoint/common/plugins/attributes/ext/img/ImagePreviewDialogFactory.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ static Dialog getPreviewDialog(MessageSource msg, UnityImage value)
2727
Dialog confirmDialog = new Dialog();
2828
confirmDialog.setResizable(true);
2929
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(value.getImage());
30-
StreamResource streamResource = new StreamResource("imgattribute-" + UUID.randomUUID() + "." + value.getType().toExt(), () -> byteArrayInputStream);
30+
StreamResource streamResource = new StreamResource("imgattribute-" + UUID.randomUUID() + "." + value.getType()
31+
.toExt(), () -> byteArrayInputStream);
3132
Image image = new Image(streamResource, "");
3233
image.setWidth(value.getWidth(), Unit.PIXELS);
3334
image.setHeight(value.getHeight(), Unit.PIXELS);
@@ -36,17 +37,17 @@ static Dialog getPreviewDialog(MessageSource msg, UnityImage value)
3637
confirmDialog.add(dialogLayout);
3738
return confirmDialog;
3839
}
39-
40-
private static VerticalLayout createDialogLayout(Dialog dialog, MessageSource msg, Image image) {
41-
H3 headline = new H3(msg.getMessage("ImageAttributeHandler.image"));
42-
Button closeButton = new Button(msg.getMessage("close"));
43-
closeButton.addClickListener(e -> dialog.close());
44-
VerticalLayout dialogLayout = new VerticalLayout(headline, image,
45-
closeButton);
46-
dialogLayout.setSizeFull();
47-
dialogLayout.setPadding(false);
48-
dialogLayout.setAlignItems(FlexComponent.Alignment.STRETCH);
49-
dialogLayout.setAlignSelf(FlexComponent.Alignment.END, closeButton);
50-
return dialogLayout;
51-
}
40+
41+
private static VerticalLayout createDialogLayout(Dialog dialog, MessageSource msg, Image image)
42+
{
43+
H3 headline = new H3(msg.getMessage("ImageAttributeHandler.image"));
44+
Button closeButton = new Button(msg.getMessage("close"));
45+
closeButton.addClickListener(e -> dialog.close());
46+
VerticalLayout dialogLayout = new VerticalLayout(headline, image, closeButton);
47+
dialogLayout.setSizeFull();
48+
dialogLayout.setPadding(false);
49+
dialogLayout.setAlignItems(FlexComponent.Alignment.STRETCH);
50+
dialogLayout.setAlignSelf(FlexComponent.Alignment.END, closeButton);
51+
return dialogLayout;
52+
}
5253
}

0 commit comments

Comments
 (0)