Package org.esa.snap.ui
Class RenderedImageIcon
java.lang.Object
org.esa.snap.ui.RenderedImageIcon
- All Implemented Interfaces:
Icon
An adapter class which supplies a
RenderedImage with the Icon interface.-
Constructor Summary
ConstructorsConstructorDescriptionRenderedImageIcon(RenderedImage image) Constructs a newRenderedImageIconfor the givenRenderedImage. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the icon's height.intReturns the icon's width.getImage()Returns the wrappedRenderedImage.voidDraw the icon at the specified location.
-
Constructor Details
-
RenderedImageIcon
Constructs a newRenderedImageIconfor the givenRenderedImage.- Parameters:
image- the image to be wrapped
-
-
Method Details
-
getImage
Returns the wrappedRenderedImage. -
getIconWidth
public int getIconWidth()Returns the icon's width.- Specified by:
getIconWidthin interfaceIcon- Returns:
- an int specifying the fixed width of the icon.
-
getIconHeight
public int getIconHeight()Returns the icon's height.- Specified by:
getIconHeightin interfaceIcon- Returns:
- an int specifying the fixed height of the icon.
-
paintIcon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
-