|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.swt.SWTGraphicUtilities
Class gathering utility methods related to SWT Graphics.
| Method Summary | |
static org.eclipse.swt.graphics.ImageData |
createImageData(Raster raster)
This method converts a raster to an Swt . |
static int |
getBlue(int color)
Returns the blue component in the range 0-255 in the default RGB space. |
static org.eclipse.swt.graphics.Color |
getColor(org.eclipse.swt.graphics.Device swtdevice,
int color)
Creates and returns a . |
static int |
getGreen(int color)
Returns the green component in the range 0-255 in the default RGB space. |
static org.eclipse.swt.graphics.Image |
getImage(org.eclipse.swt.widgets.Display display,
java.lang.String path,
java.lang.Class referenceClass)
Routine creating and returning the SWT Image located at path.
|
static org.eclipse.swt.graphics.ImageData |
getImageData(int width,
int height)
Returns an of dimension
width*height initialized with a
of depth 32.
|
static int |
getIntValue(org.eclipse.swt.graphics.RGB rgb)
This method returns the integer representation of the passed
value.
|
static int |
getRed(int color)
Returns the red component in the range 0-255 in the default RGB space. |
static org.eclipse.swt.graphics.RGB |
getRGB(int color)
Returns an RGB object containing the red, green and blue components of the specified color. |
static int |
getRGBIntValue(org.eclipse.swt.graphics.Color color)
This method returns the integer representation of the passed
value.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static int getIntValue(org.eclipse.swt.graphics.RGB rgb)
This method returns the integer representation of the passed
value.
RGB
rgb - the RGB from which the integer
representation is requested.
RGB
value.public static int getRGBIntValue(org.eclipse.swt.graphics.Color color)
This method returns the integer representation of the passed Color value.
RGB
color - the Color from which the RGB int value
is requested.
Color RGB
value.public static org.eclipse.swt.graphics.RGB getRGB(int color)
Returns an RGB object containing the red, green and blue components of
the specified color.
NOTE: an RGB object is not a resourced-based object (in the sense
of SWT) and therefore needs not to be disposed.
color - int that defines the values for the red, green and blue
components as illustrated by the following hexadecimal
pattern: public static int getRed(int color)
color - int that defines the values for the red, green and blue
components as illustrated by the following hexadecimal
pattern:
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device swtdevice,
int color)
Creates and returns a . It is the callers
responsability to dispose the returned value when no longer needed.
Color
swtdevice - the SWT Devicecolor - an int representation of a Color
public static int getGreen(int color)
color - int that defines the values for the red, green and blue
components as illustrated by the following hexadecimal
pattern: public static int getBlue(int color)
color - int that defines the values for the red, green and blue
components as illustrated by the following hexadecimal
pattern: public static final org.eclipse.swt.graphics.ImageData createImageData(Raster raster)
ImageData.
raster - the input raster (not modified)
getImageData(int, int)
public static org.eclipse.swt.graphics.ImageData getImageData(int width,
int height)
Returns an of dimension
ImageDatawidth*height initialized with a
of depth 32.
PaletteData
width - the returned ImageData widthheight - the returned ImageData height
PaletteData
of depth 32.
public static final org.eclipse.swt.graphics.Image getImage(org.eclipse.swt.widgets.Display display,
java.lang.String path,
java.lang.Class referenceClass)
Routine creating and returning the SWT Image located at path.
display - the SWT Display used to create the returned image.path - location of the image relative to referenceClass.referenceClass - Class used as reference in order to retrieve the image.
path
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||