com.sibvisions.rad.ui.awt.impl
Class AwtImage
java.lang.Object
com.sibvisions.rad.ui.awt.impl.AwtResource<java.awt.Image>
com.sibvisions.rad.ui.awt.impl.AwtImage
- All Implemented Interfaces:
- IImage, IResource
public class AwtImage
- extends AwtResource<java.awt.Image>
- implements IImage
The AwtImage
represents graphical images.
Constructor Summary |
AwtImage(java.lang.String pImageName,
java.awt.Image pImage)
Creates an instance of AwtImage based on
a java.awt.Image . |
Method Summary |
int |
getHeight()
Determines the height of the image. |
java.lang.String |
getImageName()
Gets the name of the image. |
int |
getWidth()
Determines the width of the image. |
void |
saveAs(java.io.OutputStream pOut,
IImage.ImageType pType)
Saves the current image as file. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
AwtImage
public AwtImage(java.lang.String pImageName,
java.awt.Image pImage)
- Creates an instance of
AwtImage
based on
a java.awt.Image
.
- Parameters:
pImageName
- image namepImage
- java.awt.Image- See Also:
Image
getImageName
public java.lang.String getImageName()
- Gets the name of the image.
- Specified by:
getImageName
in interface IImage
- Returns:
- the name of the image.
getWidth
public int getWidth()
- Determines the width of the image. If the width is not yet known,
this method returns
-1
.
- Specified by:
getWidth
in interface IImage
- Returns:
- the width of this image, or
-1
if the width is not yet known. - See Also:
Image.getHeight(java.awt.image.ImageObserver)
getHeight
public int getHeight()
- Determines the height of the image. If the height is not yet known,
this method returns
-1
.
- Specified by:
getHeight
in interface IImage
- Returns:
- the height of this image, or
-1
if the height is not yet known. - See Also:
Image.getWidth(java.awt.image.ImageObserver)
saveAs
public void saveAs(java.io.OutputStream pOut,
IImage.ImageType pType)
throws java.io.IOException
- Saves the current image as file.
- Specified by:
saveAs
in interface IImage
- Parameters:
pOut
- the output streampType
- the image type
- Throws:
java.io.IOException
- if the image can not be saved
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.