Urbi SDK Remote for Java  2.7.5
urbi.ImageUtilities Class Reference

The ImageUtilities class is full of handy static methods. More...

List of all members.

Static Public Member Functions

static Image blockingLoad (byte[] buffer)
 Loads an image from the given binary buffer and will not return until the image is fully loaded.
static void centerFrame (Frame f)
 Places the given frame in the center of the screen.
static int getHeight ()
 Returns the height of the image.
static Frame getNonClearingFrame (String name, Component c)
 Returns a frame subclass whose the update mathod does not clear the frame's drawing surface.
static int getWidth ()
 Returns the width of the image.
static BufferedImage makeBufferedImage (Image image)
 Creates a buffered image from the supplied image.
static BufferedImage makeBufferedImage (Image image, int imageType)
 Creates a buffered image from the supplied image and its type.
static void setHeight (int i)
 Sets the height of the image.
static void setWidth (int i)
 Sets the width of the image.
static void sizeContainerToComponent (Container container, Component component)
 Resizes the given container to enclose the preferred size of the given component.
static boolean waitForImage (Image image)
 Waits for the given image to load fully.

Detailed Description

The ImageUtilities class is full of handy static methods.

Author:
Bastien Saltel

Definition at line 24 of file ImageUtilities.java.


Member Function Documentation

static Image urbi.ImageUtilities.blockingLoad ( byte[]  buffer) [static]

Loads an image from the given binary buffer and will not return until the image is fully loaded.

Parameters:
bufferThe buffer containing the binary data of the image.
Returns:
The fully loaded image if everything goes well or null if there is an error while loading.

Definition at line 115 of file ImageUtilities.java.

References urbi.ImageUtilities.waitForImage().

Referenced by urbi.ImageComponent.setImage().

static int urbi.ImageUtilities.getHeight ( ) [static]

Returns the height of the image.

Definition at line 72 of file ImageUtilities.java.

static Frame urbi.ImageUtilities.getNonClearingFrame ( String  name,
Component  c 
) [static]

Returns a frame subclass whose the update mathod does not clear the frame's drawing surface.

Parameters:
nameThe frame's title.
cThe component whose is used to fit the frame's size.
Returns:
The generated frame.

Definition at line 166 of file ImageUtilities.java.

References urbi.ImageUtilities.centerFrame(), and urbi.ImageUtilities.sizeContainerToComponent().

static int urbi.ImageUtilities.getWidth ( ) [static]

Returns the width of the image.

Definition at line 63 of file ImageUtilities.java.

static BufferedImage urbi.ImageUtilities.makeBufferedImage ( Image  image) [static]

Creates a buffered image from the supplied image.

Parameters:
imageThe supplied image.
Returns:
The buffered image.

Definition at line 129 of file ImageUtilities.java.

Referenced by urbi.ImageComponent.setImage().

static BufferedImage urbi.ImageUtilities.makeBufferedImage ( Image  image,
int  imageType 
) [static]

Creates a buffered image from the supplied image and its type.

Parameters:
imageThe supplied image.
imageTypeThe type of the image.
Returns:
The buffered image.

Definition at line 143 of file ImageUtilities.java.

References urbi.ImageUtilities.waitForImage().

static void urbi.ImageUtilities.setHeight ( int  i) [static]

Sets the height of the image.

Definition at line 54 of file ImageUtilities.java.

Referenced by urbi.ImageComponent.setImage().

static void urbi.ImageUtilities.setWidth ( int  i) [static]

Sets the width of the image.

Definition at line 45 of file ImageUtilities.java.

Referenced by urbi.ImageComponent.setImage().

static void urbi.ImageUtilities.sizeContainerToComponent ( Container  container,
Component  component 
) [static]

Resizes the given container to enclose the preferred size of the given component.

Parameters:
containerThe container to resize.
componentThe component.

Definition at line 195 of file ImageUtilities.java.

Referenced by urbi.ImageSampler.addImage(), and urbi.ImageUtilities.getNonClearingFrame().

static boolean urbi.ImageUtilities.waitForImage ( Image  image) [static]

Waits for the given image to load fully.

Returns true if everything goes well or false if there is an error while loading the image.

Returns:
true if everything goes well or false if there is an error during loading the image.

Definition at line 85 of file ImageUtilities.java.

Referenced by urbi.ImageUtilities.blockingLoad(), and urbi.ImageUtilities.makeBufferedImage().


The documentation for this class was generated from the following file: