Package org.loboevolution.img
Class LayeredImageView
java.lang.Object
org.loboevolution.img.LayeredImageView
A component showing an image as well as an arbitrary number of overlays.
Author Kazo Csaba
-
Constructor Summary
ConstructorDescriptionLayeredImageView
(org.loboevolution.img.ImageComponent theImage) Constructor for LayeredImageView. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOverlay
(Overlay overlay, int layer) Adds an overlay as the specified layer.Returns the component for this layered view.org.loboevolution.img.ImageComponent
Getter for the field theImage.void
removeOverlay
(Overlay overlay) Removes an overlay from the image viewer.
-
Constructor Details
-
LayeredImageView
public LayeredImageView(org.loboevolution.img.ImageComponent theImage) Constructor for LayeredImageView.
- Parameters:
theImage
- aImageComponent
object.
-
-
Method Details
-
getComponent
Returns the component for this layered view.- Returns:
- the Swing component for this view
-
addOverlay
Adds an overlay as the specified layer.- Parameters:
overlay
- the overlay to addlayer
- the layer to add the overlay to; higher layers are on top of lower layers; the image resides in layer 0
-
removeOverlay
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
-