@@ -27,7 +27,8 @@ static Dialog getPreviewDialog(MessageSource msg, UnityImage value)
27
27
Dialog confirmDialog = new Dialog ();
28
28
confirmDialog .setResizable (true );
29
29
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 );
31
32
Image image = new Image (streamResource , "" );
32
33
image .setWidth (value .getWidth (), Unit .PIXELS );
33
34
image .setHeight (value .getHeight (), Unit .PIXELS );
@@ -36,17 +37,17 @@ static Dialog getPreviewDialog(MessageSource msg, UnityImage value)
36
37
confirmDialog .add (dialogLayout );
37
38
return confirmDialog ;
38
39
}
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
+ }
52
53
}
0 commit comments