From c412bfabf21a8246681f70bc1ec1c9f1ee81d2e6 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Fri, 22 Jan 2016 17:02:17 +0000 Subject: [PATCH] Added method to change underneath set of images to show git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/image-previewer-widget@122476 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/ui/Carousel.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) 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 2b6406a..037f363 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 @@ -112,14 +112,6 @@ public class Carousel extends Composite{ mainModalPanel.show(); } - - /** - * Used to show this carousel. - */ - public void show(){ - - mainModalPanel.show(); - } @UiHandler("closeButton") public void closeOnClick(ClickEvent e){ @@ -169,6 +161,14 @@ public class Carousel extends Composite{ mainModalPanel.setTitle(listOfAttachmentsToShow.get(currentPreviewPosition).getTitleToShow()); } + + /** + * Used to show this carousel. + */ + public void show(){ + + mainModalPanel.show(); + } /** * Change the current image. @@ -191,5 +191,15 @@ public class Carousel extends Composite{ mainModalPanel.setTitle(listOfAttachmentsToShow.get(currentPreviewPosition).getTitleToShow()); } + + /** + * Change the set of images to show + * @param imagesToShow + */ + public void updateImages(List imagesToShow){ + + listOfAttachmentsToShow = imagesToShow; + + } }