Class LayeredImageView

java.lang.Object
org.loboevolution.img.LayeredImageView

public class LayeredImageView extends Object
A component showing an image as well as an arbitrary number of overlays. Author Kazo Csaba
  • Constructor Details

    • LayeredImageView

      public LayeredImageView(org.loboevolution.img.ImageComponent theImage)

      Constructor for LayeredImageView.

      Parameters:
      theImage - a ImageComponent object.
  • Method Details

    • getComponent

      public JComponent getComponent()
      Returns the component for this layered view.
      Returns:
      the Swing component for this view
    • addOverlay

      public void addOverlay(Overlay overlay, int layer)
      Adds an overlay as the specified layer.
      Parameters:
      overlay - the overlay to add
      layer - the layer to add the overlay to; higher layers are on top of lower layers; the image resides in layer 0
    • removeOverlay

      public void removeOverlay(Overlay overlay)
      Removes an overlay from the image viewer.
      Parameters:
      overlay - the overlay to remove
      Throws:
      IllegalArgumentException - if the overlay is not in the image viewer
    • getTheImage

      public org.loboevolution.img.ImageComponent getTheImage()

      Getter for the field theImage.

      Returns:
      the theImage