Show selected image in ImageViewer - codenameone

This question is related to my other question at Carousel with thumbnail images at the bottom
I'm trying to implement a similar carousel but only of Images, using ImageViewer and DefaultListModel. When I select a thumbnail image from the bottom carousel, I show corresponding image in the ImageViewer. But what I noticed is that; the list in the ImageViewer doesn't get scrolled to the selected image but the currently displayed image gets replaced with the selected one. The So when I swipe to left or right; the images are different than the original sequence. Following is my code to show the selected image in Imageviewer
imageviewer.setImage(imageviewer.getImageList().getItemAt(selectedImgIndx));
Is there any way to make it behave like a Tab.setSelectedIndex?

Sure, use:
imageviewer.getImageList().setSelectedIndex(idx);

Related

Thumbnail with checkbox in ng2-pdfjs-viewer

I am using ng2-pdfjs-viewer in sidebar content thumbnail area i want to add checkbox to select particular thumbnail and feature to drag image of thumbnail from top to bottom and bottom to top please let me know if anyone have any idea regarding this implementation

Carousel with thumbnail images at the bottom

In a Codenameone app, I'm trying to develop a carousel with a thumbnail list at the bottom. I've used Tabs control to display files (of diff types like images, video, text, button etc) in carousel style in the center of a form and another Tabs control to display thumbanail images (of the first carousel files) at the bottom of the form. When a user selects a thumbnail image in the bottom carousel, corresponding component should be displayed in the first carousel.
hi.add(BorderLayout.CENTER, mainCarousel);
hi.add(BorderLayout.SOUTH, bottom_tab);
bottom_tab.addSelectionListener((i1, i2) -> {
// bottom_tab.getTabComponentAt(i2).addPointerPressedListener((i) -> {
mainCarousel.getTabComponentAt(i2).setVisible(true);
mainCarousel.getTabComponentAt(i2).repaint();
// });
});
But the component not getting displayed in the central carousel.
Also, I tried to capture the event addPointerPressedListener, but it's not getting fired when I select a thumbnail image.
You can't set tab components to visible/invisible to show/hide them. That won't work. I'm guessing that what you want is a horizontal list for the bottom UI similar to the answer here.
I would suggest using pointer released always. Notice that this will only get delivered to focusable components or the form. To make sure you get the event you can register a pointer release listener on the form.

Images for command buttons in footer facet

I currently have two command buttons in the footer / header facets - I am trying to have images in those buttons.
Using property inspector I am able to add images for these buttons - but they show up very tiny - no matter whatever the size of image.
Is there a way I can adjust the size of this image display in the property inspector or any where else please?
Did you consider styling the Command Buttons or Use Image Link instead

Drupal Slideshow small image at bottom

I have made a image gallery with a strip of thumbnails and 1 fullsize image.
(when a thumb is clicked, the images is loaded full size):
The problem is the little thumbnail underneath the full size view...
I dont know where this is coming from...
Anyone?
I had forgotten to check Exclude from display for the FIELD holding the thumbnail images:

extjs float an image above another image in a dataview

I am making a preview in extjs and I need to float images above an image in a DataView based on an image clicked in another DataView. image layering. How does one do that?
i think you can achieve that by manipulating the zIndex of the individual images... That is a CSS solution... The images you want above should have zIndex higher than the one below and at first hide all images except the lowermost image and then as required show the other images one after another... Hope it helps...

Resources