org.esa.beam.framework.ui
Class RenderedImageIcon

java.lang.Object
  extended by org.esa.beam.framework.ui.RenderedImageIcon
All Implemented Interfaces:
Icon

public class RenderedImageIcon
extends Object
implements Icon

An adapter class which supplies a RenderedImage with the Icon interface.


Constructor Summary
RenderedImageIcon(RenderedImage image)
          Constructs a new RenderedImageIcon for the given RenderedImage.
 
Method Summary
 int getIconHeight()
          Returns the icon's height.
 int getIconWidth()
          Returns the icon's width.
 RenderedImage getImage()
          Returns the wrapped RenderedImage.
 void paintIcon(Component c, Graphics g, int x, int y)
          Draw the icon at the specified location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderedImageIcon

public RenderedImageIcon(RenderedImage image)
Constructs a new RenderedImageIcon for the given RenderedImage.

Parameters:
image - the image to be wrapped
Method Detail

getImage

public RenderedImage getImage()
Returns the wrapped RenderedImage.


getIconWidth

public int getIconWidth()
Returns the icon's width.

Specified by:
getIconWidth in interface Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Returns the icon's height.

Specified by:
getIconHeight in interface Icon
Returns:
an int specifying the fixed height of the icon.

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
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.

Specified by:
paintIcon in interface Icon


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.