diff --git a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ImagePreviewer.java b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ImagePreviewer.java index 9918e28..9be6ffd 100644 --- a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ImagePreviewer.java +++ b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ImagePreviewer.java @@ -21,7 +21,7 @@ public class ImagePreviewer implements EntryPoint { public void onModuleLoad() { // decomment for testing purpose - //test(); + //test(); } diff --git a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java index b5dde0e..79d21cb 100644 --- a/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java +++ b/src/main/java/org/gcube/portlets/widgets/imagepreviewerwidget/client/ui/Carousel.java @@ -134,6 +134,10 @@ public class Carousel extends Composite{ } @UiHandler("downloadButton") + /** + * When the user pushes this button, try to download the file. + * @param e + */ public void downloadOnClick(ClickEvent e){ String downloadUrl = listOfAttachmentsToShow.get(currentPreviewPosition).getDownloadUrl(); @@ -146,6 +150,10 @@ public class Carousel extends Composite{ } @UiHandler("prevButton") + /** + * Show the previous image, if any. + * @param e + */ public void onClickPrev(ClickEvent e){ // evaluate prev index @@ -158,6 +166,10 @@ public class Carousel extends Composite{ } @UiHandler("nextButton") + /** + * Show the next image, if any. + * @param e + */ public void onClickNext(ClickEvent e){ // evaluate next index @@ -171,7 +183,7 @@ public class Carousel extends Composite{ } /** - * Used to show this carousel. + * Used to show this carousel (starting from the initial image). */ public void show(){ @@ -206,7 +218,7 @@ public class Carousel extends Composite{ } /** - * Retrieve the index of such image + * Retrieve the index of such image. * @param image * @return -1 if no image matches */ @@ -224,7 +236,7 @@ public class Carousel extends Composite{ } /** - * Change the set of images to show + * Change the set of images to show. * @param imagesToShow */ public void updateImages(List imagesToShow){ @@ -234,7 +246,7 @@ public class Carousel extends Composite{ } /** - * Hide Previouse and Next arrows of the carousel. + * Hide Previous and Next arrows of the carousel. */ public void hideArrows(){ @@ -244,7 +256,7 @@ public class Carousel extends Composite{ } /** - * Show image function + * Show image function. * @param index the index of the image to show */ private void showImage(int index){