de.intarsys.cwt.hybrid.image
Class CwtHybridImage

java.lang.Object
  extended by de.intarsys.cwt.hybrid.image.CwtHybridImage
All Implemented Interfaces:
IAwtImage, IImage, ISwtImage

public class CwtHybridImage
extends java.lang.Object
implements IAwtImage, ISwtImage


Constructor Summary
CwtHybridImage(java.awt.image.BufferedImage bufferedImage)
           
CwtHybridImage(CwtAwtImage awtImage)
           
CwtHybridImage(CwtSwtImage swtImage)
           
CwtHybridImage(org.eclipse.swt.graphics.ImageData imageData)
           
 
Method Summary
protected  CwtAwtImage createAwtImage()
           
protected  CwtSwtImage createSwtImage()
           
protected  void drawFromAwt(CwtAwtGraphicsContext graphicsContext, float x, float y)
           
 void drawFromGraphicsContext(IGraphicsContext graphicsContext, float x, float y)
           
protected  void drawFromSwt(CwtSwtGraphicsContext graphicsContext, float x, float y)
           
 java.awt.image.BufferedImage getBufferedImage()
          The BufferedImage that represents this image.
 int getHeight()
           
 org.eclipse.swt.graphics.Image getImage(org.eclipse.swt.graphics.Device device)
           
 org.eclipse.swt.graphics.ImageData getImageData()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CwtHybridImage

public CwtHybridImage(java.awt.image.BufferedImage bufferedImage)

CwtHybridImage

public CwtHybridImage(CwtAwtImage awtImage)

CwtHybridImage

public CwtHybridImage(CwtSwtImage swtImage)

CwtHybridImage

public CwtHybridImage(org.eclipse.swt.graphics.ImageData imageData)
Method Detail

createAwtImage

protected CwtAwtImage createAwtImage()

createSwtImage

protected CwtSwtImage createSwtImage()

drawFromAwt

protected void drawFromAwt(CwtAwtGraphicsContext graphicsContext,
                           float x,
                           float y)

drawFromGraphicsContext

public void drawFromGraphicsContext(IGraphicsContext graphicsContext,
                                    float x,
                                    float y)
Specified by:
drawFromGraphicsContext in interface IImage

drawFromSwt

protected void drawFromSwt(CwtSwtGraphicsContext graphicsContext,
                           float x,
                           float y)

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()
Description copied from interface: IAwtImage
The BufferedImage that represents this image.

Specified by:
getBufferedImage in interface IAwtImage
Returns:
The BufferedImage that represents this image.

getHeight

public int getHeight()
Specified by:
getHeight in interface IImage

getImage

public org.eclipse.swt.graphics.Image getImage(org.eclipse.swt.graphics.Device device)
Specified by:
getImage in interface ISwtImage

getImageData

public org.eclipse.swt.graphics.ImageData getImageData()
Specified by:
getImageData in interface ISwtImage

getWidth

public int getWidth()
Specified by:
getWidth in interface IImage