|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.swt.SWTImageOperations
This is the SWT implementation of the ImageOperations interface.
| Constructor Summary | |
SWTImageOperations()
Default constructor. |
|
SWTImageOperations(java.lang.Class referenceClass)
Constructor initializing the new instance of SWTImageOperations
with a given reference class which is used in order to load images in
loadImageResource(String) for instance.
|
|
SWTImageOperations(java.lang.Object referenceObject)
Constructor initializing the new instance of SWTImageOperations
with a given reference object which is used in order to load images in
loadImageResource(String) for instance.
|
|
| Method Summary | |
static java.lang.String |
convertImageToValueString(org.eclipse.swt.graphics.Image image)
Converts the given image data to a string. |
org.eclipse.swt.widgets.Display |
getReferenceDisplay()
Returns the internal Display or the default display if none is
internally referenced.
|
byte[] |
jpegEncode(int width,
int height,
int[] pixels,
float quality,
boolean forceBaseline)
Encodes the given pixel data to JPEG data. |
Raster |
loadImage(java.lang.String imagepath)
|
Raster |
loadImage(java.net.URL imagepath)
|
Raster |
loadImageResource(java.lang.Class refClass,
java.lang.String imagepath)
|
Raster |
loadImageResource(java.lang.String imagepath)
|
void |
registerReferenceClass(java.lang.Class refClass)
Registers the Class which is used in order
to load images in loadImageResource(String) for instance.
|
void |
registerReferenceDisplay(org.eclipse.swt.widgets.Display display)
Constructor initializing the new instance of SWTImageOperations
with a given Display which is used in order to create images in
loadImage(String) for instance.
|
void |
registerReferenceObject(java.lang.Object object)
Registers the Object which is used in order
to load images in loadImageResource(String) for instance.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SWTImageOperations()
public SWTImageOperations(java.lang.Object referenceObject)
Constructor initializing the new instance of SWTImageOperations
with a given reference object which is used in order to load images in
loadImageResource(String) for instance.
referenceObject - an Object used as reference in order to load images.registerReferenceObject(Object)public SWTImageOperations(java.lang.Class referenceClass)
Constructor initializing the new instance of SWTImageOperations
with a given reference class which is used in order to load images in
loadImageResource(String) for instance.
referenceClass - a Class used as reference in order to load images.registerReferenceObject(Object)| Method Detail |
public final void registerReferenceDisplay(org.eclipse.swt.widgets.Display display)
Constructor initializing the new instance of SWTImageOperations
with a given Display which is used in order to create images in
loadImage(String) for instance.
display - SWT Display used in order to create images.public final void registerReferenceObject(java.lang.Object object)
Registers the Object which is used in order
to load images in loadImageResource(String) for instance.
object - an Object used as reference in order to load images.registerReferenceClass(Class)public final void registerReferenceClass(java.lang.Class refClass)
Registers the Class which is used in order
to load images in loadImageResource(String) for instance.
refClass - a Class used as reference in order to load images.public Raster loadImageResource(java.lang.String imagepath)
loadImageResource in interface ImageOperations
public Raster loadImageResource(java.lang.Class refClass,
java.lang.String imagepath)
loadImageResource in interface ImageOperationspublic Raster loadImage(java.lang.String imagepath)
loadImage in interface ImageOperationspublic Raster loadImage(java.net.URL imagepath)
loadImage in interface ImageOperations
public byte[] jpegEncode(int width,
int height,
int[] pixels,
float quality,
boolean forceBaseline)
ImageOperations
jpegEncode in interface ImageOperationswidth - The width of the imageheight - The height of the imagepixels - The pixel array width a size of width*height
containing the colors encoded as 0xRRGGBBquality - The JPEG quality (0.0f - 1.0f)forceBaseline - The force baseline setting for the JPEG encoder
public static final java.lang.String convertImageToValueString(org.eclipse.swt.graphics.Image image)
image - the image to be represented in a string.
public org.eclipse.swt.widgets.Display getReferenceDisplay()
Returns the internal Display or the default display if none is
internally referenced.
Display or the default display if none is
internally referenced.Display.getDefault()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||