Class ImageStackWidget

All Implemented Interfaces:
Drawable

public class ImageStackWidget extends Composite
A widget to display a set of Images
  • Field Details

  • Constructor Details

    • ImageStackWidget

      public ImageStackWidget(Composite parent, int style)
  • Method Details

    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a listener, notified a porperty has been changed.
      Parameters:
      listener - a new listener
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a listener.
      Parameters:
      listener - listener to be removed
    • isEditable

      public boolean isEditable()
    • setEditable

      public void setEditable(boolean editable)
    • setImageInputStreamsMap

      public void setImageInputStreamsMap(Map<String,InputStream> imageInputStreamsMap) throws IOException
      Set multiple Images to the widget, this will remove all existing images. In the imageInputStreamMap - the key defines the imageName and the value is an inputStream to the Image
      Parameters:
      imageInputStreamsMap - - a map of image names and image input streams
      Throws:
      IOException
    • addImage

      public void addImage(String name, InputStream imageInputStream) throws IOException
      Add a single Image to the stack
      Parameters:
      name - - the name to Identify the Image.
      imageInputStream - - an inputStream for the Image to be added.
      Throws:
      IOException
    • removeImage

      public void removeImage(String name) throws IOException
      Remove the Image identified by name
      Parameters:
      name - - the name of the Image to be removed
      Throws:
      IOException
    • getImage

      public InputStream getImage(String name)
      Return an InputStream for the Image identified by name
      Parameters:
      name - - name of the Image
      Returns:
      InputStream - to the Image identified by name
    • getImageNames

      public Set<String> getImageNames()
      get a set of all the image Names associated with the Images being displayed by this widget
      Returns:
      Set of strings containing the names of all Images
    • getSelectedImageName

      public String getSelectedImageName()
      get the name of the current Image in focus
      Returns:
      String imageName of the Image in focus
    • setSelectedImageName

      public void setSelectedImageName(String selectedImageName)
      set the Image to be brought into focus using its imageName
      Parameters:
      selectedImageName -